🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

tangent and bitangent vertex attributes

Started by
1 comment, last by Aressera 1 year, 7 months ago

Every vertex of a 3D mesh has position and some optional values like texture coordinates, vertex color, and normal, but also tangent and bitangent vectors.

While the purposes of texture coords, vertex color, and normal are pretty clear, I'm not understanding what tangent and bitangent vectors should be good for.

I am not asking about the mathematical definition, as I know that tangent and bitangent are vectors orthogonal to the normal and to each other.

Also 3ds max has no tangent and bitangent so I am wondering how models with this values can be created? Also how to use this values in old OpenGL?

Advertisement

They are mostly used for normal (aka bump) mapping and related techniques. The tangent, bitangent, and normal define a rotation from tangent space (aligned with surface) to object space. When you calculate lighting, they are used to rotate a normal vector (sampled from texture map, and defined in tangent space) into object space (and then either camera or world space) for final lighting calculations. The tangents are usually calculated from the vertex normals and texture coordinates using the MikkTspace algorithm.

This topic is closed to new replies.

Advertisement