Importing models

I have seen asked quite often, how do I open 3d studio files in openGL. The answer is usually go read the file format spec and write yourself an importer.
While I think thats harsh, I can deal.
What I would like to know, and I think everyone else (well us newbies) are wondering is what type of structure do we load them into?
Is display lists the right way to go? I heard that if you have a very complex model these might be bad for some reason. Any pros or cons? Thanks

I think that for static models disp. lists are the way to go.As for importing 3ds files, there’s a spec at w/ source code which reads the file and prints out vertex/face/etc. info.It should be pretty simple to put it in a disp. list instead of printing it out/

Ah great.
What would you use for non static models then? Is this the model class in openGL?

Originally posted by Roadmaster:
Ah great.
What would you use for non static models then?

Usually vertex arrays are used for non-static models because they are quick and you can change the data in them. Generally display lists in addition can also be used. For example, if you set up a character that uses hierarchical animation, you can make static things such as guns etc use display lists and then use vertex arrays for everything else.

oh yeah,


However, you can use a library to do all the work for you. I use Lib3DS to import my 3DS models. Look it up at

Arguably the most legible code for Visual C++/MFC newbies is Display3DS which decodes and displays 3DS files quickly and easily while forming a minimalist basis for their own mods.

Does anyone know how to interpret the smoothing information in 3ds files properly.

All the source code I’ve seen calculates the normals checking the angle between adjacent triangles.

I made a school project to import 3ds files and my algorithm was slow as hell, so I’ve never tested it properly . With a little time (2 months!) I actually got it to work faster but in no way I checked if it was working properly for all cases (it works for teapots so probably it’s near good).

Since I’ve never stopped thinking about it, I’d hope someone has a better understanding of it!

Awesome thanks for all the replies so far.
I think I’m going to start simple and work my way up

I use Milkshape3d…not sure if you like that or not but its $20 and easy to load stuff and it does animation/skeleton stuff and works good I think. I pretty new with OpenGL and stuff but I think you can convert 3ds files into milkshape files with Milkshape3d.

I know you can get Half Life 3d models and convert them, same with Quake.

Does anyone know of a tutorial or even a spec for how animations are stored in a regular milkshape file? Theres a tutorial at NeHe’s but it doesn’t cover animation, just loading the vertex’s.
Many thanks

try // i think thats the url do a seacrh for that + opengl 3ds + u should find it