Moderator elections are being held. See Valve Developer Community:Moderator elections for more details.
Users who would like to run for moderator must be autoconfirmed and have at least 100 edits. Users can check their own edit count at Special:Preferences.

Du/dv map

From Valve Developer Community
(Redirected from Du/dv maps)
Jump to: navigation, search
Note.pngNote:$dudvmap is now defunct and is replaced by the Refract shader. Though, the Water shader still uses a du/dv map for $bumpmap.

du/dv maps are used for DirectX 8 refractions. If you're a Photoshop user, it's easy to create du/dv maps using nVidia's texture tools.

Creating a du/dv map from a normal map

A du/dv map can be easily created from a normal map in just two steps. You can also do this if you don't want to bother with the nVidia tools.

Note.pngNote:Work from the source texture (such as a .tga) if possible.

Photoshop

  1. Open the normal map and invert the colours (Image > Adjustments > Invert or Ctrl+I).
  2. Go to Colors > Adjust > Brightness/Contrast.
    1. Check "Use Legacy"
    2. Set Brightness to -17
    3. Set Contrast to 100

Paint Shop Pro

  1. Open the normal map and invert the colours (Colors > Negative Image).
  2. Adjust the contrast as high as it will go.

You now have a finished du/dv map. When converting to a VTF, set the format to UV88.

See also