|
|
(8 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
− | __NOTOC__
| + | #REDIRECT [[Parallax_Map]] |
− | * Return to [[Polycount|Main Page]]<br> Return to [[Category:Texturing]]
| + | |
− | | + | |
− | [[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 [http://www.crazybump.com CrazyBump] to generate a parallax map from a normal map:
| + | |
− | | + | |
− | # If necessary, grab the CrazyBump demo from www.crazybump.com | + | |
− | # Make sure that CrazyBump's axis orientation preferences are set correctly for your normal map.
| + | |
− | # Open your normal map in CrazyBump.
| + | |
− | # Make sure that "parallax displacement" is turned on in CrazyBump's preview window.
| + | |
− | # Select the "displacement" tab from CrazyBump's user interface.
| + | |
− | # Adjust the "displacement map" sliders until your model has the desired appearance.
| + | |
− | # If you notice shimmering artifacts, try increasing the "soften" slider.
| + | |
− | # You're all done! Save the displacement map, and use it for parallax in your game engine.
| + | |
− | # 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:
| + | |
− | | + | |
− | # Check out this here video: http://www.crazybump.com/video/
| + | |
− | | + | |
− | Method 3: Use 3ds Max ''Render To Texture'' to bake from high-poly geometry.
| + | |
− | | + | |
− | # Setup the projection for the low-poly model as usual.
| + | |
− | # In the NormalsMap element in the render to texture dialog activate the checkbox "render height map to alpha channel".
| + | |
− | # Return to [[Polycount|Main Page]]<br> Return to [[Category:Texturing]]
| + | |