Game Development Reference
In-Depth Information
The terrain tool source code implemented to illustrate the algorithms in this
chapter was written to be independent of Wild Magic. I used some Wild Magic
classes but stripped out what was not needed and removed the namespace Wm5.
However, the test program is a Wild Magic application. The vertex budget was
chosen to be 26,214 vertices, which leads to 52,315 triangles in the terrain mesh.
This is a reduction to 2.5 percent of the 2,097,152 triangles in the original height
field. Figure10.6 showsaprojectionofthetrianglemeshontothe
-plane.Ifyou
comparethistotheheightimageof Figure10.5(a ), youwillseethatsmalltriangles
occur in regions of high variation and vice versa.
The original height field and the decimatedmesharesavedtoaformatthat
Wild Magic 5 can load. The terrain viewer allows you to toggle between the two
terrains with the camera in the same location and orientation. Figure 10.7 shows
screen captures, both as solids and as wireframes. See Color Plates VI and VII for
larger color versions of the solid renderings.
xy
Bibliography
[Collaborators 10] VTP Collaborators. “The Virtual Terrain Project Web Site.”,
2010.Availableonline( www.vterrain.org ) .
[Eberly 10] David Eberly. “Geometric Tools Web Site.”, 2010. Available online
( www.geometrictools.com ) .
[Luebke et al. 03] David Luebke, Martin Reddy, Jonathan D. Cohen, Amitabh
Varshney, Benjamin Watson, and Robert Huebner. Level of Detail for 3D
Graphics . San Francisco: Morgan Kaufmann, 2003.
Search WWH ::




Custom Search