Creating and texture-painting terrains
In this recipe, we will introduce terrains by creating, sizing, positioning, and texture-painting (with an image) a flat terrain. Later recipes will enhance this terrain with heights, trees, and other details.
Figure 6.1: Our flat terrain texture painted with sand and grass around a cube
Getting ready
You’ll need at least two different images to texture-paint the terrain in this recipe. In the folder 06_01
, we have provided two free terrain textures (SandAlbedo and GrassHillAlbedo .PSD
Photoshop asset files) from the legacy Unity sample assets.
How to do it...
To create a terrain, follow these steps:
- Create a new 3D project, and import the two terrain textures.
- Add a cube to the scene by choosing the menu: GameObject | 3D Object | Cube. In the Inspector panel, set its Position to
(0, 0, 0)
. - Add a terrain to the scene by choosing the menu: GameObject | 3D Object | Terrain. In the Inspector...