Madness

Published March 08, 2005
Advertisement
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.
Previous Entry Noooo
Next Entry Tired
0 likes 5 comments

Comments

Muhammad Haggag
Well, I haven't mucked with 3DStudio before, but I know Dustin (circelsoft) does. PM him, perhaps he can help.
March 08, 2005 02:58 AM
rick_appleton
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)?
March 08, 2005 04:42 AM
VisualLR
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.

March 08, 2005 09:43 AM
rick_appleton
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
March 09, 2005 12:44 AM
VisualLR
Thanks, I'll get in touch with you tonight.
March 09, 2005 12:00 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

I'm out - for now

1178 views

Je suis fatigue

1222 views

bleh

1020 views

Beware of zombies!

1117 views

wth gd?

1018 views

So good

1120 views
Advertisement