Page 1 of 1

Help with artifacts in baking normal map

PostPosted: Wed Apr 27, 2022 3:02 pm
by joepal
So I'm trying to bake a normal map from a sculpt. But the end results looks weird. Trying to debug this, I've cooked it down to a plain human character with a multires modifier. No sculpting whatsoever done to it. When baking from multires I still get a normal map with bumpiness:

bake_normal_1.png


Since I haven't touched the original mesh outside adding a multires modifier to it, I would have expected the end result to be a completely smooth normal map?

So, any one got an idea as to what I've done wrong?

The multires modifier:

bake_normal_2.png


The bake settings:

bake_normal_3.png

Re: Help with artifacts in baking normal map

PostPosted: Sun May 08, 2022 8:18 am
by wolgade
joepal wrote:No sculpting whatsoever done to it. When baking from multires I still get a normal map with bumpiness:

You expected the normal map to be of solid colour, right?

If the subdivisions are done by Catmull-Clark, you always get some "sculpting". Catmull-Clark usually changes the position of EVERY vertex and this might be reflected in the normal map.

Re: Help with artifacts in baking normal map

PostPosted: Sun May 08, 2022 3:36 pm
by joepal
What I don't get is how people then get a clean normal map from sculpting on a low-res object with a multiresolution modifier. Even if I use "simple" subdivide, these artifacts appear in several areas.

Re: Help with artifacts in baking normal map

PostPosted: Sun May 08, 2022 10:29 pm
by Mindfront
Såg inte den här tråden förrän nu. Som Wolgade skrev, i ditt fall bakas skillnaden mellan subdivideringen till "Level Viewport" vilket orsakar det här fenomet. Om du sätter "Level Viewport" till två kommer bakningen bli enfärgad men samtidigt kommer inte någon skulptering heller bakas. Har inte bakat annat än bump till normaler i nyare Blender, det här problemet måste inspekteras närmare. Ska göra några experiment i veckan och se om jag kommer fram till något vettigt.

Re: Help with artifacts in baking normal map

PostPosted: Mon May 09, 2022 1:29 pm
by wolgade
I've no idea what Mindfront told you. So this might be redundant.

I played around with the Multiresolution Modifier. I remembered vaguely that there was an issue with baking normal maps on subsurf level 0 years ago, but this seems to be solved.

For my experiments I used a simple cube. I got exactly the same artifacts as you until I switched the object to "Smooth Shading". With "Smooth Shading" all artifacts were gone.

In real world there is no such thing as a sharp edge. Not even the blades of my kitchen knifes are sharp edged if you look close enough. From Blender's point of view a sharp edge can't have a normal vector. You could interpolate the normals of adjacent faces, but if you do so, the edge is no longer sharp. Conclusion: Normal baking doesn't make much sense with "Flat Shading".

Re: Help with artifacts in baking normal map

PostPosted: Mon May 09, 2022 1:44 pm
by joepal
Yes, I found the smooth shading thingy when googling for the problem. But the humans are already in smooth shade mode.

Amusingly enough, baking a displacement map works fine with exactly the same settings. Only thing I change is the "bake type" drop down to "displacement".

bake_normal_4.png
Plain human with sculpted detail


bake_normal_5.png
Result of baking a normal map


bake_normal_6.png
Result of baking a displacement map

Re: Help with artifacts in baking normal map

PostPosted: Tue May 10, 2022 11:02 am
by wolgade
joepal wrote:Amusingly enough, baking a displacement map works fine with exactly the same settings. Only thing I change is the "bake type" drop down to "displacement".

Displacement affects vertices, normal maps affect the visual appearance of faces. This might be a reason.

Re: Help with artifacts in baking normal map

PostPosted: Sun May 15, 2022 3:45 pm
by joepal
Well, some progress finally. With some brute force testing and basically trying to combine every possible setting, I've found that the following procedure works:

* Apply all shape keys
* Remove all modifiers
* make a copy to work as target
* Create a material with an empty image on the target
* apply a multires modifier to both the sculpt origin and the bake target, with the same number of subdivisions. DO NOT lower the viewport subdivision setting on each
* bake active to selected, with extrusion and ray distance set (see below)

There are still some artifacts left, but from what I gather they are more or less unavoidable with a mesh looking like this and blender's bake calculation. But at least they're trivial to touch up once the rest of the normal map is in place.

bake_normal_7.png
Sculpted basemesh


bake_normal_8.png
Bake settings


bake_normal_9.jpg
Resulting normal