This topic is now archived and is closed to further replies.


Tangent Space?!?!?

Recommended Posts

v71    100
tangent space ? ,maybe you mean the normal maps for the bump mapping , you can generate a map of arctangent but at 90 degree it goes inifinity, so you happens with holes somewhere, only my tw0 cents.

Share this post

Link to post
Share on other sites
BerLan    122
Normal maps need tangents and binormals to do dotproduct (dot3) bumpmapping. A "tutorial" (a chunk of code without much comments) can be found here

There are also tutorials on nVidia''s and ATI''s developer sites (check ATI''s "simple dot3 bumpmapping"-application).

The lighting is calculated using N dotproduct L per pixel (well, per texel could be more accurate).

Basically you get the vector N from a normal map, and the vector L is the light direction calculated per vertex (light position - vertex position). Then the light direction is rotated to tangent space using the vert tangent and binormal (so we actually get the vector L'' = L in "tangent space"). Note that some may also refer to tangent space as texture space. A bit of 3D-card magic, and you''ve got bumps on your flat sufraces.

Check the sites i mentioned for a better explanation & code.


Share this post

Link to post
Share on other sites