Chapter 16

Terrain Rendering

The idea of terrain rendering is to start off with a flat grid (top of Figure 16.1). Then we adjust the heights (i.e., the y-coordinates) of the vertices in such a way that the mesh models smooth transitions from mountain to valley, thereby simulating a terrain (middle of Figure 16.1). And, of course, we apply a nice texture to render sandy beaches, grassy hills, rocky cliffs, and snowy mountains (bottom of Figure 16.1).

Image

Figure 16.1: (Top) A triangle grid. (Middle) A triangle grid with smooth height transitions used to create hills and valleys. (Bottom) A lit and textured terrain.

Objectives:

    To learn how to generate ...

Get Introduction to 3D Game Programming with DirectX 10 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.