Parallax Mapping is a technique for real-time approximation (important in creation process of 3D configurators) of displacement mapping, sometimes referred to as Virtual Displacement Mapping. The texture coordinates of the individual pixels are adjusted during render time to create an illusion of depth as the viewer’s eye moves across a scene.
The most outstanding thing about Parallax Mapping is its efficiency. It is the cheapest real-time technique for displacement mapping. The disadvantage is the image quality. Parallax Mapping does not look as nice as more expensive techniques like Parallax Occlusion Mapping or Relief Mapping. These techniques are similar to Parallax mapping, but offer better image quality at the expense of additional texture lookups.
Parallax mapping uses a grayscale height map. The exact path to this depends on your specific game engine, but it is common to place it in the alpha channel of the normal map.
Methods of Parallax Mapping.
There are more than half a dozen versions of Parallax mapping:
All except offset and iterative use of extended rendering calls, which are only possible now on current hardware.
If someone is looking for a good compromise between rendering cost and visual effect, look at the interactive parallax, it’s probably the best choice. Newer versions of Parallax Occlusion and Cone Mapping offer the best visual quality. And for the cheapest methods, Parallax Mapping has a few additional instructions and a texture channel that is almost negligible these days.
In the following demo by Bruno Evangelista the following different methods are visualized:
As a rule, Parallax Mapping looks good on walls and floors. Any mesh with a relatively large surface area viewed from non-angled angles could be a suitable candidate for Parallax mapping. Parallax is well suited for gentle curves such as rocks. It is not very suitable for steep edges due to the steep curves.
Avoid sharp/steep edges and high frequency details in your Height Map. These can lead to texture stretching and rendering artifacts.
Use it sparingly and not on relatively large surfaces. Be especially careful when the edges of a mesh are visible. Parallax mapping does not extend beyond the visible edges of a mesh. This may look strange. You can extend your Parallax maps with the current geometry at the visible edges (e.g. stones at the corner of a building can use the actual geometry while the other stones can be created by Parallax mapping).
How to create Parallax Maps.
With CrazyBump you can generate a Parallax Map from a normal map:
CrazyBump can also generate a Parallax Map from a photo.