Tangent normal map baking and 90 degree angles

Hello all :smiley:

I am currently making models for a game and I’m making high poly models and then baking them onto low poly ones. The problem I am having is in situations similar to the one shown below.

No matter what I do I can’t get it to work properly. A black line always appears along the edge when the low poly model is rendered. :confused:
I have tried setting the models to smooth as well as solid without much luck.
Beveling the edge once on the low poly model does solve the problem. However the goal is to cut down on polygons as much as possible, so I would like to avoid this solution if possible. Anyone have any ideas? I read on another thread that using 90 degree angles for this kind of thing can cause problems?

Setting it Smooth must be done on low and high poly. Low poly needs to be below the high ploy surface I think. And, the way you make the UV mesh can affect the corner as well; try Unwrap (smart projections).

Yeah, the dark lines will disappear when you use a proper low poly model and not just the subsurf control cage. If you don’t care about topology, try using Decimate on the high poly mesh - it works most of the time. If you do, I suggest doing a full retopo, placing vertices on the surface of the high-poly mesh.

Both models must be smooth. Make sure that you have a margin for the baking (the default of 2 pixels should be fine), and that the margin is respected by your UV layout (i.e. don’t have two unrelated edges closer than twice the margin). Unless there are multiple high-poly surfaces in the vicinity, it doesn’t matter whether the low-poly surface is inside or outside; it uses the normals from the nearest high-poly surface in either direction (if necessary you can tweak that with the bias). 90 degree angles shouldn’t actually cause problems, but they may reveal more clearly problems that were there anyway.

Here’s a high-poly cube, and the corresponding low-poly cage with baked normals:




The nearest edge to the camera is a seam, but there’s no black line.

Best wishes,
Matthew

I had that problem before. Most of the time i fixed it by removing all uv-seams before baking.

Thanks for the replies everyone!

Setting both of the models to smooth does fix the problem with the edges, however it causes the following problem. This is part of the normal map for a cube, similar MCollett’s one.


This should be flat, but there is now a bit of a gradient going on. :spin: The one in your render looks good though MCollett, and doesn’t seem to have this. What version of blender is it made on? I’m using version 2.49b. Is it using tangent space?
Again, thanks for the advice everybody.

No, it shouldn’t be flat; the gradient is correct, and cancels some of the effect of smoothing the low-poly mesh. My (tangent space) normal map has exactly the same feature. I used 2.55, but 2.49 behaves the same way in this regard.

Best wishes,
Matthew

Ah, I see now.
Thanks for your help and for clearing that up. :yes:
It seems to be working.

Thanks to the other people that replied too.