In computer graphics, a height map or a height field is a raster image that is mainly used as a discrete global grid in secondary elevation modeling. Height maps plays an important role by creating 3D configurators. Each pixel stores values, such as surface height data, for display in 3D computer graphics. A heightmap can be used in bump mapping to calculate where this 3D data would create shadows in a material, in displacement mapping to move the actual geometric position of points across the structured surface, or for terrain where the heightmap is converted to a 3D mesh.
A heightmap contains a channel that is interpreted as a displacement or “height” from the “floor” of a surface and sometimes visualized as a lume of a grayscale image, with black representing the minimum height and white the maximum height. When rendering the map, the designer can specify the height of the shift for each unit of the Height Channel that corresponds to the “contrast” of the image. Heightmaps can be stored independently in existing grayscale image formats, with or without special metadata, or in special file formats such as Daylon Leveller, GenesisIV, and Terragen documents.
You can also use individual color channels to zoom in on details. For example, a standard RGB-8-bit image can display only 256 grayscale values and thus only 256 heights. By using colors, a larger number of heights can be stored (for a 24-bit image, 2563 = 16,777,216 heights can be displayed (2564 = 4,294,967,296 if the alpha channel is also used)). This technique is particularly useful when the height over a large area varies slightly. Only with gray values, since the heights must be mapped to only 256 values, the rendered terrain appears flat, with “steps” at certain locations.
Heightmaps are often used in geographic information systems, where they are referred to as digital elevation models.
Creating Heightmaps.
Heightmaps can be created manually using a classic painting program or a special terrain editor. These editors visualize the terrain in 3D and allow the user to change the surface.
Normally there are tools to raise, lower, smooth or erode the terrain. Another way to create a terrain is to use a terrain generation algorithm. This can be, for example, a 2D simplex noise function or by diffusion limited aggregation. Another method is the reconstruction of heightmaps from real data, e.g. with a synthetic aperture radar.
Programs that use Heightmaps.
Heightmaps are often used in terrain playback software and modern video games. Heightmaps are an ideal way to store digital terrain heights. Compared to a normal polygonal mesh, they require much less storage space at a certain level of detail. Most modern 3D computer modeling programs can use data from heightmaps in the form of bump, normal, or displacement maps to quickly and accurately create complex terrain and other surfaces.
In the first games with software rendering, the elements often represented the heights of columns of voxels rendered with ray casting. In most recent games, the elements represent the height coordinate of polygons in a mesh.
Thank you for visiting.
Leave A Comment