Some normal map tricks

I do promise this will be my last post about normal maps for today, as I finally got them to work as I wanted.

Due to the way MS has written their shaders, some special care is needed when constructing your normal map texture. If you just use the plugins that are made for it, the shading of your object will be wrong in FS. So take these steps to get the correct result:

  1. First make sure you have a bump map for your texture
  2. Convert it into a normal map with the plugin
  3. Copy the content of the red channel to the alpha channel
  4. Make the red channel black
  5. Invert the green channel
  6. Make the blue channel white

Now you can use your normal map, simple add it under the bump map slot of your material and save the DDS as DXT5. It is important to use DXT5 as it has an 8 bit alpha channel and also keeps the quality of the green channel quite good during compressing. So this will mean the compression does not hurt your bump map too much.

So it means a little work when making your normal map, but I can understand why MS made the shader like this. It ensures we can use compressed textures, without the quality of the bump map being reduced a lot.


One thought on “Some normal map tricks

  1. Thanks for that overview, Arno. I haven’t played much yet with normal maps, but I’m about to delve into it. The process you’ve outlined above sounds like an excellent candidate for a Photoshop action.

Leave a Reply

Your email address will not be published. Required fields are marked *