Using the Terrain Tools in Unity

Learn to create and manage a wide range of terrains in your apps by using Unity’s powerful Terrain Tools and the all new Terrain Toolbox API. By Mauro Fuentes.

3.7 (3) · 2 Reviews

Download materials
Save for later
Share
You are currently viewing page 5 of 5 of this article. Click here to view the first page.

Brush Mask Filters

What’s new about brushes? Well, they’re now 16-bit. Also, Unity added Filters. You’ll use a couple of them for this tutorial, but you should test them all because they’re super fun.

Note: Remember, heightmaps are textures that use the red channel. Brushes are exactly the same — because they are heightmaps.

How would you go about painting a slope? Nah, it’s easier than that. Unity has a slope filter now.

To use it, select your terrain. Go to Terrain in the Inspector and select the Paint Terrain tool. After that, select Paint Texture in the dropdown.

Below all of the different brush textures, you should see Brush Mask Filters. Click the Plus icon and select Slope.

Notice the Eye icons on the left? They activate and deactivate filters. Your new Slope filter should already be active.

Select the Remap Curve; this is what will be interpreted as a slope. The flatter the curve, the less of a slope there needs to be for the brush to apply the texture. Select the linearly increasing line at the bottom, then right click the green line and select Add Key. Move that key to (0.95, 0.3). This should create a green line with a sudden, sharp rise towards the very end.

Select some material, like snow, and test it.

How use brush filters

Nice, huh? Try one more. Deactivate Slope and add a Concavity filter. This will only paint surfaces that are concave or convex, depending on if you select Recessed or Exposed. Now, give it a try.

How to use filters on brushes to paint terrains

Combining Everything

You’ve made it this far. Guess what? It’s challenge time!! In Scene 6, you can apply everything you’ve learned so far. Practice everything. Try everything. Try different lighting setups to get different moods. You can also try varying camera angles. Test masks and different brushes. Experiment!

As usual, you’ll find a heightmap, a splatmap and lots of other things inside the Scene 6 folder.

When you finish, take a screenshot and post it on social media. Don’t forget to tag us! It would be awesome to see what you’re capable of.

Painting Details and Trees

As a final touch, you can add details and trees to add some flavor to the scene.

You’ll find a tree mesh in RW/Scenes/Scene 6/Tree/Tree and a detail sprite in RW/Scenes/Scene 6/Grass.

At this point, you know how to create your terrains. Remember to use both heightmaps at hand. Combine and create!

To add trees, simply select a terrain, then go to Paint Trees in the Terrain component. Select Edit Trees, then Add Tree and drag and drop the prefab Tree 2 where it says Tree Prefab. Finally, click Add.

Now, you can paint trees.

How to add trees to terrains

To add some details, just select a terrain and go to Paint Details in the Terrain component. Select Edit Details, then Add Grass Texture and select Brush_Grass_01. Finally, click Add.

Now, you can paint grass.

How to add details to the Terrain

Finally, here you have two screenshots for inspiration!

Mountains with a single, bare tree

Mountains with two trees with leaves on them

Where to Go From Here?

You can download all the project files by clicking the Download Materials button at the top or bottom of the tutorial.

In this tutorial, you learned to create and manage your own terrain landscapes using the new Terrain Toolbox API from Unity.

To further detail your landscapes, you can use these assets for free from the Unity Asset Store:

For more information, see this video about the Terrain Tools from Using Terrain Tools Tutorial from the official Unity YouTube channel.

We hope you enjoyed this tutorial. If you have any questions or comments, please join the forum discussion below. Don’t forget to share your own terrains on social media and tag us!