I have some questions about tangents. As far as I’ve tested, having a model with tangents defined is required for proper rendering of materials having normal map assigned, am I right or are there some exceptions?
Being that the case, what’s the difference between TangentBinormalGenerator and MikktspaceTangentGenerator? Is any of them better or it just depends on the model, the format or the modeling software you’re using?
Does j3o format include tangents or should I generate tangents for all models on loading always?
Only exceptions are materials that might be able to generate the tangents in the shader.
But for proper normal maps, tangents are needed else the shader won’t know which direction that normal map vectors are pointing.
I got all my questions answered so I’m writing this post here just in case any other user has the same questions or concerns…
As @pspeed said, tangents are required 99% if using normal maps as the shader needs to know them.
Mikktspace is the current standard, most software you could be working with uses this kind of generation, so it’s better to use it instead of TangentBinormalGenerator
And yes, j3o saves tangent information. My issue with this is that the first models I integrated into the game were exported to obj which doesn’t contain tangents so I needed to generate them after loading the model even it was translated to j3o
Yeah, it’s always better if you can get the original modeling program to export them. It’s the only thing that knows the tangents for sure.
Everything that generates them after the fact is just guessing. Some approaches may guess better than others but it’s still just a guess.