Jump to content
  • Advertisement

Archived

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

OleKaiwalker

Dot3 Bump-mapping and tangent space

This topic is 5523 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

Hey, Do one need to calculate the light into object space and then convert it into tangent space? or is it possible to convert it to tangent space if the light is in world space and the object vertices are too? (world space light - world space object vertex * tangent spaace matrix)??? If not, how do I calculate the vertices from world space to object space - so it is compareable?

Share this post


Link to post
Share on other sites
Advertisement
In my current framework I do it the following way:

Passing all vertices and the lights in object space (no rotation/translation/scale/ ... matrix). In a vertex program I compute the light and the view vector (passing the viewers position by an vertex parameter). Then I transform these vectors in tangent space using the tangent space matrix passed by the normal and 2 Attributes (I took the unused attributes: 6 & 7), the tangent and the binormal. At last I multiply the vertex with the modelview-projection matrix, which is the output of my vertey program.

This works quite fine.

Corrail
corrail@gmx.at
ICQ#59184081

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!