How to Create Terrain in World Machine

Back to overview

Hello everyone, my name is Hannes, and in this tutorial I will show you the basics of World Machine, a node based program that generates terrain. At the end of this tutorial you will be able to create and color mountains, and export them to Sketchfab.

World Machine specialises in creating natural looking environments, and is a very powerful tool once you get the hang of it. There is a free version available which you can use to follow this tutorial. (This program only runs on Windows).

Preparation

Before we start I want to talk about the navigation and shortcut keys, and explain some basics. At the top of the screen you have the menu. Under the menu there are some big icons, these are shortcuts for commonly used actions. The green circle is the render button, and the yellow circle is the render selected node button. We won’t use these a lot in the tutorial but they are important for big projects.
Under that we have several tabs of node types, each containing different nodes.

image00

Let’s start!

Go to the Device view (shortcut f5) and remove all default nodes and groups, we want to start with a clean project.

Generators

To start creating a terrain we need a base to work from. These bases are called Generators. This could be a mesh you made in a 3d program, or a black and white image, or you can make it from scratch in World Machine. All Generators are displayed as green nodes, so they are easy to recognise. In this tutorial we will make our base from scratch.

First we want to add a Layout generator. You can find it under the Generators tab. Click on it, then click on the screen, and it will place a node. Then click on the node you just placed to select it and cancel the creation of new nodes.

image04

The Device view (shortcut key f5) displays all your nodes

Double click the Layout Generator node, and a mask view will show up. Here you can control your Layout Generator. You can add shapes, lines, and choose how high these shapes are. We need to look for a subtle square. If you don’t place your shapes in the correct square they will not show up since they are outside of your work field. Usually you have to pan up using the right mouse button since the square is out of view. You can also zoom out a bit.

Create a Circle in your work field. Right click once to go out of Circle creation mode, and double click the circle to open the settings. Now change the falloff so it looks similar to the image. What this does is it creates a circle with the maximum height of our scene, and a falloff which fades to the lowest height.

image08

The default falloff is often too strong.

Now when you go to the 3D view you should see a basic mountain.

image05

The 3D view (shortcut key f8) displays the end result

Erosion

Go back to the device view, click on the Natural tab, and add an erosion node. Connect the “primary output” from your first node with the “primary input” from the erosion. The result should look like this.

image12

2 nodes connected

Press f8 to go to the 3D view, and double click erosion in the sidebar. A setting screen should pop up. Try some templates and see which one you like the most. Feel free at this point to play with the sliders. Now you should see a basic mountain .

image11

Erosion is one of the most interesting nodes in World Machine

When you are happy with your mountain, move on the the second big step: colouring your mountain.

Color

We will create a colormap using the flow map generated by the erosion node. Erosion erodes the terrain, and a flow map is the result of this. Think of streams of sand flowing from your rock. Where the sand flows your mask will be white, where it doesn’t flow the mask will be black.

Create a Chooser node, which can be found under Combiners. Next, create 2 Color Generators – these can be found under Generators. Now choose your favorite 2 colours, and connect them to the Chooser node to A and B.

If you look closely at the erosion node, you see that under the primary output there is a connection called flow map. Connect the flow map to C. this will let World Machine choose between your 2 colours based on the flowmap.

image06

The chooser generates a colormap based on the flowmap created by the erosion.

image03

The generated flowmap

Overlay preview (optional)

If you want to preview your work in World Machine, create a Overlay view node, connect your erosion primary output to the primary input. And connect the primary output from the chooser node to the Overlay input . Now if you select the overlay node and click H+S in the preview window, you should see your color on the mountain.

image09

Overlay allows you to view an image on top of your 3d result

Overlay allows you to view an image on top of your 3d result

Exporting

If you are happy with this it is time to export it to Sketchfab. Go to the Output tab, and create a Bitmap Output and a Mesh Output. Connect the Erosion node to the Mesh Output, and the Chooser to the Bitmap Output. Press the green render orb at the top, double click both Output nodes, set the settings to obj and PNG 8 bits and click “write output to disk!” in both of them.

Now you have a mesh and a texture that you can export to Sketchfab.

The final project for this tutorial

The final project for this tutorial

For better results, you want to try combine more nodes with each other. The best way to learn is by experimenting and thinking out of the box :) Some interesting ideas are creating gradients with the chooser based on height, mixing cool and warm colours, and adding some ambient occlusion. You can color based on height, angle, convexity and much more. You can find these under the selector node tab.

Hopefully this tutorial will inspire you to try it out. And If you want to see some more environments I have created with World Machine check out my ArtStation  and Sketchfab.

About the author

Bart Veldhuizen

Community Lead at Sketchfab. 3D Scanning enthusiast and Blenderhead.



No Comments

    Related articles