Sign in to follow this  
  • entries
    135
  • comments
    130
  • views
    52447

Madness

Sign in to follow this  
VisualLR

87 views

I'm getting the exact same problem using flexporter. For the life of me, I can't seem to be able to load in UVs anymore...

Why is this wrong?


for ( uint16 i = 0; i < mesh.mNbFaces * 3; ++i )
{
uint16 v = mesh.mFaces;
uint16 tv = mesh.mTFaces;

vertices[v].u = mesh.mTVerts[tv].x;
vertices[v].v = mesh.mTVerts[tv].y;
}



Am I missing something? does 3DStudio export UVs in some particular way I'm not aware of?

At least I didn't spend all night working on this, I set up the actual texture loading, so now any texture I specify in max gets loaded and set when the model is drawn. Except, of course, the UVs are wrong.

This is annoying, and I'm too tired to start looking at it.
Sign in to follow this  


5 Comments


Recommended Comments

Are you loading from a file, or exporting directly from 3dstudio (I've never used flexporter, and I'm unsure which of the two it is).

I assume you're aware of the fact that the number of vertices and the number of texture vertices can be different (see my reactions to your journal two posts down)?

Share this comment


Link to comment
I'm loading from a file, and yes, in the case of the cube, I actually have 12 texture vertices, as opposed to 8 vertices for the cube.

So, what I'm wondering is how do I tell the difference between the UVs I need ? I thought was doing that by getting the indices from the texture faces and mapping them into the cube's vertices.

Share this comment


Link to comment
Well, I assume that the for 'sides' of the cube are textured so the image is upright on all four of them, then you already have 16 texcoords (4x4) no 12. Add to that the top and bottom. So it seems to me something is going wrong.

What kind of file are you trying to load? 3DS?

If you want, feel free to contact me so we can sort this out for you.

msn: rick_appleton at hotmail.com

Share this comment


Link to comment

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