Jump to content
Sign in to follow this  
LisaMarie McWinnie

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?

drawstringnormals.png

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

normalblack.png

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

normalblackdetail.png

normalblackdetail2.png

normalblackhigh.png

The high poly model.

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

Hi, thanks for the suggestion!

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

What ou see here is a claasic.

The artifacts are comming from intersecting surfaces,

 

I bet when you look at the unwrapped UV map, you will find overlapping faces. Correct those and the problem will be gone.

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


IvanBenjammin wrote:

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

Normals.jpg

 

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:

normalblack2.png

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.

normalblack3.png

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.

normalblack4.png

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

Ok that eplains it

 

Well in this case.

In Edit mode: Select all faces

Then goto Mesh --> Normals --> Recalculate Outside

Or Press CTRL+N

This should correct the facing of the normals. Also check if in the lowpoly all the face - normals  point outwards also.

 

Share this post


Link to post
Share on other sites

hi :)


LisaMarie McWinnie wrote:

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.

Correct Normals.png

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.

Have a look at this link:  http://joeyspijkers.com/t_normalmapping.html       about halfway down the page is a good explanation of what varying those 2 parameters does.

 

 

 

 

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

Took me forever to reply, RL getting really busy, my bad!

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.

Share this post


Link to post
Share on other sites

As I said the colours look like inverted normals, either produced by the low poly or high poly object while baking.

I can't be of any help I'm afraid, without Blender. I wouldn't be surprised if it's something as simple as a baking setting.

Good luck, I hope you'll get it figured out.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...