Tangent Space?!?!?

Started by
1 comment, last by laeuchli 22 years, 5 months ago
What is tangent space, and how do I generate it?!?! I know you need it for bumpmapping, but I just can''t figure it out.
Advertisement
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.


Normal maps need tangents and binormals to do dotproduct (dot3) bumpmapping. A "tutorial" (a chunk of code without much comments) can be found here

http://www.nitrogl.com

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.


--BerLan
--BerLan

This topic is closed to new replies.

Advertisement