2
$\begingroup$

Forgive me if this is common knowledge, but I'm new to this, and a tad stuck.

It seems as if my normal map edges are not connecting properly. It's as if it's not flowing into each other at the edges, some parts of the texture at the edges are repeated, and there are those nasty seams where the edges collide. I went through numerous forum posts and a lot of them say the same stuff. Would appreciate any help! :)

This is a high poly bake onto a low poly mesh. My image texture color space is set to non-color. The resolution is 2048x2048

Problem

Tried again from scratch, and still sitting with the same problem with the edges. Reduced the high poly's faces by half to upload it under 30mb if you want to take a look. Thank you. :)

enter image description here

They flow together much better after Markus' video suggestion:
youtube.com/watch?v=ciXTyOOnBZQ&t=212s

$\endgroup$
6
  • $\begingroup$ Maybe your UV mapping is repeated? Maybe you modified your mesh and need to UV map again? $\endgroup$ Sep 13, 2021 at 19:31
  • $\begingroup$ @MarkusvonBroady This did not fix the problem. I even tried starting all over. $\endgroup$
    – Lunathrael
    Sep 13, 2021 at 22:20
  • $\begingroup$ In UV editing / Texture painting open your normal image and from Image menu choose Pack, then save as..., in settings choose "compressed" and upload here: blend-exchange.com $\endgroup$ Sep 13, 2021 at 22:35
  • $\begingroup$ @MarkusvonBroady I uploaded the .blend file. Thank you. ^^ $\endgroup$
    – Lunathrael
    Sep 13, 2021 at 23:12
  • $\begingroup$ I didn't notice any offset as on your screenshot in the file, but if you just mean the very sharp edges, perhaps your problem is described here: youtube.com/watch?v=ciXTyOOnBZQ&t=212s $\endgroup$ Sep 14, 2021 at 9:40

1 Answer 1

3
$\begingroup$

Shade smooth before baking and use normals on smoothly shaded object - you want both high poly and low poly to have a smooth, gradual transition when baking normals in tangent space. Just like in subtraction, changing any term by a lot changes the result by a lot, Changing the base normal by a lot also changes the resulting tangent normal (relative to the base) by a lot. This means as an underlying low poly angle changes abruptly on edges, so does the resulting baked normal in tangent space.

Representing the problem in 2D:

The red and green lines are two low poly edges. Curve below is a high poly geometry, cyan part associated with the red edge, and pink part associated with the green edge. The background is the baked normal in tangent space: for clarity it's just one-dimensional: 50% gray means no change to the normal; brighter means turning right; darker means turning left. As you can see, even though the high poly normal has no hard edge, the hard edge of the underlying low poly results in a sudden color change of normal data in tangent space. On the image above, this is however not a problem, because when drawing the image, I made sure the white-to-black change is aligned to pixels:

However, what happens if we scale this image down by 10%?

Now the color of the middle column is gray, because some of its width belongs to the left side, and the rest to the right side. Therefore the color is the interpolation of both values, which in this case fails spectacularly: one may think it smoothens the normals, but what actually happens is the red edge has its displayed shape gradually bent more and more to the right, which is represented by a smooth change of background color, becoming slowly brigher and brighter, and then, it suddenly goes back to it's original angle when the color suddenly becomes gray. The sudden change can be easily represented by displaying just the original background (associated with a single edge), mirrored:

And now the 90% background, mirrored:

It's as if International Date Line had a thickness and while inside that line, your perceived time was an average of GMT-12 and GMT+12, making a 24-hour watch mistaken by 12 hours.

Solutions

Starting with the best and ending with the worst:

  • Shade smooth before baking and use normals on smootly shaded object. This way you get rid of the sudden change in the base mesh and so also in the resulting normal map.
  • Don't use tangent space, instead use object or world space.
  • Mark seams where normal of the base changes, unwrap with a margin, also bake the normal map with a margin.
  • Align UV boundaries to pixels. It seems impossible for lines that aren't exactly vertical or horizontal; otherwise still unnecessarily hard.
  • Use a higher resolution normal map to decrease the effect (and possibly apply the previous solution unintentionally if the angles were horizontal/vertical but the positions were 'sub-pixel').
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .