3ds with max's texture coordinates
#1
Posted 10 August 2003 - 01:20 PM
the "preserve max's texture coordinates" is checked but still it kinda puts the jpg on the object without mapping
can anyone help?
#2
Posted 10 August 2003 - 06:52 PM
#3
Posted 12 August 2003 - 07:55 AM
i changed the 3ds object to mine.
i can post code but since i dont know where the problem is i dont really know what to post :blush:
while i m looking 4 a solution myself i came across glTexCoordPointer
does this have something to do with it (or something like it)?
#4
Posted 12 August 2003 - 12:26 PM
#5
Posted 12 August 2003 - 01:55 PM
i just saw it in the msdn help as i was looking for a solution.
can anyone post some code with glTexCoordPointer?
or just tell me where i can find something helpful.. :nod:
#6
Posted 12 August 2003 - 03:02 PM
#7
Posted 14 August 2003 - 12:48 PM
if(pObject->bHasTexture)
{
// Make sure there was a UVW map applied to the object or else it won't have tex coords.
if(pObject->pTexVerts)
{
glTexCoord2f(pObject->pTexVerts[ index ].x, pObject->pTexVerts[ index ].y);
}
}
i assume the info in pTexVerts is correct but still it doesnt texturize correctly
#8
Posted 24 August 2003 - 09:00 AM
#9
Posted 24 August 2003 - 11:04 AM
i don't know. we never had such problems, it... just worked.. :|
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....
#10
Posted 24 August 2003 - 12:06 PM
my object is a jet fighter, in max i put a texture using unwrap uvw so it would look lifelike.
when i use the object in opengl , it uses the same jpg allright but the coordinates have moved , for instance the back fin texture is smeared on the wing.
i don't know WHERE the problem is openGL? Max?(it looks good in max) :eek:
#11
Posted 24 August 2003 - 05:27 PM
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....
#12
Posted 28 August 2003 - 08:34 AM
the problem was this:
there was glTexCoord2f(pObject->pTexVerts[ind].x, pObject->pTexVerts[ind].y);
and when i changed it to
glTexCoord2f(pObject->pTexVerts[ind].x, -pObject->pTexVerts[ind].y);
it works (the "-" made the differance).
i dont exactly understand why...
can any one enlighten me? B)
#13
Posted 28 August 2003 - 08:52 AM
#14
Posted 29 August 2003 - 07:34 AM
because some images are known to be stored "topdown" => you have to flip the y-coord (actually you have to calc 1-ycoord, but if you have GL_REPEAT, result is the same..)
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....
#15
Posted 29 August 2003 - 08:17 AM
i bet he's using targas for textures...
#16
Posted 31 August 2003 - 10:03 AM
my loader is basically from gametutorials.com
#18
Posted 31 August 2003 - 10:27 AM
#19
Posted 01 September 2003 - 08:00 AM
#20
Posted 01 September 2003 - 12:12 PM
i guess its that.. flip your jpgs..
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












