5.5 detail normalmap Issue with Standard shader

Hello, i’m not sure if that issue have been experienced before using Modo and Unity, but i’ve didn’t got that anytime before today.

I’ve updated recently Unity from 5.3.5 to 5.5.0 f3. and now i’ve found some issue on mom-closed / tigh mesh, like thoat wall.

I just got a simple material with standard shader on it. I use the normalmap on Detail channel to add some shapes to my wall, but the lighting is messed up even if on Modo the continuity / orientation of my UV1 are correct.
so on only one Mesh, without any orientation / flip issue from the UV’ in Modo i still got issue inside Unity from Face to Face, around 30 to 50 % of my mesh didnt work as it should. Have you got those kind of issue before ?

seriously there is no one else that have experience that issue, with multiple UV islands ?

It’ll be your geometry, it’s not a Unity issue… or you may need to flip a channel in the normal map.

1 Like

It’s not related to the Mesh, as it use is own Normal Weightmaps.

The faces got the same orientation. they are pointing to the same direction locally. I’ve used the UV Set0 for the ambient occlusion and albedo and the UV Set 1 for the detailed Normal Map using a different UVSet(1).
It looks like that if the UV’s 0 are oriented in a different way than the UV’s form the UV Set1, the normal map effect goes wrong.

I hope this Gif, can show you the Problem.

It’s a nonsence that i can’t orient my UV island inside the UVSet 0 because the of the detail normalmap bug in the UV set0.

Quote from hippocoder:
“It’ll be your geometry, it’s not a Unity issue… or you may need to flip a channel in the normal map.”

It’s not an issue with the geometry (or Green channel flipping).
I’m using the same Normalmap texture on all the model.

Tangents all checked out? did you try letting unity calculate tangents or import them?

1 Like

Tangent Basis Saved by the Modo Exporter. Do i need to uncheck that ?

Edit: didn’t change anything.

in the FBX mesh file / Prefab properties i got Tangents setting set to calculate TangentSpace.

I tried Calculate legacy as well as Calculate legacy - Split Tangent, and it didn’t resolve the issue.

This isn’t a bug, just a limitation of most real time rendering setups. The mesh only stores one tangent per vertex, and that tangent is based on UV0. If UV0 and UV1 don’t match orientations, the detail normals won’t look right. I agree that it’s not optimal, but in the average case it works well enough.

It could be fixed with a custom shader using derivatives to calculate the tangents for the detail UVs. The cotangent_frame() function in this post for example:

Ironically one of the people to first post about using derivatives to transform with normal maps, and whom used the technique in several big budget games, now works at Unity.

Unfortunately I’m not sure if it’d be easy to do in a surface shader as it assumes the normals that are output are in tangent space, and to blend two normals together nicely you generally need them both in the same tangent space, so you’d have to figure out how to transform the detail normals into the model’s tangent space.

1 Like

Thanks a lot bgolus.

i couldn’t resume this more quicker ^^ you have a great understanding of my Frenglish.