• ### Popular Now

• 9
• 10
• 10
• 11
• 15
• entries
135
130
• views
52547

97 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.

Well, I haven't mucked with 3DStudio before, but I know Dustin (circelsoft) does. PM him, perhaps he can help.

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)?

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.

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

Thanks, I'll get in touch with you tonight.