all those spaces! help!

pav

New member
texture/tangent space, eye space and all the rest..
can someone please tell me what those are?

what's eye space? is it after the 3D scene has been transformed?
and texture space? is it after rasterizing?(after applyting projection??)

i'm confused..this is the only detail that's preventing me from doing DOT3 bumpmapping...i need to make the L vectors in the tangent/texture space...except i have no clue how! HELP!
 
You may want to check out the math part of my tutorial:

http://esprit.campus.luth.se/~humus/?page=OpenGL/Tutorials/OpenGL_Basic_Framework/


Basically, to do dot3 bumpmapping you'll need the vector that points in the s direction of your bumpmap, and the vector that points in the t direction, and the normal. These three define the tangent space. Now make sure all those are of unit length so that things get a little easier. Now to rotate a vector (call it v) into that space you only need to do a dot product with each of those vectors.

x = s_vector . v
y = t_vector . v
z = normal . v

The new vector (x,y,z) is the vector rotated into tangent space. This can be done with a matrix like this,
Code:
[s_vector_x, s_vector_y, s_vector_z, 0]
[t_vector_x, t_vector_y, t_vector_z, 0]
[normal_x,   normal_y,   normal_z,   0]
[    0,          0,           0,     1]
 
Back
Top