3ds format UV texture coordinates off?

Started by
3 comments, last by BeanDog 18 years, 7 months ago
I have a .3ds file that loads up great in Milkshape. I wrote a quick parser for .3ds files, and it loads up great, the textures and everything, but the textures don't line up the way they should. They're rotated or flipped or something like that. Does anyone know what kind of transformation I need to do to the UV coordinates to make it show up right? I'm using DirectX. I've tried lots of different things (doing u=1-u, v=1-v, u=v, u=-v, etc etc etc), but I can't get it to work right. Has anyone faced this before? ~BenDilts( void );
Advertisement
Maybe you can do a very simple model with writing on it to show the outlay - like a flat plane with a ruler on it. I found that useful to get my texturing accurate.
i use v = -v to get them oriented correctly.
I was also having difficulty loading in my tga files. I stored them in memory as being displayed top to bottom but OpenGL(maybe DX as well) displays them bottom up(bottom to top)
Got it. I set v = 1-v, then I found the real problem:

My texture files weren't square.

That means when DirectX loaded them in, it put black borders around them to make them an even 512x512 rather than stretching them.

When I made my textures square, all was well.

Thanks everyone!



~BenDilts( void );

This topic is closed to new replies.

Advertisement