Help with artifacts in baking normal map

Discussions about MakeHuman, Blender and MPFB. It is ok to ask for general Blender support here, even if it isn't directly related to MakeHuman

Help with artifacts in baking normal map

Postby joepal » Wed Apr 27, 2022 3:02 pm

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
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am

Re: Help with artifacts in baking normal map

Postby wolgade » Sun May 08, 2022 8:18 am

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.
wolgade
 
Posts: 795
Joined: Wed Jan 30, 2013 6:50 pm

Re: Help with artifacts in baking normal map

Postby joepal » Sun May 08, 2022 3:36 pm

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.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am

Re: Help with artifacts in baking normal map

Postby Mindfront » Sun May 08, 2022 10:29 pm

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.
Mindfront
 
Posts: 228
Joined: Thu Jun 23, 2016 9:20 pm
Location: Sweden

Re: Help with artifacts in baking normal map

Postby wolgade » Mon May 09, 2022 1:29 pm

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".
wolgade
 
Posts: 795
Joined: Wed Jan 30, 2013 6:50 pm

Re: Help with artifacts in baking normal map

Postby joepal » Mon May 09, 2022 1:44 pm

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
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am

Re: Help with artifacts in baking normal map

Postby wolgade » Tue May 10, 2022 11:02 am

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.
wolgade
 
Posts: 795
Joined: Wed Jan 30, 2013 6:50 pm

Re: Help with artifacts in baking normal map

Postby joepal » Sun May 15, 2022 3:45 pm

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
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am


Return to Blender and MPFB

Who is online

Users browsing this forum: No registered users and 1 guest