Parallax map


 * Return to Main Page Return to

Anchor(WhatIsAParallaxMap)

What is a Parallax Map?
Parallax mapping is a technique for real-time approximation of displacement mapping.

Each pixel's texture coordinates are adjusted at render-time to create an illusion of depth as the viewer's eye moves across a scene.

The virtue of parallax mapping is efficiency. It is the cheapest real-time technique for displacement mapping.

The drawback is image quality. Parallax mapping doesn't look as nice as more expensive techniques such as "parallax occlusion mapping" and "relief mapping." Those techniques are similar to parallax mapping, but provide better image quality at a cost of additional texture lookups.

Parallax mapping uses a grayscale heightmap. Exactly where it goes will depend on your specific game engine, but it's pretty common to put it in the alpha channel of the normal map. Check the documentation for your engine to make sure.

TableOfContents

Anchor(Uses)

Uses
As a rule, parallax mapping looks good on walls and floors. Any mesh with a relatively large surface viewed from non-oblique angles could be a decent candidate for parallax mapping.

In your heightmap, try to avoid sharp/steep edges and tall high-frequency details. Those can cause texture-stretching and rendering artifacts.

Use sparingly on any surface that is not relatively large. Be especially careful where the edges of a mesh are visible. Parallax mapping doesn't extend past the visible edges of a mesh. That can look weird. You may want to augment your parallax map with actual geometry at visible edges. (eg. bricks on the corner of a building might use actual geometry while the other bricks can be created by parallax mapping.)

Anchor(HowToCreate)

How To Create
Method 1: Using CrazyBump to generate a parallax map from a normal map:


 * 1) If necessary, grab the CrazyBump demo from www.crazybump.com
 * 2) Make sure that CrazyBump's axis orientation preferences are set correctly for your normal map.
 * 3) Open your normal map in CrazyBump.
 * 4) Make sure that "parallax displacement" is turned on in CrazyBump's preview window.
 * 5) Select the "displacement" tab from CrazyBump's user interface.
 * 6) Adjust the "displacement map" sliders until your model has the desired appearance.
 * 7) If you notice shimmering artifacts, try increasing the "soften" slider.
 * 8) You're all done! Save the displacement map, and use it for parallax in your game engine.
 * 9) If your engine expects height in the alpha channel of the normal map, CrazyBump has a toggle for that on the preferences page. Just turn on the setting, open your normal map, and re-save it.

Method 2: Using CrazyBump to generate a parallax map from a photograph:


 * 1) Check out this here video: http://www.crazybump.com/video/

Method 3: Use 3ds Max Render To Texture to bake from high-poly geometry.


 * 1) Setup the projection for the low-poly model as usual.
 * 2) In the NormalsMap element in the render to texture dialog activate the checkbox "render height map to alpha channel".
 * 3) Return to Main Page Return to