• 1/3

Everything You Always Wanted to Know About Normal Maps * But Were Afraid to Ask

Posted by jfyelle, 18 July 2011 5:00 pm

To each their own ways of computing normal maps. This partly explains the chaos in Universe.
Today, we'll try to shed the light over what distinguish games with perfect normal maps from... well, sub-standard normal maps.

Bump maps vs Normal maps

Bump maps are texture maps used as an height index (a monochrome value) for each texel.  Normal maps are more elaborated in the sense that they use 3 channels to specify a three dimensionnal vector per texel.  

Components doing normal calculations

What calculations are done with the vector information is a  source for confusion.

"There is no established standard for calculating normal maps."

In a DCC (Digital Content Creation - a clever name for 3ds Max, Maya, Softimage and the like), there are "3" areas where normal mapping are calculated. 

  1. The viewport (there are 2 in 3ds Max : the Nitrous viewport and the good old legacy D3D viewport)
  2. The renderer (scanline, MentalRay, QuickSilver, or any other available on 3ds Max (VRay, Krakatoa, Maxwell, etc.)
  3. The normal baking renderer. I differentiate this from the renderer because it actually imply a specific user workflow and scene setup. In 3ds Max, the scanline is used.

3 is between quotes because every viewport, renderer, baking renderer workflows have their dedicated normal mapping handling code. For anything to work, they MUST ALL BE ALIGNED : using the same algorithms.

The DCC is used to produce game assets (normal maps). This game engine MUST ALSO BE ALIGNED and use the same algorithms.

In the DCC,

  1. The scene is edited to produce the normal maps which are baked.
  2. The result may be visualized using the viewport or rendering
  3. The final product, the assets producedm are used in a game engine.

To work, all of these elements must use the same normal mapping algorithms.  Below, is a table comparing the calculations used for normal mapping in Maya/Mudbox and 3ds Max.  Only line 7 differ and is responsible for most discussions found around.

 

Now that introduction are made, anyone who need the gritty details may consult this

Normal mapping white paper

After reading, you will be able to properly setup 3ds Max to bake normal maps which will display perfectly right in 3ds Max and in your game engine, be it middleware or your own. 

The document was prepared by mr Christopher Diggins.  I need to thank him for he single handedly did the technical deepddive, the writing while securing alignment with everyone concerned with the viewport, renderer, etc. Many thanks goes to all the contributors who reviewed the document and provided their insights.

3Point shader 

The thumbnail of this blog post actually comes from 3Point's website.  They have been kind enough to guide us through our research in the last year.  I can attest that when it comes to normal maps, they know their stuff and you'll admit they do very nice 3D work!

Talking of which, they have this pretty awesome shader which works with the D3D viewport and works wonder. It comes in 2 sizes : pro and lite and in both cases, does provide normal map support that isn`t available in 3ds Max until version 2012 (see qualified mode in the white paper).

Nitrous Viewport

The Nitrous viewport currently supports the Mudbox/Maya "Gram-Schmidt orthonormalization" algorithm.  It is therefore incompatible with 3ds Max's scanline normal baking. Stay tuned, we're working on it.

1 Comment

Kristoffer Helander

Posted 2 December 2012 2:00 pm

Hi there, I have an important question regarding this statment:
"The Nitrous viewport currently supports the Mudbox/Maya "Gram-Schmidt orthonormalization" algorithm. It is therefore incompatible with 3ds Max's scanline normal baking. Stay tuned, we're working on it."

Is this fixed in 3ds Max 2013? I render out normal maps with scanline and they seem to view properly in the Nitrous viewport. But I would like to get it confirmed.

Add Your Comment

You must be logged in to post a comment.

Please only report comments that are spam or abusive.