Difference between revisions of "DuDv map"

From polycount
Jump to: navigation, search
(Talk)
 
(WikiName)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
* Return to [[Polycount|Main Page]]<br> Return to [[Category:Texturing]]
+
<!-- ## page was renamed from [[DuDv]] Map -->
 +
= [[DuDv]] Map =
  
== What is a [[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.
  
DuDv is a simple way to distort the pixels of a reflection map, similar to the way a parallax map distorts a surface, except DuDv doesn't take the viewing angle into consideration (no parallax) it just uses the DuDv map to shift the pixels of the reflection map before it's applied onto the mesh. The method is basically fetching Du and Dv from a texture, then adding Du to U and Dv to V for every pixel, offsetting the reflection map pixels.
+
{| border="1" cellpadding="2" cellspacing="0"
 +
|-
 +
|}
  
A DuDv map is similar to a [[Normal Map]] in that it stores directional information in a texture, so the bitmap has a strange greenish-purplish look.
+
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 [[Normal Map]], 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.  
  
For more information, do an internet search for ''Environment Mapped Bump Mapping''.
+
DuDv works in similar way to how a [[Parallax Map]] 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.
  
* Return to [[Polycount|Main Page]]<br> Return to [[Category:Texturing]]
+
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 ==
 +
 
 +
* [http://developer.nvidia.com/object/photoshop_dds_plugins.html Normal Map filter for Photoshop] by NVIDIA
 +
* [http://developer.valvesoftware.com/wiki/TGAtoDUDV TGAtoDUDV] by Valve Software
 +
* [http://www.renderingsystems.com/support/showthread.php?tid=3 ShaderMap] ($) by Rendering Systems
 +
* DuDv maps can be manually created in Photoshop or PaintShop Pro:
 +
.1. Start with a [[Normal Map]].
 +
.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.
 +
 
 +
----
 +
[[Category:Texturing]] [[Category:BumpMap]]

Revision as of 16:43, 5 July 2010

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 Normal Map, 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 Parallax Map 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 Normal Map.
.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