Why is the normal map baked incorrectly for an object with other normal map in the shader?

Wanted to bake a normal map using a secondary baking plane from another complex object with shader. However, I discovered that when using a material with a different normal map on the original object, the baked new normal map would get the wrong colors (see at left lower corner of picture).
It looks like it is somehow mixed with the old normal map from cube. Why? These separated objects have different shaders.

I made a VERY SIMPLIFIED test scene, like in the attached picture:

The cube is approximately twice smaller than the baking plane, and one side is located parallel to the plane. Each face of the cube has a normal map NormalTest.png applied to it (you can use for cube any other normal map or Magic Texture node, etc).

I expected that the resulting baked normal map would have the correct appearance - zero normal color and a small convex element in the center with identical colors. However, the baked normal map ended up with the wrong color!

I tried specifying the ColorSpace as both sRGB and Non-Color in the shader settings, but the baked map always ended up with the wrong color in the middle. If you remove the normal map from the cube, the new baked normal map will be correct (blue-purple uniform normal color).

Please tell me what could be the reason and how to fix it?

This is a very simple scene and even it doesn’t bake correctly. In other scenes I use much more complex objects with complex shaders.

I set up as close as what you showed ( visible)…
And it works fine…
Normal Baked with 10 samples, no Denoise…set extrusion to .2 in selected to active…

I just connected Normal Map to inputs after Bake…

@RSEhlers what material do you have assigned to the cube? Possibly the same one.
As I indicated in the initial question, this is a very simplified scene to test the case when an object had one material with Bump (or Normal) node, and the auxiliary plane had a completely different one (only for baking the normal map).

I have complex objects with materials that use procedural textures to generate relief/displacements. Here is an example of such a scene, through the auxiliary plane the normal map was baked with the wrong yellow color:

If remove Bump (or Normal) node from object’s material, the result normal map is baked correctly (I added this case in the picture). But I need the surface of objects to have relief/displacements and other irregularities in order to get realistic normal map.

But your answer helped to find one of the solutions:
Use Displacement node instead of Bump node.
And don’t use Bump node in material at all in case of baking result normal.

This is certainly not the behavior I expected from Blender with Bump node, but at least the variant with Displacement node works correctly:

Not sure if this is what you want,
I have a cube similar to yours with a normal map (I turned up the strength so you can see it better.)
I inset-ed the face of the cube twice and shifted the center face back to make a dip.

The cube looks like this (without the normal map)

The cubes material looks like this;

The planes material (to bake to) looks like this;

Result, is this (colours OK), I get the normals of the normal map and the cube’s dip.

A side not, you should set the image nodes to non colour for normals, (but that is not what your problem is)

Edit;
Ok I think I found what is happening to you, If I rotate the plane on the x axis so the normals (face orientation - blue faces the cube I get the same as you. (inverted normals)

You just need to turn the plane around.

Sorry @DNorman, the auxiliary plane is oriented with the correct side. I think the problem is something else.

I’m upload a test scene and a normal texture in zip-archive.

If you disable the Bump node output, the normal map will be baked correctly, but without the necessary details. If you enable the Bump node, the colors of the baked normal map with details will be incorrect. If you use the Normal map node instead Bump node, the colors on baked normal map will be different, but also incorrect.

May be some one find cause wrong baking.
TestNormalBake.zip (117.4 KB)

Why are you doing this?

It should be like this (and will bake OK)

(sorry I did not notice that in your first screenshot)

@DNorman nice! You saved my week!
I thought that the problem had an obvious solution, but I did not consider this option of using Normal map node.
Thank you very much!

1 Like

Yes, I should have studied your screenshots more, you need the normal map node to interpret normal maps (you can not just plug them into a “normal” input.)

It would have worked like this too;

Edit I forgot to set the image to “none colour” have corrected! That bit is important too, if not it gets colour corrected by colour management.