Heightmap
Encyclopedia
In computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

, a heightmap or heightfield is a raster image
Raster graphics
In computer graphics, a raster graphics image, or bitmap, is a data structure representing a generally rectangular grid of pixels, or points of color, viewable via a monitor, paper, or other display medium...

 used to store values, such as surface elevation
Elevation
The elevation of a geographic location is its height above a fixed reference point, most commonly a reference geoid, a mathematical model of the Earth's sea level as an equipotential gravitational surface ....

 data, for display in 3D computer graphics
3D computer graphics
3D computer graphics are graphics that use a three-dimensional representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering 2D images...

. A heightmap can be used in bump mapping
Bump mapping
Bump mapping is a technique in computer graphics for simulating bumps and wrinkles on the surface of an object. This is achieved by perturbing the surface normals of the object and using the perturbed normal during lighting calculations. The result is an apparently bumpy surface rather than a...

 to calculate where this 3D data would create shadow in a material, in displacement mapping
Displacement mapping
Displacement mapping is an alternative computer graphics technique in contrast to bump mapping, normal mapping, and parallax mapping, using a texture- or height map to cause an effect where the actual geometric position of points over the textured surface are displaced, often along the local...

 to displace the actual geometric position of points over the textured surface, or for terrain where the heightmap is converted into a 3D mesh.

A heightmap contains one channel
Channel (digital image)
Color digital images are made of pixels, and pixels are made of combinations of primary colors. A channel in this context is the grayscale image of the same size as a color image, made of just one of these primary colors. For instance, an image from a standard digital camera will have a red, green...

 interpreted as a distance of displacement
Displacement (vector)
A displacement is the shortest distance from the initial to the final position of a point P. Thus, it is the length of an imaginary straight path, typically distinct from the path actually travelled by P...

 or “height” from the “floor” of a surface and sometimes visualized as luma
Luma (video)
In video, luma, sometimes called luminance, represents the brightness in an image . Luma is typically paired with chrominance. Luma represents the achromatic image without any color, while the chroma components represent the color information...

 of a grayscale
Grayscale
In photography and computing, a grayscale or greyscale digital image is an image in which the value of each pixel is a single sample, that is, it carries only intensity information...

 image, with black representing minimum height and white representing maximum height.
When the map is rendered, the designer can specify the amount of displacement for each unit of the height channel, which corresponds to the “contrast” of the image.
Heightmaps can be stored by themselves in existing grayscale image formats, with or without specialized metadata
Metadata
The term metadata is an ambiguous term which is used for two fundamentally different concepts . Although the expression "data about data" is often used, it does not apply to both in the same way. Structural metadata, the design and specification of data structures, cannot be about data, because at...

,
or in specialized file format
File format
A file format is a particular way that information is encoded for storage in a computer file.Since a disk drive, or indeed any computer storage, can store only bits, the computer must have some way of converting information to 0s and 1s and vice-versa. There are different kinds of formats for...

s such as Daylon Leveller
Daylon Leveller
Daylon Leveller is a terrain/heightfield modeling program made by Daylon Graphics Ltd. of British Columbia, Canada. It was written by Ray Gardener in 1998 and is now at version 4.0. Leveller began as a fork of Gardener's earlier NavCam utility for the POV-Ray raytracer...

, GenesisIV
GenesisIV
GenesisIV is a photorealistic landscape renderer program made by Geomantics Ltd. of Balquhidder, Scotland.GenesisIV is similar to Terragen in that it uses an atmosphere lighting model, but differs in that this trades off some sophistication so that it can be implemented in hardware using OpenGL...

 and Terragen
Terragen
Terragen is a scenery generator program for Microsoft Windows and Mac OS X developed and published by Planetside Software. It can be used to create renderings and animations of landscapes.-History:...

 documents.

One may also exploit the use of individual color channels to increase detail. For example, a standard RGB 8-bit image can only show 256 values of grey and hence only 256 heights. By using colors, a greater number of heights can be stored (for an 8-bit image, 2563 = 16,777,216 heights can be represented (2564 = 4,294,967,296 if the alpha channel is also used)). This technique is especially useful where height varies slightly over a large area. Using only grey values, because the heights must be mapped to only 256 values, the rendered terrain appears flat, with "steps" in certain places.

Heightmaps are commonly used in geographic information system
Geographic Information System
A geographic information system, geographical information science, or geospatial information studies is a system designed to capture, store, manipulate, analyze, manage, and present all types of geographically referenced data...

s, where they are called digital elevation model
Digital elevation model
A digital elevation model is a digital model or 3-D representation of a terrain's surface — commonly for a planet , moon, or asteroid — created from terrain elevation data....

s.

Creating of heightmaps

Heightmaps can be created by hand with a classical paint program or a special terrain editor. These editors visualise the terrain in 3D and allow the user to modify 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 Perlin noise function. Another method is to use real world data for example from satellites.

Programs that use heightmaps

Heightmaps are widely used in terrain rendering software and modern video games. Heightmaps are an ideal way to store digital terrain elevations; compared to a regular polygonal mesh, they require substantially less memory for a given level of detail.

In the earliest games using software rendering, the elements often represented heights of columns of voxel
Voxel
A voxel is a volume element, representing a value on a regular grid in three dimensional space. This is analogous to a pixel, which represents 2D image data in a bitmap...

s rendered with ray casting
Ray casting
Ray casting is the use of ray-surface intersection tests to solve a variety of problems in computer graphics. It enables spatial selections of objects in ascene by providing users a virtual beam as a visual cue extending...

.
In most newer games, the elements represent the height coordinate of polygons in a mesh
Polygon mesh
A polygon mesh or unstructured grid is a collection of vertices, edges and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling...

.

Rendering software

  • Terragen
    Terragen
    Terragen is a scenery generator program for Microsoft Windows and Mac OS X developed and published by Planetside Software. It can be used to create renderings and animations of landscapes.-History:...

     – terrain renderer
  • Picogen
    Picogen
    Picogen is a rendering system for the creation and rendering of artificial terrain, based on ray tracing. It is free software.-Overview:While the primary purpose of picogen is to display realistic 3d terrain, both in terms of terrain formation and image plausibility, it also is a heightmap-creation...

     – terrain renderer and heightmap creation tool

Generating software

Many 3D video games use heightmaps to store and generate terrain data. Benefits of such a system include ease of implementation as well as modding
Mod (computer gaming)
Mod or modification is a term generally applied to personal computer games , especially first-person shooters, role-playing games and real-time strategy games. Mods are made by the general public or a developer, and can be entirely new games in themselves, but mods are not standalone software and...

. Players can easily generate their own heightmaps for use within the game using widely available software. Heightmaps are usually complemented by texture maps
Texture mapping
Texture mapping is a method for adding detail, surface texture , or color to a computer-generated graphic or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D. thesis of 1974.-Texture mapping:...

 that are then applied to the terrain in-game for extra detail and realism.
  • Quake3 and a host of subsequent or derivative games, use the GtkRadiant
    GtkRadiant
    GtkRadiant is a level design program developed by id Software and Loki Software. It is used to create maps for a number of video games. It is maintained by id Software together with a number of volunteers.-History:...

     level editor to prepare the [mapname].map level files. This editor in its many bespoke formats, comes with a plugin "gensurf" that uses a greyscale bitmap to preview and generate terrain polygons for use in the map.
  • NovaLogic
    NovaLogic
    NovaLogic is a software developer and publisher established in 1985 and based in Calabasas, California. The company was founded by current CEO John A. Garcia....

    's Comanche series
    Comanche series
    Comanche is a series of simulation games published by NovaLogic. The goal of each of these games is to fly military missions in a RAH-66 Comanche attack helicopter, which was in development and prototyping at the time of release....

     – first popular computer game to use heightmap terrain, advertised as a “Voxel
    Voxel
    A voxel is a volume element, representing a value on a regular grid in three dimensional space. This is analogous to a pixel, which represents 2D image data in a bitmap...

     Space” engine
  • Battlefield 1942
    Battlefield 1942
    Battlefield 1942 is a 3D World War II first-person shooter computer game developed by Swedish company Digital Illusions CE and published by Electronic Arts for Microsoft Windows and Apple Macintosh . The game can be played in singleplayer mode against the computer game AI or in multiplayer mode...

     and Battlefield 2
    Battlefield 2
    Battlefield 2 is a computer game by the Swedish developer Digital Illusions CE . During development, Trauma Studios contributed to the development of the game after it was acquired by DICE...

     use heightmaps generated using Terragen
    Terragen
    Terragen is a scenery generator program for Microsoft Windows and Mac OS X developed and published by Planetside Software. It can be used to create renderings and animations of landscapes.-History:...

     and modified in the respective editors.
  • CryENGINE 2s Sandbox editor
  • Far Cry level editor – level editor that imports heightmaps
  • Neverwinter Nights 2
    Neverwinter Nights 2
    Neverwinter Nights 2 is a computer role-playing game developed by Obsidian Entertainment and published by Atari. It is the sequel to BioWare's Neverwinter Nights, based on the Dungeons & Dragons pencil and paper fantasy role-playing game...

     – The Electron toolset
    Electron toolset
    The Electron toolset was developed by Obsidian Entertainment and is included in the computer role-playing game Neverwinter Nights 2. It allows people to design their own adventures and distribute them for others who own the game to play...

     can be used to create heightmaps, while the Electron engine is used to traverse them
  • OpenTTD
    OpenTTD
    OpenTTD is an open source remake and expansion of the 1995 Chris Sawyer video game Transport Tycoon Deluxe. It is an "urban planning and simulation game" in which the player aims to earn money through transportation of passengers and freight by land, water and air.OpenTTD duplicates most of...

     scenario editor
  • AC3D
    AC3D
    AC3D is a 3D design program which has been available since 1994. The software is used by designers for modeling 3D graphics for games and simulations - most notably it is used by the scenery creators at Laminar Research on the X-Plane...

  • Earthsculptor - Edit/Create a terrain then generate a heightmap
  • Myth
  • Outcast
    Outcast (game)
    Outcast is an action-adventure video game by Belgian developer Appeal and released by Infogrames for the PC in 1999. A Dreamcast port of the original was also planned, but was shelved when the PC version failed in the marketplace.-Plot:...

  • Spring – Open source 3D RTS engine
  • Terra Nova: Strike Force Centauri
    Terra Nova: Strike Force Centauri
    Terra Nova: Strike Force Centauri is a 1996 tactical first-person shooter video game developed and published by Looking Glass Technologies. Set in a science fictional depiction of the 24th century, the game follows a faction of humans who colonize the Alpha Centauri star system to escape from a...

  • SimCity Societies
    SimCity Societies
    SimCity Societies received mixed reviews. GameZone praised the game's increased accessibility and less "sterile" gameplay compared to previous titles in the SimCity series, and Game Informer concluded that the changes to the gameplay were "inventive"...

     – Uses height maps for terrain generation.
  • Crashday
    Crashday
    Crashday is a destruction derby/racing/car stunts game co-developed by Replay Studios, Moonbyte Games and published by Atari. It was released in February 2006.Version 1.2 - -Gameplay:The game combines various styles of preceding racing games...

     – Uses Heightmaps in its Track Editor. Custom maps can also be imported by copying them into the heightmap folder
  • Grome
    Grome
    Grome is an environmental modeling package developed by Quad Software dedicated for procedural and manual generation of large virtual outdoor worlds suitable for games and other 3D real-time simulation applications.- History :...

     – Advanced outdoor editor that uses multiple layers, brushes
    Brush (video game)
    Brushes are used in some 3D video games such as games based on the Source engine, its predecessor the Goldsrc engine, Unreal Engine's tool Unreal Editor, etc. to construct levels. Brushes can be primitive shapes , pre-defined shapes , or custom shapes...

     and procedural generation (fractals, erosion) to operate on terrain heightmaps.
  • L3DT - Has tools to create a terrain, then generates a heightmap from the designed terrain
  • Unreal Development Kit - Uses Heightmaps to create terrain as of its June 2011 build
  • Artifex Terra 3D – Advanced freeware 3D terrain editor and painter based on the Ogre3D engine, brush-centric editing, triplanar texturing, can import and export heightmaps.
  • Skyrim

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK