working tangent space coords

i`ve tried somewhat to find out how it works,while looking at nv md2bump demo,but it just don’t look right. also in the nv_algebra_lib src it’s complicated to find out whats going on,when they build the basis matrix per vertex.

has anyone source code,or a lil snippet to show his/her tangent/binormal coord calculation? probably with some explanation.


yeah the md2bumpmap code is IMHO over complicated to get the vertice tangent normals all u need to do is add all the face tangent normals that share that vertice together + orthonormalize the 3x3 matrix

but how do i get the tangent at a specific vertex?
thats the main prob. if i have the tangent, -> B=NxT. then i have my 3x3 matrix.