Understanding the correctness of the Normal map

Hi everyone,
I’m no expert, so I’m relying on you to better understand some things I’m not clear on.
I’m baking the Normal map of a scene with two separate objects (I created two test objects to better understand the concept).
I created low- and high-deploy versions of each object to bake the Normal map.
Now, however, I don’t know the meaning of the colors appearing on the baked map, so I can’t tell if the map is correct or not.
For example, if I leave the Extrusion value at 0, it gives a certain result (see attached image 1).
If I set it to 0.1, it changes (see attached image 2).
How high should I set the extrusion value, and more specifically, as a general rule, how do I know if a normal map is correct? What do the different colors in the Normal mean?

Thanks for your help!


So, looking at the manual here: https://docs.blender.org/manual/en/latest/render/cycles/baking.html
The normals are baked by tracing from the selected object inwards towards the active object. The extrude value adds a fixed offset to make sure you get a correct (not backfacing) interpolation.

Generally, normals are a purplish colour (look up PBR textures online for reference). Image 1) looks very wrong, 2) much better but still has a couple of elements that look inverted. I would up the extrusion even more.

Hi, I tried setting the Extrusion value to 0.2, but I don’t understand the concept behind interpreting the colors. Purple is fine, but what about the other colors? The manual doesn’t mention how to interpret the baked Normal texture.

At the points highlighted in the image below, the color area changes, compared to images 1 and 2, based on the Extrusion value, also because the mesh creates a sort of hollow in the object at those points. How do I know if the Extrusion value is too high or too low?

So, normal maps use colours to represent the values of the normal vector. Red corresponds to (local) left-right, green to up-down, blue to entering-exiting the surface. Absence of blue means the normal is pointing into the surface, i.e. you are looking at the surface from behind. You might want to look at https://en.wikipedia.org/wiki/Normal_mapping#Calculation for some examples.

The extrusion value is enough when the normals are accurate (non backfacing, i.e. contain a non-negative value in the blue). This requires all parts of the low-quality mesh, after extrusion, are outside of the high-quality mesh. It’s hard to go to high, you need to have more than the distance between the active mesh and the part of the selected mesh locally above it.

Looking closely at the meshes, are you baking the wrong way around? Could you show just the high poly mesh you are baking from? The resulting normals look suspiciously flat (little variation), but it’s hard to tell.

I’m attaching the file so we can do it faster and you can check better.
Test-Model.blend (2.8 MB)

Were you able to check the model? What value should I set for Extrusion?

Sorry, was AFK for a bit.
Tl,dr, 15 mm works great. Here’s how I figured it out:

0 mm has clear back-facing areas:


You can check this mathematically with the “Sample Line” Tool (sidebar > scopes). Note the difference in blue channel content across the dotted line:
image
10mm still has some areas on the edges that look suspicious, and low and behold the histogram reveals a problematic section:

15mm looks fine (note there is a dip in blue content, but it doesn’t suddenly drop to zero. Variations are expected, because otherwise there would be no point in having a texture):

Obviously I haven’t just looked at a single point in the image, you want to check around until stuff looks reasonable.

Sorry, I can’t find the Sample Line tool. Can you show me a screenshot?


Image tab sidebar, open with “n”

I don’t have that “Scope” menu, how do I activate it from the Preferences?

Try here:

https://docs.blender.org/manual/en/4.5/editors/image/sidebar.html

OK, thanks, now I figured out how to enable the menu.
So, going back to the test, in the baked Normal map image, the Blue value, in every area, should never drop to zero for it to be correct.
And so during the bake phase, the Extrusion value should be as small as possible, but not zero. Or am I wrong?

Hi…glad to help on menu.
You’ll have to wait for @SFN to get back to you on the rest :sweat_smile:
I came to this thread to learn about this, not knowing about normal maps other than them being included in downloaded materials :grimacing:
Awaiting for more on this also.

Hi, We are waiting @SFN :grinning:

Sorry, did this sleep thing.
Yes, you are correct, Extrusion value should be as small as works.
About the blue channel, it would be more accurate to specify it shouldn’t drop below zero (giving you a normal that faces into, not out of, the surface) - but neither your screen nor the histogram show negative values.

Don’t worry, I do that sleep thing sometimes too… :smile:
Thanks so much for your help, now I think I have a better understanding of what it means to bake a proper Normal map.