   Some Qs regarding Tangent Space
  i'm tinkering with my tangents,binormals,normals and the TBN matrix and i got some questions on it.1)I thought the position, multiplied with the matrix built from the tangent,binormal,normal, is the UV-Coord. Is that correct? i tried tranforming the position and substracting the uv-coords(the difference between the position in tangentspace and the uvcoords) and everything is white but it should be black(this was tested in rendermonkey,so the tangents,binormals,normals were ok).2)is there a difference between transforming points and direction vectors?thx in advanceregards,m4gnus[Edited by - m4gnus on May 30, 2006 2:11:20 PM]
  1) I'm sorry I didn't really get what you are doing in the first place. But in general when you're getting unexpected results, first double-check that you're calculating with vectors that are in the same space. Your first sentence "position transformed by TBN matrix becomes the UV-coord" escapes me.Usually when you do stuff in tangent space, you calculate the camera and light direction vectors in the tangent space, and not the positions.2) In 4D homogeneous representation, a point has w=1 and a direction vector has w=0. Thus, direction vectors are not affected by the translation part of the matrix but points are.   ;  1) the actual question is: Is the uv-coord of a point on the mesh the position of that point in tangentspace?orWhen i convert the position of a point into tangentspace do i get the uv-coords of that point?regarding 2):thanks for clarifying that.Quote:In 4D homogeneous representationand when it commes to 3d-vectors/3x3matrices?regards,m4gnus   ;  The UV-coords and the tangent space coords are two separate things.  The UV-coords are for textures, and they are in the normalized range.  These are manipulated by the artist to get the texture to look right on the surface.The tangent space coords are in world units, and have nothing to do with the texture.  Usually your points and normals start out in world space, and you have to transform them to tangent space for various calculations.Finally, a 3x3 transformation matrix can only perform rotation.   ;  Ok now i understood it, thank you.regards,m4gnus