Questions about The calculation of TBN matrix for normal mapping

38 Views Asked by At

After learning the calculation of TBN matrix through some material available online(for example, https://learnopengl.com/Advanced-Lighting/Normal-Mapping), I still have some questions.

(1) why we compose the TBN matrix using vertex normal? We can get the tangent vector and bitangant vector through positions and UV coordinates of vertices, why don't we obtain the third vector N by crossing vector T and B?

(2) As we can edit vertex normal ourselves, what if we set the vertex normal to lie on the plane? This will result in that the vertex normal being coplannar with vector N and vector T, and as a consequence the TBN matrix will not be a rotation matrix anymore and I don't know what the result will be when I apply it to variables used in calculation of lighting.

0

There are 0 best solutions below