World Machine Tutorial #2

Machine Worlds in Unity

World Machine vs. Unity

Ok, so you've got a world and you're happy with it-- it looks sleek, it looks cool, seems like something you'd like to explore in a different environment and in a different way, say a game engine. Unity happens to be a particularly suitable game engine, that is, its able to provide you with a great virtual experience either in VR or 3D of the world you just built.

In fact, Unity has built-in terrain generation tools that allow you to create terrains as well. There are a number of extensions (assets) available through which you can do procedural generation; and yes, World Machine is therefore a bit redundant though still provides a powerful tool in addition, not to mention, it's free!

World Machine: Exporting

We'll first export our data from World Machine in a format suitable for Unity.

Ok, badass! We exported our elevation model. Next up, our texture! :)

Unity: Importing

The two files you just created need to be imported into Unity. 

Fig. 1 New Terrain GameObject in Unity

Fig. 2 Terrain GameObject in Unity with elevation data applied

Unity: Texturing

Kinky! However, it looks a bit pale and coloring this in manually would be a royal pain in your body's lower parts. Thankfully we also exported the color information from World Machine!

Note: if things don't show up quite in the right place, that is your texture does not properly match up with your Terrain (e.g. your river might be atop of a hill and your mountains may be in the middle of a lake!), you may have forgotten to check Flip Vertically on import or change some of the size options. In that case, just import the RAW file again and trace your steps to make sure it works out the second time around :)

At this point you can incorporate your landscape into your game! Start placing trees and sprinkle some awesome-sauce on yourself; you've earned it!

Fig. 3 Elevation data with texture draped over