IT lexicon › Programming › Heightmap

Heightmap

Programming På svenska → Updated: 2026-10-24

A grayscale image whose pixel values encode terrain elevation, turning a 2D texture into a 3D landscape.

A heightmap stores a surface's height as a single value per cell, usually a grayscale image where white is high and black is low. A game reads it to displace a flat grid of vertices into hills and valleys — terrain for the price of a texture rather than hand-modeled geometry. Painting in an image editor is enough to sculpt a landscape.

The format is cheap and easy to stream and to apply LOD to (sample fewer points at distance), but it can't represent caves, overhangs or vertical cliffs — one height per column, by definition. Those need true volumetric data (see marching cubes) or stitched meshes. Heightmaps also feed physics, water simulation and displacement mapping. Texture splatting then paints grass, rock and sand across the surface.

← Back to the lexicon