PDA

View Full Version : Loading 3D Model Files



stockton
10-22-2001, 09:03 AM
I have spent the entire afternoon trying to establish the best way to load 3D Models it appears that there are a large number of models in the 3DS/ASC file format and that this format is what is commonly used for loading 3D Models.

For models that I have generated myself in the past I have an array of pannels of which each pannel has a normal associated with it and a number of vertex's also each pannel has a color etc...

An I correct in thinking that the .ASC file for example has all of this information contained within it? Also is my approach correct or widely used?

What I need is an algorithm to load these files types or a pointer to the files descriptions so that I can write my own algorithm.

I am using the OpenGL librarys in c++ for this exercise.

Many Thanks

Simon

10-22-2001, 02:16 PM
The problem with .ASC files is, I'm pretty sure about this, is that the type of material etc, is not included in the file. If you take a look at the material indices they are just one color and not a material.
However if that doesn't bother you .ASC is an easy format to work with, actually the first one I tried to use.

For a bit of help with the code take a look at a .ASE loader (there's tons of them around, in fact there was one mentioned a while ago in the OpenGL new articles. Plus Nate Miller has a good one on his site). You can change the code very easily to make it load .ASC files.

GameMaker
10-23-2001, 04:46 PM
I found this code that was easy to integrate into my existing code base.
www.gametutorials.com/Tutorials/Advanced/OpenGL_Pg3.htm (http://www.gametutorials.com/Tutorials/Advanced/OpenGL_Pg3.htm)