Archived

This topic is now archived and is closed to further replies.

duhroach

Texture Mapping BAD! BAD! BAD!

Recommended Posts

duhroach    225
Hey, For those of you out there with 3d object experience (Ie, loading 3d objects from .3ds, ase, etc etc) i''d like a bit of explaniation. How do you use your skin mesh data to skin stuff? Example. glTexCoord2f(x,y);glVertex3f(x,y,z); has been the code on all of NeHe''s tut''s to texture something. I read in my texture coords (x,y) from a file, but also, there is texture Poly coords (vector3, vector3, vector3). Now, should I be mapping my texture a diffrent way than nehe''s? Or, do I only need the texture map''s x & y for the mapping? thanks in advance ~Main === Colt "MainRoach" McAnlis

Share this post


Link to post
Share on other sites
Pet    123
hi... actually I dunno what you''re asking about... but as a matter of fact I read asc/ase files for my objects and I dont see a problem . ase file has a vertex coords, face list and material info and texture coords for each face.
Mapping is exacly the same !
Take a closer look at the file. There are "tvertex" coords which are mapping coords you need.
( actually I dont remember exact structure I may be wrong about tvertex )
check Nate Miller''s page to find ase loader tutorial...
did I help ?

Pet

Share this post


Link to post
Share on other sites
Strylinys    122
I think he''s asking about taking a 3d model (like a person, for instance) and applying a single bitmapped texture to it. That shouldn''t be all THAT hard... But it will take a while. You could try looking at the tut NeHe''s got for mapping quadratics, it may have some ideas for you...

S.

Share this post


Link to post
Share on other sites
zedzeek    528
most model formats come with the texture coordnates in the model data eg check out 3d explorer which enables u to explort a 3d file as gl commands, Home page: http://www.xdsoft.com/explorer/
and u can carry on ye merry way
glTexCoord2fv(texcoord[0]); glVertex3fv(vertice[0]);
glTexCoord2fv(texcoord[1]); glVertex3fv(vertice[1]);

Edited by - zedzeek on October 5, 2000 5:43:55 PM

Share this post


Link to post
Share on other sites
duhroach    225
Yes, I was talking about a model, like a dog.

What'' I''m doing is readin ASE file data in. I load the whole file, but am Unsure about HOW to go about applying the texutre (that was the main question if it wasn''t clear)

I checked Nate''s tutorial (it''s what got me to write my own) however, he does some funky chicken stuff that i''m not catching on to..

ZedZeek:
when you say
glTexCoord2fv(texcoord[0]); glVertex3fv(vertice[0]);

is that vertice[0] the Texture vertex? Or the poly vertex?
If it''s the poly vertex, do i even need the texture verticies?


~Main
==
www.sinewave.net

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster


glTexCoord2fv(texcoord[0]); glVertex3fv(vertice[0]);
is that vertice[0] the Texture vertex?


actually it doesn''t matter texture vertices are the same as not textured but textured ones has extra texture coords...

to answer your other question, when you design a dog using a program ,lets say, anim8or or 3dstudio max or whichever you choose, thay apply and output mapping coords ( or if you prefer texture coords ) -for example- to ase file...
Having vertices and then tring to apply texture in OpenGL would be pretty hard

hope I''m clear
Pet

Share this post


Link to post
Share on other sites
zedzeek    528
quote:
Original post by duhroach

ZedZeek:
when you say
glTexCoord2fv(texcoord[0]); glVertex3fv(vertice[0]);

is that vertice[0] the Texture vertex? Or the poly vertex?
If it''s the poly vertex, do i even need the texture verticies?





"that vertice" is a vertice/point on your model in 3d space eg (123,23,345) for this point theres a corrisponding texture coord, and or a colour and or a normal (all these have to be supplied by the person making the model)

so when i say glTexCoord2fv(texcoord[0]); glVertex3fv(vertice[0]);
this saiz use the texcoord (0) that is on point (0)

Share this post


Link to post
Share on other sites