#### Archived

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.

## 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 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.

Thanks

1. 1
Rutin
23
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 29
• 40
• 23
• 13
• 13
• ### Forum Statistics

• Total Topics
631739
• Total Posts
3001958
×