2
$\begingroup$

I'm experimenting with baking normal maps. In my setup I've used the default cube with some notches cut out along the edges for the high resolution object (cube-high-res), and the default cube without any changes as the low resolution target (cube-low-res1). Things were going fine, but at some point I think I must have changed something on cube-low-res1, whatever it was it started messing up the normal map result. I brought in a new default cube (cube-low-res2) as the new target and the normal map produced good results again. To find out what happened I checked everything I could between cube-low-res1 and cube-low-res2 and found no differences in them. So my question is why are the normal maps generated between then different, did something happen to cube-low-res1 that is causing the difference or is it something else?

Here is a screenshot of my 3D Viewport and object hierarchy.

Viewport showing cubes

The objects shown from left to right are cube-high-res, cube-low-res1 and cube-low-res2. There is also a cage object (hidden from view) which is another default cube that is scaled by 1.01 on each axis and shares an origin with cube-high-res. Now, if I in turn bring in cube-low-res1 and cube-low-res2 and bake their normal map in the Scene properties (with Cycles), I get the following two different results.

Comparison of normal maps

The left image is the result of baking on to cube-low-res1 which is the messed up result. The right image is the result of baking on to cube-low-res2, this result seems to be a good normal map.

To ensure alignment while doing the baking I've set the origin on cube-low-res1 and cube-low-res2 by choosing Set Origin > Origin to Geometry, I make them coincide with cube-high-res by opening the Snap Menu (shift+S) and choosing Selection to Cursor, like shown here

Moving cube to cursor

I've done the following checks between cube-low-res1 and cube-low-res2 to determine what can be wrong.

  • Both object have the same vertices (8), edges (12) and faces (6). And they have the same dimensions (2x2x2m). I.e. they are both the default cube.
  • Rotation and scale have been applied to both objects.
  • I've recalculated the normals on both objects.
  • I've UV unwrapped both objects in the same way. I.e. using Smart UV project with an island margin of 0.09.
  • All seams have been cleared
  • Both objects use the same material, and therefore also use the same Image Texture node in the Shader Editor
  • The Bake settings are the same, I've set these to Bake Type: Normal, Selected to Active: checked, Cage: checked and set to cage object, Extrusion: 0.1m

The Blender version is 2.82a

$\endgroup$
  • $\begingroup$ Hello :). Since it's a really simple scene, consider sharing the .blend. $\endgroup$ – Jachym Michal May 6 at 14:46
  • $\begingroup$ That's a good tip, thanks! I added the file :-) $\endgroup$ – Rob Hoff May 6 at 15:04
3
+50
$\begingroup$

The two lowres cubes are not the same. You may have rotated them or changed the vertices in Edit mode somehow... Here are the vertices IDs shown using the MeasureIt Addon (also possible by enabling developer mode in settings somehow).

enter image description here

Also the UV unwrap are not the same either for probably the same reason. If you split the seemingly same quad face into two triangles, they appear at different positions in the UV, meaning the quad faces are in different orientations to begin with.

enter image description here enter image description here

Finally, simply duplicating the first lowres and baking the texture with the dup produces the same result as its source.


In essence, you have to add proper UV's to your low-res geometry to avoid artefacts and you have to make sure that the dimensions of both geometries are roughly the same, then it will bake fine:

enter image description here

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ Few seconds too late... so I added my result and the blend to your answer, hope that's fine @bruno $\endgroup$ – brockmann May 9 at 9:44
  • $\begingroup$ Good answer thanks, I didn't know about vertex IDs! I also discovered if I rotate the cage in the same way as cube-low-res1 then it will bake a good normal map $\endgroup$ – Rob Hoff May 9 at 12:57
  • $\begingroup$ Excellent @brockmann, thanks. $\endgroup$ – Bruno May 9 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.