O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Heightmaps

A heightmap is an image that defines the landscape of your game. Keep in mind that your game doesn’t necessarily need a heightmap, but they are perfect for driving, racing, and role-playing games.

Heightmap images are made in Grayscale mode, which means that there is no color in them, but just 256 shades of gray. You can create mountains and valleys and plains in a heightmap through the use of different shades. Anything that is fully white represents the highest peak, whereas anything that is completely black represents the lowest point (see Figure 8.1).

Figure 8.1. The image on the left is the heightmap that was used to create the image on the right. As you can see, the areas that were white represent the high points and the areas ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required