Loading a model from a file

Hello all,

I’m looking for a way to load a 3DS model from a file into OpenGL without having to use another layer (such as OpenSceneGraph or Inventor). Is there a way to do that with just OpenGL syntax?


lib3ds is what you’re looking for.

what about md2/md3 files? Or is there no advantage to using these?

i can’t find any 3ds files with animation in them. do they exist? i tried 3dcafe and turbosquid.


md2, md3 and md5 and so on are great if you want to use id’s format, but you could write a custom 3ds exporter to generate your own format. it deosn’t reallu matter - it’s just skin and bones in the end.

i’m writing my own 3ds loader based on the spec and code at wotsit, but i can’t find any animation files to test it with!

btw, i wouldn’t look at source code like lib3ds until you’ve given the spec at wotsit a good read. once you understand the lay of the land code’ll be much, much easier to disseminate (in fact you won’t really need it, except for a few gray areas).

did i mention that there aren’t any 3ds animation files to be found?

oh, i forget to mention that opengl can render 3ds model quite beautifully. put your mesh data into a VBO/IBO and off you go! child’s play, really :slight_smile: