Author Topic: Normal map comes out broken in Unity  (Read 8246 times)

Hey,
can you provide the textures input you are using ? (I wnat to make some tests)

Just an update : this happens in Unity when you are in "PC, Mac Linux" platform mode.
This issue doesn't happen un "Mac/IOS" mode.

Hey,

Using the normal combine node and 2 normal map inputs, I am getting the same result. It looks like a channel is missing. I will report this to the devs.

Cheers,
Wes
Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

Hello

There is no missing channel, the issue you observe is because a long time ago, when the 'sign' of normal map's green channels was not adjustable almost everywhere, the decision was taken to invert the green channel of normal map outputs by default in Unity. Probably because at the time Designer was only outputting 'DirectX'-style normal maps, and Unity was expecting OpenGL-style normal maps.

So keep in mind that if you have a normal map output in Designer, Unity will invert its green channel.

To illustrate this, I've used the "two normal map inputs and a NormalCombine node" graph Wes sent me, and I've piped the output of the NormalCombine node to both the baseColor and the normal outputs. I attach screen captures of how the two outputs look in Unity. You can clearly see that here, the (non-inverted) baseColor output is what you really expect, and the normal output is the same, but with an inverted green channel.

So, in order to use a filter that will consume normal map inputs and will output a normal map, you should insert a "Normal Invert" node in Designer right before the output node. This way, this will invert the green channel of your normal output, and will compensate for Unity's inversion of the same green channel.

It's needlessly convoluted, I'll admit that, but for now it's the best I can offer :)

Best Regards,
Eric




Thanks for the explanation :-)

And it explains why it was working in IOS mode :-)

Eric, thanks a ton! I will try it later today/tommorow.



Thanks for the explanation :-)

Haha : ) Perfect GIF.
Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja



Thanks for the explanation :-)

Haha : ) Perfect GIF.

This moment where I understand that @Eric Batut 's brain is way more efficient than mine :)

Certainly not !

It's just that I've been dealing with the internals of the Unity integration for a while now, and fortunately (or unfortunately, depending on  your standpoint) I can find the rootcause of things like this in a reasonable amount of time :-D

Anyway, hopefully one day we'll have a finer-grained interface to control this on a per-texture basis, as well as srgb sampling mode, individual channel affectation and so on... One day...

Cheers,
Eric