Introduction to terrain

Terrain is basically used for non-manmade ground; things such as hills, deserts, and mountains. Unity's way of dealing with terrain is different than what most engines use in the fact that there are two mays to make terrains, one being using a height map and the other sculpting from scratch.

Height maps

Height maps are a common way for game engines to support terrains. Rather than creating tools to build a terrain within the level, they use a piece of graphics software to create an image and then we can translate that image into a terrain using the grayscale colors provided to translate into different height levels, hence the name height map. The lighter in color the area is, the lower its height, so in this instance, black represents the terrain's lowest areas, whereas white represents the highest.

Note

The terrain's Terrain Height property sets how high white actually is compared with black.

In order to apply a height map to a terrain object, inside an object's Terrain component, click on the Settings button and scroll down to Import Raw….

Note

For more information on Unity's Height tools, check out http://docs.unity3d.com/Manual/terrain-Height.html.

If you want to learn more about creating your own HeightMaps using Photoshop while this tutorial is for UDK, the area in Photoshop is the same: http://worldofleveldesign.com/categories/udk/udk-landscape-heightmaps-photoshop-clouds-filter.php

Others also use software such as Terragen to create HeightMaps. More information on that is at http://planetside.co.uk/products/terragen3.

Hand sculpting

The other way to create terrain is by hand. This allows us to have everything exactly as we want it and is the way that we will be doing it in this chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset