PDA

View Full Version : Bones and Normals-Binormals-Tangent



Coluna
11-27-2003, 09:23 AM
Hi all;
I wanna use bones for animation(instead of keyframe), but i didnt find any paper-source-information about calculating normals, binormals and tangent vectors for the mesh. Can anybody send me some links? thanx

NitroGL
11-27-2003, 09:44 AM
Originally posted by Coluna:
Hi all;
I wanna use bones for animation(instead of keyframe), but i didnt find any paper-source-information about calculating normals, binormals and tangent vectors for the mesh. Can anybody send me some links? thanx

Transform the T/B/N vectors just like the vertex, only using the upper 3x3 (rotation) of the matrix.

jwatte
11-27-2003, 12:38 PM
This assumes that you use no non-uniform scale in your animation.

If you do use non-uniform scale, you have to send the transform matrix, and then the inverse transpose of the transform matrix, using the first for position, and the second for normal/tangent/binormal.

Note that this is, of course, a hack, just like skinning normals in general is. The REAL solution would be to re-derive normals from triangles post-skinning. However, that's not possible (or, at least, feasible) in the current vertex programming model, so we'll make do with the hack.