Sign in to follow this  
RavNaz

md3 tex coords

Recommended Posts

RavNaz    100
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.

Share this post


Link to post
Share on other sites
Cypher19    768
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.

Share this post


Link to post
Share on other sites
RavNaz    100
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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this