• Advertisement

Archived

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

Converting .3ds file tex. coords. to D3D tex coords.

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

I got sick of beating my head against this one so I guess I''ll ask you guys... I''ve been working on a .3ds file loader for a few weeks. I can load geometry and whatever else I need from the file. Only, when I load texture coordinates they don''t have tu,tv values within the range 0 to 1. Some of them go as high as 1.3. Can anyone tell me how to convert coordinates of this type to the 0-1 range needed for direct3d? (Or if I''m loading them from the file wrong). Thanks, --Ben | particlefield.com |

Share this post


Link to post
Share on other sites
Advertisement
Direct3d doesn''t require texcoords in range [0..1]



0--------1---1.3
| | |
| Tex Third|
| | |
+--------+-----+


Now, imagine this is your polygon. The texture would actually show up one time, then just a tad more (a little bit of texture repeating). If your polygon were to have tex coords from 0-2, then the texture would be mapped twice across the polygon face.

Make sense?

Share this post


Link to post
Share on other sites

  • Advertisement