Game Development Reference
In-Depth Information
9.
Zoom in and out of the view to see the grass being distance culled.
If you paint grass from too far away, you may not see it until you zoom in closer. Even with culling,
it is easy to paint too much grass and see a large drop in the frame rate, so add grass carefully. This
can be a good time to use some of the spottier brushes.
The second type of “detail” for this module is the Detail Mesh. With the Grass type, you loaded
a texture and the planer mesh was generated for you. Obviously, you could use textures other
than grass, but at some point, you will want to use something more substantial to add foliage or
other features to your terrain.
The Detail Mesh lets you do just that. It also has two options. The first is used with plants that use
opacity channels. A small-leaved plant with lots of twig-like stems would cost far too many tris for
something so minor in your scene. You can see the idea with the BigTree's foliage. Other than a few
mesh branches, most of the leaves are on large, mostly planer pieces of geometry. Unlike the grass,
these do not turn to face the camera, so they are generally crossed in two or three planes.
Before you go any further, you will want to download the assets that are included with the topic. To
do so, go to the topic's page at the Apress website ( www.apress.com/9781430267799 ) and locate the
download. The assets include asset files and source code for each chapter, along with a finished
version of the project for each chapter. Unzip the assets to a location of your choice.
1.
If you haven't already done so, download the topic's assets for Chapter 2.
2.
In Unity, right-click in the Project view to bring up the Assets menu.
3.
From Import Package, choose Custom Package.
4.
Navigate to the downloaded Chapter 2 Book Assets folder, and select
TerrainDetailMeshes.unityPackage.
5.
Click Import when the package has uncompressed and the dialog appears
(Figure 2-55 ).
Search WWH ::




Custom Search