Jump to content
  • Advertisement
Sign in to follow this  
iedoc

3d models (maya)

This topic is 4869 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i need some help now with loading 3d models in opengl. i can't find very much info on the web. i would mostly like to use maya, but if you know of another language that would be good, say so. i went to nehe's tutorial on importing milkshape models, but i still don't get it. i need something a little more clear, does anybody know of any tutorials or books that would be helpfull?

Share this post


Link to post
Share on other sites
Advertisement
try loading wavefront files. They are textbased and easy to parse. most 3d package will be able to export to .obj. As for tutorials... google is you friend.

Share this post


Link to post
Share on other sites
ok, i still have a little problem. i just don't know how to load models, i can export them and everything. i don't know how to import them into my c++ project. i searched on google for a long time, and i just can't find any good tutorials, actaully, i can't find any at all on how to get them into my project. do you know of a good tutorial or book or something?

Share this post


Link to post
Share on other sites
For a tutorial on loading Obj files, I *think* there is one here at UltimateGameProgramming. You will have to go to Tutorials->OpenGL then look though the pages. Note that you will need a flash enabled browser to use that site (which I don't). See if one is there, if not I may have another site that you can find stuff.

Share this post


Link to post
Share on other sites
one more thing, this might sound like a stupid question, but what is delphi?

Share this post


Link to post
Share on other sites
thaaaaank you, this site is awsome, and it does have one, but what it the other site you were talking about?

crap, it doesn't really explain anything though, do you know of another site that might help?

Share this post


Link to post
Share on other sites
The format is realy simple. it goes like this:

a vertex is a line that starts with the letter v followed by 3 floating point numbers. i.e
v 3.01213 -1.2345 1.000

a vertex normal starts with vn followed by 3 floatig point numbers
vn 1.000 2.345 3.1415

a texture coordinat starts with vt followed by 2 numbers
vt 0.123 0.567

a triangle looks like this

f 1/1/1 10/3/5 15/4/6

meaning that
- the 1st point of the triangle uses the first vertex, the first normal and the first texture coordinate in the file
- the 2nd point uses the 10th vertex, 3rd normal and 5th texture coordinate
- the 3rd point uses the 15th vertex, 4th normal and 6th texture coordinate

you can ignore the rest of the lines (if any).

(there is a bit more but this will do for a start.)

now you have to do 2 passes on the file. in the first pass you count the number of vertex, normals texture coordinates, then you allocate memory to hold the date and in the second pass you you read in the data.

Share this post


Link to post
Share on other sites
I would look at the FBX exporter that comes with Maya. Handles multiple animations, materials, textures, skinning etc

The FBX SDK can be downloaded from the Alias website which is all you need to load the files.....

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!