PDA

View Full Version : Bump mapping



Tandy
01-12-2002, 08:27 AM
Trying to figure out how i get the tangent vector and binormal vec.
lez say i got a tringle

B
*
/ \
/ \
/ \
/ \
A*---------*C

The normal vec is (C-A)x(A-B)= N
The tangent vec is (C-A)= T
The binormal vec is N x T = B

Is this correct or am I totally wrong here?

dorbie
01-12-2002, 03:00 PM
Your tangent vector needs to follow your derivative of s texture coordinate and the binormal needs to follow the derivative of t.

Your equation ignores s & t texture coordinates.

Nutty
01-13-2002, 03:54 AM
For a long time I have been confused by tangent and binormal vectors, but it just suddenly clicked last night.

The only slightly difficult part now, is working out the tangent vector. Given an arbitrary triangle with Positions, and texture coords, does anyone have any nice equations for calculating just the Tangent vector?

cheers,

Nutty