how to convert normal, tangent and binormal to another coordinate space?

Started by
5 comments, last by therealremi 16 years, 11 months ago
I have a matrix X( Point3(1,0,0),Point3(0,1,0),Point3(0,0,1),Point3(0,0,0) ) and I convert a point to this coordinate space by multiplying it by X. But can I do the same with normals, tangents and binormals? Is it ok to just do: normal = normal * X; tangent = tangent * X; binormal = binormal * X; ? Another question: The texture coordinate point U(s,t) in my eninge is equal to texture coordinate point U'(s, 1.0-t) in the application that computed the tangents and binormals. How to convert the tangents and binormals to take account of that difference?
Advertisement
In this particular case (the identity matrix) it'll work. However, for complicated mathematical reasons I'll go into if you like, you cannot simply multiply by the transformation matrix if it is not orthonormal. Instead, you need to strip off the transformation, and then multiply by the inverse of the transpose of the matrix.
Quote:Original post by therealremi
But can I do the same with normals, tangents and binormals?


Yeah, what Sneftel wrote... but I prefer "bitangent" over "binormal", since the vector is tangent and not a normal.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
Wow, I can't believe I passed up an opportunity to say that. Yes, what JB said: "Binormal" isn't a word that means anything when you're dealing with surfaces.
Yeah, I know what you mean:

"The term binormal is commonly used as the name of the second tangent direction (that is perpendicular to the surface normal and s-aligned tangent direction). This is a misnomer. The term binormal pops up in the study of curves and completes what is known as a Frenet frame about a particular point on a curve. Curves have a single tangent direction and two orthogonal normal directions, hence the terms normal and binormal. When discussing a coordinate frame at a point on a surface, there is one normal direction and two tangent directions, which should be called the tangent and bitangent."

I just thought most people would be confused about the term bitangent;)

Thanks for answering. I'm still waiting for advice on what to do with this texture coordinates format difference in terms of TBN computation (or shouldn't I do anything with that?).
Quote:"The term binormal is commonly used as the name of the second tangent direction (that is perpendicular to the surface normal and s-aligned tangent direction). This is a misnomer. The term binormal pops up in the study of curves and completes what is known as a Frenet frame about a particular point on a curve. Curves have a single tangent direction and two orthogonal normal directions, hence the terms normal and binormal. When discussing a coordinate frame at a point on a surface, there is one normal direction and two tangent directions, which should be called the tangent and bitangent."


As the author of that passage, I'm happy to see that people are agreeing with the terminology.

As for transforming the TBN frame, if your transformation matrix is orthogonal, then you can simply use that matrix to transform all three vectors. However, if it's not orthogonal, then you can only use it to transform the tangent and bitangent vectors. The normal vector must be transformed with the inverse transpose of the matrix in order for it to remain perpendicular to the transformed tangents (assuming it was perpendicular in the first place).
I'm happy to see that people who get quoted still have time to answer beginners questions;)

This topic is closed to new replies.

Advertisement