Skip to main content
converted to mathjax
Source Link
Pikalek
  • 13.4k
  • 5
  • 49
  • 54

A few words on why people use the inverse transpose when mapping normals: suppose your normal at a point p1\$p_1\$ on the untransformed object is n\$n\$ and p2\$p_2\$ is a nearby point on the object. Suppose also that you are applying the affine transformation matrix M\$M\$ to your object, so that M*p1\$Mp_1\$ and M*p2\$Mp_2\$ are the new locations of p1\$p_1\$ and p2\$p_2\$ on the transformed object.

You want to transform the normal using a matrix N\$N\$ so that the angle between n\$n\$ and p2 - p1\$p_2 - p_1\$ is preserved:

(N*n) . (M*p2-M*p1) = n . (p2 - p1) n^T N^T M (p2 - p1) = n^T (p2-p1) 

and$$ \begin{align} (Nn) \cdot (Mp_2-Mp_1) &= n \cdot (p_2 - p_1) \\ n^T N^T M (p_2 - p_1) &= n^T (p_2-p_1) \end{align} $$ and this equation is true for any choice of p2\$p_2\$ if N^TM\$N^TM\$ is the identity, i.e. N = M^(-T)\$N = M^{-T}\$.

A few words on why people use the inverse transpose when mapping normals: suppose your normal at a point p1 on the untransformed object is n and p2 is a nearby point on the object. Suppose also that you are applying the affine transformation matrix M to your object, so that M*p1 and M*p2 are the new locations of p1 and p2 on the transformed object.

You want to transform the normal using a matrix N so that the angle between n and p2 - p1 is preserved:

(N*n) . (M*p2-M*p1) = n . (p2 - p1) n^T N^T M (p2 - p1) = n^T (p2-p1) 

and this equation is true for any choice of p2 if N^TM is the identity, i.e. N = M^(-T).

A few words on why people use the inverse transpose when mapping normals: suppose your normal at a point \$p_1\$ on the untransformed object is \$n\$ and \$p_2\$ is a nearby point on the object. Suppose also that you are applying the affine transformation matrix \$M\$ to your object, so that \$Mp_1\$ and \$Mp_2\$ are the new locations of \$p_1\$ and \$p_2\$ on the transformed object.

You want to transform the normal using a matrix \$N\$ so that the angle between \$n\$ and \$p_2 - p_1\$ is preserved:

$$ \begin{align} (Nn) \cdot (Mp_2-Mp_1) &= n \cdot (p_2 - p_1) \\ n^T N^T M (p_2 - p_1) &= n^T (p_2-p_1) \end{align} $$ and this equation is true for any choice of \$p_2\$ if \$N^TM\$ is the identity, i.e. \$N = M^{-T}\$.

Source Link

A few words on why people use the inverse transpose when mapping normals: suppose your normal at a point p1 on the untransformed object is n and p2 is a nearby point on the object. Suppose also that you are applying the affine transformation matrix M to your object, so that M*p1 and M*p2 are the new locations of p1 and p2 on the transformed object.

You want to transform the normal using a matrix N so that the angle between n and p2 - p1 is preserved:

(N*n) . (M*p2-M*p1) = n . (p2 - p1) n^T N^T M (p2 - p1) = n^T (p2-p1) 

and this equation is true for any choice of p2 if N^TM is the identity, i.e. N = M^(-T).