Jump to content
  • Advertisement


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


Texture Space

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

Hi, after reading papers from nVidia site about per-pixel shading i can''t understand how to create the matrix that transforms L vector(light vector) from world space to texture space. Those explanations are great but it seems to me that something is missing. Can somebody explain step-by-step how to do so ? Thanks.

Share this post

Link to post
Share on other sites
Well... i''m going to be more specific, so here i go.
This is from a nVidia paper:

. The best method for generating Texture Space for yuor geometry is as follows:


. When loading in a model, create an extra set of 3 3D vevtors per vertex
. These will store the axes of the Texture Space basis.
. Generate the Texture Space vectors from the vertex positions and bump map texture coordinates

( Ok, no problem till now. Going on... )

How to generate Texture Space ?

. For each triangle in the model:
. Use the x, y, z position and the s, t bump map texture coordinates.

. Create the plane equations of the form:

Ax + Bs + Ct + D = 0
Ay + Bs + Ct + D = 0
Az + Bs + Ct + D = 0

. Solve the texture gradients dsdx, dsdy, dsdz, etc.

Then it says to treat dsdx, dsdy and dsdz as a 3d vector represeting the S axis(dsdx, dsdy, dsdz).
Ok, everything it''s ok, so i compute the S axi and then it says to do the same to compute the T-axi but if i do the same i will get the same vector because the normal vector remains the same (A, B, C), vertex coordinates are the same (x, y, z) and texture coordinates are the same too(s, t).
I''m interpreting something wrong, what is it ?

Thanks, bye.

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!