World Machine Tutorial #1
World Machine: Starting Up
Start World Machine by clicking the link in your Start Menu; a new project should start by default;
Starting World Machine should open up a new project file with a default set of 'devices', something along the lines of Figure 1. Devices are the little boxes (you should have four of them), each of which adds to the chain of building your world and are processed in sequence to generate your terrain,
Fig. 1 World Machine Basic default layout
World Machine: The GUI
The remainder of the GUI requires a little bit of explanation and you should familiarize yourself with some of the basic options available to you; there are tons of options and you can get a sense by briefly looking through the main menu at the very top; I mean the typical Windows menu bar. Go ahead and briefly look through these now. Pay close attention to the Devices sub-menu. We don't need to use this main menu, since many of these options are hidden under a variety of tabs and buttons just below the main menu.
The ribbon below the main menu has a range of the main features you will need for this tutorial (Fig. 2). We will not use the first five icons, but we will use most of those following, in particular World Extents and Resolution and the different views - the five little squares following those with the dice - and the build buttons (the big round green and yellow buttons).
Fig. 2 Ribbon with main functions
On the left, below this ribbon, you will find a little preview box with a variety of settings that manipulate the preview of your world. The preview of your world updates per device you have selected. Go ahead and select the 'Advanced Perlin'; note how this updates your preview. Selecting other devices, such as 'Curves' or 'Erosion' in the Modify box, will yet again update the preview: you can immediately see the effects of how that particular device affects your terrain.
Some things to keep in mind:
The settings here will only affect the preview and nothing else in your build;
You can toggle between 3D and 2D visualizations of your current project;
The Water Level is global, which means any adjustments made by devices are local and will work with local elevations;
The Water Level will export with your final build;
You can lock the preview of the currently selected device (shortcut F); this is an extremely handy function and you will use it a lot so get used to it!
You have an organizer (the hierarchy pane with Terrain Creation etc.) here by which you can keep track of all the devices in your current world. Note how the titles correspond to the boxes that surround your devices e.g. Terrain Creation. Use this hierarchy! A clean world is a happy world! :)
Two final things to note in relation to devices. There are different sockets/channels on each device and a little box underneath each device indicates their current status, whether they have been built or need rebuilding:
A green box: good, successfully built;
A yellow box: needs (re)building; select it and press the big yellow button;
A red box: cannot be built; not connected properly or has bad settings;
A black box: not in system and cannot be built; bad connection: check the sockets and try rebuilding.
You will often need to rebuilt separate parts of your chain, particularly when you've changed something in the middle. Pressing the green button will rebuild the entire chain. The sockets have specific functions and allow plugging in different devices to modify your terrain.
Fig. 3 Preview pane
The last thing you need to know is the Toolbar, which has all the cool gadgets that are otherwise hidden in the main menu at the very top. In Figure 4 you see the Toolbar with the Generator tab open. Other tabs we will be using in this tutorial are the Macros tab, the Output tab, the Filter tab, and the Natural tab.
Fig. 4 Toolbar with Generator tab open
Getting Started: Project Settings
Ok, so let's start a new project, from scratch :)
Let's first set our World Extents and Resolution (the little hill sign with a ruler next to it on the work ribbon). World Machine works best on large scale landscapes (not so much the small-scale nitty gritty stuff). So, first change the Upper Right Coordinate to 10 km and 10 km. Make sure the Normal Build Resolution is set to 513 x 513 (it needs the extra bit for export purposes so keep it checked!).
Then, switch over to the General Setup tab and set the Maximum Elevation to 2550 m. Note that World Machine uses metric units (not imperial!), so this is in meters. Make sure Use meters is checked, Base Elevation is set to 0 m, and Dimensionality is set to Kilometers; just to clarify, one kilometer is 1000 meters and one meter corresponds to just over three feet, slightly more than a yard. One mile is approximately 1.6 km so you get a sense of the extent of the terrain you'll be generating. Just imagine being able to walk that distance in VR...
Getting Started: Advanced Perlins
Now, let's start building a basic landscape. Confirm the Project Settings dialog box and make sure you are in Device View (press F5). We'll be starting from scratch, so if there is anything on the workspace, just select it (left-mouse click once) and delete it (del). Also delete the container boxes.
On the Toolbar, go to the Generator tab and click Advanced Perlin (button on the left with little green landscape).
Click anywhere on the workspace and a green box will appear, and a preview pops up in your top-left corner. The box is your Advanced Perlin device. Double-clicking this device will open up a properties dialog box, which has a whole lot of different settings you can play around with. For now, pull the Feature Scale slider to somewhere around Hills (c. 1.5 km) and set Basic Parameters > Style to Basic. Set Middle Elevation to some nice mid-range altitude of 2100 m or so.
Press OK to confirm.
As in Unity, it's good practice to name things and keep it organized, especially if you plan on going crazy with all the cool functions in World Machine. Right-click your Advanced Perlin and click Set name: change its name to something sensible, like baseTerrain. Note how it updates in your hierarchy pane on the left.
Now, if you select baseTerrain you'll see the preview box in the left corner has updated its view. You'll be wanting to keep an eye on this box, since in the free version of World Machine it's the only way that you can monitor real-time changes of your modifications (the pro version has an external window you can send out to another display). This landscape looks good, but a bit boring (I assume). So, we're going to add some cool stuff to it, and in fact, most of World Machine is tweaking and adding features to your Devices. Effectively, your baseTerrain generated basis landscape elements that you can tweak. You can tweak Perlins to a great extend, but to keep some control over the procedural modeling that you are doing, you will want to try and do most tweaking in other devices.
Getting Started: Layout Generators
To add a little more excitement to our landscape we'll add a river; after all, rivers are exciting. So, we'll first add a Layout Generator device to tweak our baseTerrain. Under the Generator tab, click on the Layout Generator icon (a grid thing with blob thingies on it).
Place a Layout Generator device on the canvas and then select it.
Rename the Layout Generator again to something sensible, say, canyon.
To keep the focus of your preview window (top-left box) on canyon, under the Device Navigation section you want to select Lock Preview (or press F), with canyon selected. This will immediately show you the effects of your tweaking in the top-left preview window. Then, double-click canyon, which should open up a new tab and an editor with a rather ugly brown background, the actual Layout Generator.
Note: to get a better view of your current terrain, World Machine offers a variety of view modes. For a 2D view, use Layout View (F6) or 2D View (F9); to get a 3D view of your terrain, use Explorer View (F7) or 3D View (F8). For the next step you should be using Layout View.
We're going to draw the course of the canyon through which our river can flow. Select Lines under Shape Library and create a nice line across the large brown area by clicking a number of times, say five or six. Note the large white rectangle: that shows you the bounds of your world. Then right-click to finish the line and you will see a white-green-brown-gray weird blob thing emerge.
Looks a bit angular to me (even though I can't see what's on your screen). We can fix that and give it a 'spline'-look. Right-click on the line and select Perform Curve Smoothing. There, much better! (still can't see it…).
We're going to turn this spline into a canyon of sorts. To do so, make sure the line is selected and then click the Invert Values checkbox under Layout Properties. You'll notice that in the preview window there's some relief emerging. We can tweak this relief a little. With the line still selected, under Shape Properties Brush, select the pencil in the red box and a properties dialog box will open. Leave Height and Strength to what they are, but change the Falloff distance to a smaller value until the blob looks like one of those candy gummy snakes (somewhere around 800 m should be good). Also, while we're here anyway, click on the third Falloff Profile Curve to give it a little more green; to have a crisp river canyon, set the Falloff Profile Curve to a lower value. This curve effectively will create canyon with a bit of a flat bottom - as canyons do!
Ok, close the dialog box and return to Device View (F5). Now connect canyon's Primary Output (Heightfield) to your baseTerrain's Shaping Guide (Heightfield) by selecting canyon and clicking on one socket and then on the next; a line should now connect them! If we now select baseTerrain and lock it to preview (F), we can see that baseTerrain has been modified with a canyon of sorts. To compare the effect in preview, turn off the preview lock and switch your selection between baseTerrain and canyon.
Finally, for sake of organization, select canyon and baseTerrain by holding down ctrl or shift. Right-click and select Group selected devices from the dropdown menu. This will create a big ol' box around these two devices. Accordingly, you can (and should!) characterize that box to reflect what's in it: rename it to Base Terrain and give it a cool color, say red.
Getting Started: Terracing
Ok, so far so good, but our landscape looks a little bumpy and lumpy with just a big gully in the middle. We'll add some terracing to make it a little more landscape-y.
Under Filter, click the Terrace Device icon (on the far right) and place a Terrace Device on your canvas. Terrace Devices are pretty powerful and good terracing is important to make landscapes look realistic; there are a lot of ridges in landscapes, though many are eroded down so they seem more smooth than they really are. In fact, next time your outside, just pay some attention to the very inconspicuous smooth changes in elevations as you walk across campus: terracing of sorts, just highly smoothed. In any case, have a look at its properties though let's not change them for now. You can play with these later for some quirky effects.
Instead, we're going to add two more Advanced Perlins; back to the Generator tab and select Advanced Perlins; add two more to the canvas and place them underneath your Terrace Device. You should now have two disconnected Terrace Device and Advanced Perlins in addition to baseTerrain and canyon on your workspace. At this point it's probably a good idea to rename your Terrace Device and the new Advanced Perlins; how about terrace, flatTerrain, and highTerrain.
The flatTerrain and highTerrain Perlins will modify your terrace device. Change the Feature Scale of flatTerrain to somewhere in between Boulders and Hills (say the fifth dash) and turn Steepness all the way down; leave everything else though! Change the Feature Scale of the highTerrain Perlin to Hills and Steepness all the way up; wow! That looks funky :-P
Finally, plug flatTerrain's Primary Output (Heightfield) into your terrace Terrace Modulation (Heightfield) socket and highTerrain's Primary Output (Heightfield) into your terrace's Mask Input. This will alter the terrain properties of terrace so check out the results in the preview window! Nothing! Ah, we need to connect our baseTerrain's Primary Output (Heightfield) to Primary Input (Heightfield) of terrace.
Finally finally, for sake of organization, select terrace, flatTerrain, and highTerrain and group these in a box as you did with Base Terrain. Give the box a good name and color, say blue.
Getting Started: Erosion
Ok! Looking good, but not there yet: terrace still doesn't look great. Generally, we'd want to easy the slopes of our terrace and so we're going to need to 'erode' it somewhat, just to make it look a little bit more 'natural'.
Right-click your Terrace container and select Add Device > Natural Filters > Erosion and place it somewhere in the container and make sure it is not connected yet! NB: do not place it on an existing connection between two devices since this will put the device in between that chain and do something you don't want it to! Right-click the new Erosion Device and rename it to terraceErosion.
Open up the properties of terraceErosion and let's not make things more difficult than they have to be; under Presets select Good with Terraces. Close this dialog with pressing OK. Don't forget to hook it's input up to your terrace output!
Ok, select your erosion device and press F8; pretty sweet! Looks rugged, looks like the moon... But where the heck is our river?
Back to Device View and copy and paste canyon; simply select it and ctrl-c and ctrl-v it onto the canvas (right-click to exit copy/paste mode). Rename this Layout Generator device to river. Hook it up to your erosion's output and double-click river; this should open up the Layout Generator again, though this time without the nasty brown background. Instead, it looks the Amazons, sort of...
Ok, pretty cool but this time we need to turn that same curve into a river, to follow the canyon we created earlier… Uncheck the Invert Values option that you checked earlier and check Use Breakup. Click the Edit button next to it and change its values to: Fractal Breakup = 1.00, Breakup Scale = 333.333 m, and Roughness = 6. Press the red cross to close this dialog box and it'll update your curve to not be a canyon :)
Build and press F8 to check out the behavior of your second spline. If this is not what you want, go back to Layout View and play with the settings a bit. You'll find that the options under Shape Properties will be rather useful! Modify your spline in a way that it represents a smaller gully inside the larger canyon gully :)
Getting Started: Coastal Overlay
Canyon, check! River, check! Hills, check! Erosion, check… But wait, this is a landscape with some sort of coastal character to it, or at least, that's what we (read: I) want. We can use the Coastal Overlay macro, a very powerful macro that will add texture to our landscape and particularly to our riverine setting.
Under the Macros tab, press the little folder icon on the left. This will show a range of macros (essentially plugins) that World Machine detected upon start up. If you copied Coastal_Overlay.dev into the right place on your computer, it should now be available within World Machine. Note: if you do not see the Coastal Overlay macro listed with the others, follow these instructions to add new macros. Just select all the macros you see here so you can experiment with them, but make sure that Coastal_Overlay is certainly there and checked since that's what we'll be using next.
Once you've selected all, press close (not 'load selected'). If all went well, Coastal Overlay should now be available to you under the Macro menu, a little icon with a coastal line!
Click Coastal Overlay and place a Coastal Overlay device on the Canvas. Coastal Overlay takes in a Heightfield and outputs a Bitmap. I'll explain the significance of this in a second, but essentially we convert a Heightfield (elevation data) into a texture (Bitmap). First rename the device to something more sensible: coast. Wouldn't it be cool if we could visualize coast and river together, as one? Let's do that now!
Under the Output tab select Overlay View and place an Overlay View device on the Canvas. Rename this device to overlay. Overlay takes in two parameters/has two channels: a Heightfield and a Mixed; the first is our elevation data and the latter can be a Bitmap.
Firstly, connect your river Primary Output (Heightfield) to the first channel of overlay, the input marked Primary Input (Heightfield). Secondly, connect the same Primary Output (Heightfield) of river to the Default (Heightfield) channel of coast. Yes! You can connect multiple sockets to multiple sockets! Thirdly, connect coast's output, marked Default (Bitmap), to the second channel of overlay, the input marked Overlay Input (Mixed).
Now double-click coast and adjust its settings; these settings produced a good result for my landscape:
Max Cliff Slope to 0.65625;
Max Beach Height to 0.53125;
Water Height to 0.51563;
and Sun Heading to 156.
However, you will almost certainly need to play with these settings to get a good result on your landscape! So, preview overlay, lock preview with F, and see the combined results as you play!
"Ok, ok, ok... What's going on here?", you might wonder... Well, like any other 3D model, terrain models usually encompass two datatypes: a height map and a texture. The final we output, coming from river, is effectively our final height map. The texture is generated through the magic of coast and its output can be draped over our height map; that's effectively what overlay does.
Finally, don't forget to group your river and coast together in a group, perhaps aptly named something like cool watery stuff?
Finishing Up: Outputting
The above little piece of knowledge is quite valuable, since that is how we will be able to export our data to other pieces of software. World Machine provides tools to do this, again in the form of devices. Firstly, under the Output tab, select the hippie floppy disk (the colorful little icon on the left), which will allow us to place a Bitmap Output device on the canvas and provides a way to output our Bitmap data to a file. Secondly, under the same tab, select the boring floppy disk (the brownish-red icon next to the hippie disk) and place a Height Output device on the canvas. Rename both to something sensible, e.g. bitmap and height.
You guessed it! Connect the river Primary Output (Heightfield) channel to the Primary Input (Heightfield) of height and the Default (Bitmap) output channel of coast to the RGB Input (Bitmap) of bitmap. Selecting each of these devices will show you what output will be generated.
Hang on! You are probably still wondering "where the h*ck is my river??" Well, on the left above the Lock Preview button you'll find a button that says Show and a slider in meters. This is your general water table. Since your river is the lowest point in your terrain, you can slide your water table down to the desired level to make your river! Sort of magical!
If all went well, you should have generated something cool like the terrain in Fig. 5! Note that each of your terrains will be different because of the randomness in the Advanced Perlins and the various (randomizing) operations applied to them.
Fig. 5 Example of completely built world
Finishing Up: Exporting
Alright! We've got a cool-looking landscape, or sort of should have, which we would like to use in Unity, or other kinds of software. Fun-fact, you can even use the data generated from this software in other tools that are widely used in for example the Social Sciences: why would you not want to do a spatial GIS analysis on a fantasy landscape that looks like the Amazons? Also note that you can do tiled exports from the pro version of World Machine, which will give you much higher resolution terrains and allow more in-depth experience of whatever world you can imagine!
Anyway, outputting our data is as simple as pressing the big green button! Note that if you've set everything up correctly, and you have been rendering in between, this final render will not take very long. Generally, it's good practice to build your scene in a low resolution for rendering purposes and export a high-resolution final product for use in other types of software.
Go ahead, press it! You know you want to! ^_^
Two last things we need to do now;
Double-click height and have a look at the options there. In order to export your elevation data you will need to specify the Filename, the File Format, and press the big button that says Write output to disk! The actual File Format depends on the software you're exporting to. For one example, see the second tutorial on how to export and import to Unity!
Double-click bitmap and you will see a similar situation: specify the Filename, File Format, and that big tempting button. Again, the latter depends on what you are exporting to and see the second tutorial on how to export and import to Unity if you'd like to give that a go :)