Black spots in a normal map in Blender

Recommended Posts

I baked the normals of a high poly model to a low poly one, but I'm having some problem with it. The map have some orange and gree colored spots, which look black in the model. This never happened before, and I'm not sure what caused it, or how to fix it. Any ideas? What can I do?

This is a rezised version of the results, I had to scale it down to upload here.

This is how it looks on the low poly, these are the most problematic areas.

Share this post

Link to post

Share on other sites

Those artifacts are caused by missed rays. Baking works by drawing rays along the normal of a face of the low poly mesh. Where it intersects with the high poly is how it knows what to bake. So what's happening is your high poly mesh is either outside the the low poly, or beyond a certain distance threshold (called 'ray distance' in most baking systems).

I've never baked in blender, so I don't know what options you have to work with. If there's a 'ray distance' option, then increase it incrementally until those spots go away. Be careful not to go too far, as too long a ray distance can have different issues. If you don't have such an option, then you just need to make sure your low poly mesh is fully outside the high poly.

Hope that helps. Maybe a blender guru will be able to tell you exactly which options to use, but that's the theory behind it.

Share this post

Link to post

Share on other sites

I tried both things, increasing the distance and having the low poly completely outside of the high poly. None of them worked. While increasing the distance seemed to have no effect making the low poly bigger made the normal map to look even worst, with some rounded shapes and blank spaces.

I tried enabling the Double Sided option for the normals too and it didn't helped. I have no idea what to do, I made pretty much the same thing on a different low poly version (that I did the retopology on Zbrush' zremesher) and it worked just fine.

Little edit, just tried to do this on Maya, and got pretty much the same issue.

Share this post

Link to post

Share on other sites

If that doesn't help, then what Dain said above - you definitely don't want overlapping UVs. The other likely culprit, looking at your images, is that your Low Poly mesh is intersecting with itself in those folds. Any kind of overlap, be it UVs or faces, is going to cause problems.

Share this post

Link to post

Share on other sites

If that doesn't help, then what Dain said above - you definitely don't want overlapping UVs.

The other likely culprit, looking at your images, is that your Low Poly mesh is intersecting with itself in those folds

. Any kind of overlap, be it UVs or faces, is going to cause problems.

I'd put my money on that one. Overlapping UV's or geometry are a nightmare for baking textures, but if you project a high poly onto a low poly object, that shouldn't be an issue. The ray should pick up the first geometry it hits, so that's always just one.

Look at the picture below, the lower (intersecting) geometry is projected onto the upper plane, which shows the resulting normal map

Share this post

Link to post

Share on other sites

I checked the UVs and there seems to be no problem or overlapping on it. When I tried to edit my mesh in a way that parts of the low poly won't be covered by the high poly I still get problematic results, the same with changing the distance and bias.

I downloaded XNormals, watched a tutorial on it and tried it out. The results are different, but they too are not good. I edited the cage too and I still got problems.

I'm going to try importing the model again into Blender, see if I did anything wrong while exporting it from Maya.

Share this post

Link to post

Share on other sites

This is how the UV looks if I increase the distance or edit my Low poly so it will be completely outside:

This is how the Low and High poly models looks together. I can see clearly the high poly, in red, is covering much of the low poly, yet a lot of areas hidden are not problematic, and look just fine, so I'm not sure if this is really the reason while I'm getting these artifacts.

Share this post

Link to post

Share on other sites

I don't know how Blender "does it", but in 3ds Max missed rays are represented by bright red. Your picture shows "strange colours", at least strange for a normal map. Maybe some rays hit your high poly model from the wrong side, resulting in negative normals with matching colours. I can imagine something like that with all the creases and folds.

Share this post

Link to post

Share on other sites

While checking the normals I saw this on the high poly model. I'm not sure if this is how it is supposed to look, but there are some normals pointing towards the inside of the model, and their locations more or less matches the areas in different colors in the normal map.

How can I fix this? Recalculating or flipping directions is not doing the trick.

Share this post

Link to post

Share on other sites

I am pretty sure that is your issue. Unfortunately I can't help with any Blender specifics, but now that you have the probable cause, I'm sure some Blender veteran can show you how to unify the normals.

Share this post

Link to post

Share on other sites

While checking the normals I saw this on the high poly model. I'm not sure if this is how it is supposed to look, but there are some normals pointing towards the inside of the model, and their locations more or less matches the areas in different colors in the normal map.

How can I fix this? Recalculating or flipping directions is not doing the trick.

I don't think that there is anything wrong with the normals to fix, it looks like its the geometry that is a the problem. Your high poly mesh appears to have some of the folds folding back on itself and also intersecting faces.

Add to that that that your low poly and high poly are intersecting as well means that sometimes the "rays" from the low poly mesh will be meeting the back faces of the high poly first, which is like the ray detecting faces with flipped normals which can sometimes cause messed up colours being saved.

Because of the complexity of the high poly mesh editing the Bias and Dist values in the Blender Normal baking menu will not really help.

Share this post

Link to post

Share on other sites

That was my first thought, but as I said, if the (cage of the) low poly model is completely outside of the high poly model, the first geometry a ray would hit would have a correct normal, facing outwards. If that's the case and Blender still picks the geometry behind it, there is a serious issue with the program I'd say.

If it's not the case afterall, the only thing I can think of are tolerance settings like you pointed out.

My first move would be to make sure the cage is really 100% outside of the high poly model.

Share this post

Link to post

Share on other sites

I edited the cage on Xnormals, and if I increase the cage's size in order for it to be ouside the high poly I get similar issues as when I increase the distance while baking it on Blender. Its either got the orange/green spots or the weird rounded shapes, it's like there is no in between.