Dot3 Bump-mapping and tangent space

Started by
0 comments, last by OleKaiwalker 20 years, 8 months ago
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?
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
--------------------------------------------------------There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.There is another theory which states that this has already happened...

This topic is closed to new replies.

Advertisement