Dot3 Bump-mapping and tangent space
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?
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement