Sign in with
Sign up | Sign in

Hardware Displacement Mapping

Matrox Parhelia-512 - The Challenger
By

Displacement Mapping is one of the new features that Matrox has introduced to DirectX 9. It allows real 3D geometry to be created based on special grayscale textures, which are also known as "displacement maps".


The hardware generates Z-values from the grayscale, or rather, displacement values found in the displacement map. Displacement maps are not new and have been used for a long time. Much of the information about earth's terrain provided by satellites is available in the form of displacement maps.

Parhelia is the first mainstream GPU that can make these calculations completely in the hardware. The unit writes, via the vertex fetcher and cache, directly to the Parhelia's vertex shader array.

In addition, the number of triangles in the mesh can be increased as desired. Matrox calls this "adaptive tessellation." From a relatively flat 3D object with few triangles, the hardware generates a high-polygon model and changes the Z-data of the points according to the displacement map.


The number of triangles in the scene is therefore increased significantly. In order to combat this, Parhelia carries out a dynamic LOD calculation, and as a result, objects that are further away are rendered with fewer triangles. Because only a few pixels are needed for rendering distant objects anyway, it would be a waste of processing power to render such objects with the full number of polygons.


In addition to rendering terrains, there are other uses for displacement mapping. Figures can also be generated, for example. The game developer creates and animates a simple, rough polygon figure and then specifies the final form for the model in a displacement map. This is a simple method to create different models, which can then be mapped with textures and pixel shader effects, just like any other 3D model.

Matrox shows some examples for this, which, however, do not show a whole lot of detail in the facial areas. In games that include scenes with masses of characters, though, the object-oriented approach (i.e., model generation via displacement maps) is a good idea.

Displacement mapping can also be used for bump mapping, as shown in the example above. But keep in mind that this shouldn't be mistaken for the traditional Dot3 bump mapping, because in this case, real 3D geometry is generated.

React To This Article