Adding trees and vegetation
As well as textures and heights, Unity provides tools to make it easy to “paint” trees and vegetation models onto a terrain. While, theoretically, you could just create tens, hundreds, or thousands of GameObjects from a tree or grass 3D model, animating them using a grass shader, it’s much easier and faster to use the tree and vegetation detail painting tools for terrains. In this recipe, we’ll work with two models; one is a model for a heather bush (since, for some reason, Unity does not provide any tree models with the Terrain Sample Assets), and the second model is of a kind of grass.
Figure 6.19: The flat entrance to our circle hill detail, painted with grass and plants
Getting ready
This recipe builds on the previous one, so make a copy of that and work with this copy.
How to do it…
To add trees and vegetation, follow these steps:
- Open your copy of the Unity project from the previous...