Archived

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

Tangent space confusion

This topic is 4946 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Lately I got caught up trying to understand perpicel lighting using normal map.. I pretty much grasp the idea but stumble in implementation due to the poor sample not too mention some people use u,v,w and others use b,n,t. One particular method that I was reading needed a tangent T vector in the vertex format (other tangent vectors created after that). the article only include the shader code not the whole code. How do u come up/compute this vector in the first place ? since usually vertex format (from a loaded 3d mesh) only consist of position, normal, texture coordinate. thanks.. any explanation or link to articles/sample code will help..

Share this post


Link to post
Share on other sites
There is an article here on GameDev called Cg Bumpmapping that explains how to calculate T and B (tangent and binormal) using the texture coords and vertex coords of a triangle.
Then you can use the matrix defined by T,B,N to transform from texture space to object space. The inverse of the matrix transforms from object to texture space.

Share this post


Link to post
Share on other sites
I asked the same question few days ago. Look at the samples codes and particulary the link to the opengl forum
http://www.gamedev.net/community/forums/topic.asp?topic_id=227157

Share this post


Link to post
Share on other sites