md3 tex coords

Started by
2 comments, last by RavNaz 18 years, 9 months ago
hi guys, I got an md3 being loaded and rendered.....the tri's get rendered good, but the texture is all messed up. The coords I'm getting from the md3 file some are negative and others are > 1....what do I need to do to the tex coords?? any help appreciated.
Advertisement
Try setting the texture coordinates to wrap instead of clamp. I believe it is a sampler state to set that.

Edit: Yup, here's the function call: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/d3d/interfaces/idirect3ddevice9/SetSamplerState.asp You'll want a state type of Address U and Address V, and set it to wrap or mirror.
Are you loading your texture coordinates correctly? Check the MD3 tutorial on SphereGames.

thanks guys...
turns out I wasn't calling SetTexture for the correct parts. Every part of the model I loaded I would loop through every texture and set it, so the correct texture was never set.

Problem now is that some of the model looks inside out....great!

This topic is closed to new replies.

Advertisement