How could I use bent normal map

Started by
1 comment, last by fire67 8 years ago

This might be a general question but I have some difficulties about understanding baked bent normal maps and how to use it inside a shader in Unity.

From what I understand, bent normals are especially used with occlusion but I don't really get what they contain and how to use them. The other strange thing is that when baking them with different tools, it gives me different output, so it's hard for me to interpret them.

Here are some examples:

tHXeT.jpg
This is made from Substance Designer in World Space. Seems really close to a simple normal map in World Space.

1AAcV.jpg
This is made from Substance Designer in Tangent Space. It doesn't seem to contain really relevant informations as the one above.

Zenrb.jpg
This is made from Maya Turtle. It seems to contain interesting information but... what space is that ?!

BCZmP.jpg
This is the same as the one above but converted to Unity using Handplane. What can I do with this...

It seems that Unity is using tangent space normal maps but I don't have any control on the import process and I don't know what they are doing.

Regular normals are then unpacked in converted into world space normals using TBN matrix.

The fact is that at this point, any clue or advice should be really useful. I don't know if my baked maps are right or usable and I don't know how to use them inside my shader.

Thank you very much.

Advertisement

Calculating bent normals is just an extension of AO calculation where the direction of each sample is also averaged along with the occlusion amount.

4491947_1329650854zqXO.png

The bent normals from substance painter seem correct. In any region that there is no AO, your normal won't be bent in any direction, therefore in tangent space it's pointing straight up along the surface normal. This is why you only see details in the ears.

I have no idea how Unity handles the bent normals but the usual way is to, instead of applying AO as a standard multiplier onto the lighting result (which gives this weird muddy look), use the dot product of the bent normal and the light instead. This is how we handle SSDO in CryENGINE for example.

I've only ever used a texture-based version of this technique once, however in this version the bent normals also contained information from the original tangent space normal map, and was used directly during lighting in place of the original.

Thank you for your answer @Styves.

After some testing, it appears that I am getting some interesting results. The good maps are the substance one (Tangent and World Space).

This topic is closed to new replies.

Advertisement