Skip to end of metadata
Go to start of metadata


When you're satisfied with the look of your terrain in general, we can start making it more realistic, because these tiles are just a kind of placeholder; if you're walking outside, the ground would consist of grass or sand, for example. We'll add four layers for a nice, natural look with plenty of variation.

We'll continue with the heightmap we have imported on the previous page.

Creating Terrain Texture Layers

To create layers of textures, we'll have to go to the Paint section of the Terrain Editor. To get here, we'll click the Paint button (next to Sculpt) in the top of the Terrain Editor.

Layer 1: Grass

Assigning a Material

We'll pick a material first. This means choosing whether you want the default surface (which is now black and white tiles) to be grass, sand, snow, etc. There are many options, so for now we'll choose a simple grass texture.

In the bottom section of the Terrain Editor, we click on the Browse button next to Material.

A new window will pop up in which we can select a material for this layer. We'll navigate to materials -> terrain and select grass_4:

Click Open to confirm. This material will now be assigned to the "Default" layer.

You'll see in the Viewport that the black and white tiles have now been replaced by something else. If you're zoomed out, you may not see what it is, so zoom in on the terrain and take a look. You'll see from up close that it's the material that we just chose: grass. We'll add other layers to cover everything that is not supposed to be grass soon.

Assigning a Texture

Every layer also needs a texture assigned to it. In most cases, a standard grey will do. This is the standard texture set for the Default layer, so we won't have to change it right now. We will when we add a new layer, but we'll get to that later.

Giving the Layer a Color

Right now, if we would start to paint the grass, not much would change, except the grass that's already there would get a slightly more grey hue. Let's change the color so it's a nice and fairly dark green, as grass usually is. To do this, in the Terrain Editor, we go to the bottom section of the tool and click on the white square next to Filter Color. A window opens in which you can select a color for the currently selected layer:

We'll choose a fairly dark green, like the one in the first row, third column from the left. If you think this is too dark, you can make it a bit lighter with the vertical bar on the right. When you're happy with the color, click anywhere outside the Select Color window.

Setting Some Rules

Grass only grows up to a certain height and as our level is in the mountains, we'll certainly reach that height. Also, it doesn't grow on slopes that are steeper than a certain angle. To make sure our grass doesn't grow on any surface that it wouldn't be seen in nature, we'll set a few rules. In the Terrain Editor, below the Layers window, you'll see a number of Layer options:

In our level, there's a lake, and the edge of this lake will be covered in mud up to a certain height. We'll do that in the next step, but as the grass will start where the mud ends, we'll have to set the Min Height to 19. This will be the Max Height of the Mud layer later on. Also, we'll set the Max Height to 26, because like we said before, grass doesn't grow above a certain height.
To make sure our grass isn't painted on slopes that are too steep, we'll also set the Max Angle to 50 degrees. 0 degrees means a flat surface, and we definitely want the grass to grow there, so we can leave the Min Angle as it is.

So, to recap:

Min Height: 19
Max Height: 26
Min Angle: 0 (default)
Max Angle: 50

Painting the Layer

Now we're ready to paint. Click the large Paint button in the bottom section of the Terrain Editor:

You'll see that some new options appear for the size of the brush. Adjust the size to something you feel comfortable with and click and drag the brush over the level to paint the ground.

Because of the rules we set earlier, we'll only be able to paint our nice green grass in certain areas.

Flooding the Layer

If this method takes too long for you and you just want to paint the entire layer the same material and color, there's an easy way to do this. When you've selected the color, you can go to Layers -> Flood Layer. Alternatively, you can right-click on the layer and choose Flood Layer. The selected layer ("Default") will now be completely covered in the material and color that you've chosen. Because we've set some rules about the height and angles we want our grass to grow at, only certain areas will be covered in grass.

 You'll probably be using several layers, so it's a good idea to name them. Right now, this grass layer is still called "Default". Let's double-click on that name and change it to "Grass".

Layer 2: Mud

Now, when you look at lakes, the grass usually doesn't go right up to the water. There could be some mud, pebbles, rocks, etc. To make it a bit more realistic, we'll paint some mud on the banks of our little lake.

Adding a New Layer

We'll need another layer to do this, so in the Terrain Editor, we'll go to Layers -> Create Layer. We'll call this new layer "Mud" (like before, we double-click on NewLayer and rename it Mud). We will also assign the following texture and material to it (see the section Layer 1: Grass above as to how to do both):

Material:  mud_1

Assigning a Texture

This is already set to the default grey, which we'll be using, but just in case it's not the default grey, this is how you change it:

To add a texture, we'll choose one in the same way as we chose the Material: by using the Browse button next to Texture in the bottom of the Terrain Editor and navigating to the texture that we want:

The texture that's already set is located in Assets\textures\defaults, which should already be open.

Giving the Layer a Color

Now we'll give it a nice, muddy color, like the brown on the third row from the bottom and third column from the left.

Setting the Rules

To make sure the mud doesn't cover any terrain that wouldn't be muddy, we'll set some rules for this layer as well. We want the mud to cover everything up to the grass, so we won't have to change the Min Height. We also want it to cover everything under that height, at any angle, so we don't have to change the angles either. The rules will be as follows:

Min Height: 0 (default)
Max Height: 19
Min Angle: 0 (default)
Max Angle: 90 (default)

Painting the layer

Now we can Paint or Flood the level again. You'll see a strip of mud appear around the lake.

Layer 3: Snow

For a bit more variation, we'll paint the tops of the mountain range with a snowy material. We'll create another layer and assign the following texture and material to it (see above how to do this):

Material: snow

We'll also call it "Snow".

The default color is white, so we don't have to change the color for this layer.

We want the snow to cover all of the terrain above a certain height, so we'll only change the Min Height. Because snow simply falls off terrain that's too steep for it to cling onto, we'll have to set a Max Angle. The rules for the Snow layer will be:

Min Height: 26
Max Height: 1024 (default)
Min Angle: 0 (default)
Max Angle: 50

As before, you can now Paint or Flood the layer again.

Layer 4: Cliffs

You'll notice that there are still some areas that don't have a material and texture yet. This is because they are too steep for grass or snow and too high for the mud. In the mountains these areas would usually be steep rocky cliffs, so we'll create a new layer. We'll call this layer "Cliffs" and use the following texture and material:

Material: cliff_limestone_3d

 We'll go for a slightly grey color for these cliffs, so we'll click the color picker next to Filter Color, but all we'll do once we've opened this is move the vertical bar on the right down a bit. We don't need to move down very much, because the texture color is already grey.

The rules for this layer are:

Min Height: 19
Max Height: 1024 (default)
Min Angle: 50
Max Angle: 90 (default)

As before, you can now Paint or Flood the layer again.

Now that you've added all these layers, the level should look a bit like this:

That doesn't look too bad at all, does it?


Jump in the game (Ctrl+G) and take a closer look!