Difference between revisions of "DuDv map"

From polycount
Jump to: navigation, search
(CategoryTextureTypes)
Line 17: Line 17:
 
== [[DuDv]] Tools ==
 
== [[DuDv]] Tools ==
  
* [http://developer.nvidia.com/object/photoshop_dds_plugins.html Normal Map filter for Photoshop] by NVIDIA
+
* [http://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop Normal Map filter for Photoshop] by NVIDIA
 
* [http://developer.valvesoftware.com/wiki/TGAtoDUDV TGAtoDUDV] by Valve Software
 
* [http://developer.valvesoftware.com/wiki/TGAtoDUDV TGAtoDUDV] by Valve Software
 
* [http://www.renderingsystems.com/support/showthread.php?tid=3 ShaderMap] ($) by Rendering Systems
 
* [http://www.renderingsystems.com/support/showthread.php?tid=3 ShaderMap] ($) by Rendering Systems

Revision as of 07:55, 6 April 2011

DuDv Map

DuDv is a simple way to use one texture to distort the pixels of another texture. Common uses are the heat haze above a fire, ripples refracting what's under the water, thick wavy glass distorting what's behind it, etc.

A DuDv map is similar to a normal map in that it stores directional information in a texture, except mostly just the Red and Green channels are used, so the bitmap has a red/yellow/green look. A DuDv map is actually a derivative of a NormalMap, and can easily be created with a variety of tools. It's usually best to blur the texture before converting it, to reduce the "jaggedness" of the distortion effect.

DuDv works in similar way to how a ParallaxMap distorts a surface, except DuDv doesn't take the viewing angle into consideration (no parallax) it just shifts the pixels of the reflection map before it's applied onto the mesh. The method is basically fetching Du and Dv from the DuDv map, then for every pixel in the reflection map, adding Du to the reflection map's U texture coordinate and adding Dv to its V coordinate, which then offsets the reflection map pixels, creating the distortion.

The texture that's being distorted by the DuDv map is usually either a pre-created reflection map (like a Cube Map), or better yet a real-time rendered framebuffer of the rest of the scene. To do the latter, a special render is set up for each frame by rendering just what is going to be reflected or refracted. To save on render time often the scene is set to its lowest LOD for this special render and non-essential meshes are excluded. The rendered image is projected onto the surface from the camera's point of view, then the DuDv texture is used to distort it.

DuDv Tools

.1. Start with a NormalMap.
.2. Image->Adjustments->Invert (Photoshop) or Colors->Negative Image (PaintShop Pro).
.3. Image->Adjustments->Brightness&Contrast (Photoshop) or Colors->Adjust->Brightness/Contrast (PaintShop Pro). Raise the contrast as high as it will go. 

Personal tools
Namespaces

Variants
Actions
Navigation
Tools