UV Rotated Islands & Normal Problem

Hi!

I’m no expert in this area, so the question is probably noobish)

I have a model with the following UV layout:


Its islands are aligned with the “V” axis of UV space but some of them are also rotated 180°. And it’s ok due to the nature of the material I’m going to use for this mesh, which is woood veneer. Rotation doesn’t matter as long as all islands are aligned with the direction of wood fibers of the material.

However, problems begin when the normal map is applied:


Normal strength is exaggerated here, so the issue could be more visible. The nomal is flipped (shadows on the top, highlights on the bottom) for the rotated parts, which is logical and expected. More than that, they receive this strange looking bright gradient across the whole surface. I guess it’s because of the MikkTSpace tangents, which are messed up, since they rely on the UV layout as well.

So, my questions are:

  1. Is it possible to avoid issues with tangents?
  2. Is it possible to modify normal map (in Shader Graph) to look correct both on rotated and normal islands?

P.S. By “material” I mean a set of maps downloaded from a website like Quixel and inserted into an HDRP Lit Shader, not a set of maps baked specifically for this mesh in Substance Painter or other similar program.

Thanks.

Indeed it is possible … because this is the kind of thing the tangents explicitly exist to solve. The orientation of the texture is irrelevant because the tangents keep track of that so ensure the resulting normals are consistent.

Basically, the problem is unlikely to be caused by tangents.

Maybe? But you probably shouldn’t.

What happens if you set the normal strength to 0.0001? Does it still look bad? If so I suspect the issue is your mesh’s normals, not the normal map. If it looks fine then the normal map itself is just bad, or for some reason you didn’t set it to be a normal map on the texture settings which would significantly skew the normal map’s orientation as gamma correction is being applied to the data.

The one other issue is normal maps can’t actually store a perfectly flat surface as an 8 bit color texture can’t do “0.5”. 127/255 is 0.498 and 128/255 is 0.502, and both of those are values used for the RG channels by different programs when storing a “flat” normal. If you have a normal map with very little detail in it such that it’s mostly flat then it might end up being a problem.

The work around would be to use an exaggerated normal map and tone it down using the normal strength.

Yeah, it seems, this was the case! If I plug in normal maps with contrast and distinct details then everything is fine.
Then what’s the best and right way to exaggerate a normal map? I guess, it can be done in Photoshop?

Thank you!

If you take already created normal maps that already have the problem and exaggerate them, you won’t fix the issue as you’ll be exaggerating the issue exactly the same way Unity is. The only option is to create a new normal map from scratch or start with 16 bit per channel normal map source and exaggerate those. Unfortunately there’s not a good way to do that cleanly. If you can download 16 bit height or displacement maps you can use those to generate normal maps in Photoshop by pushing the contrast of the height map, then using the 3D->Generate Normal Map filter with the scale maxed, which would let you generate exaggerated, and high quality normal maps that should otherwise match the intended content of the normal maps you were originally using.