View Full Version : HELP:Loading 3D objects into OpenGL

07-17-2000, 11:16 AM
Could someone explain how i could go about loading a 3D object designed in Strata3D into openGL?


07-17-2000, 04:04 PM
Got a file format?

07-18-2000, 07:02 AM
i've just started to look at model loaders as well, and rather than starting a new thread, i thought i'd put something here...

first question: what's the difference between the 3ds format and the max format? different versions of 3d studio?

second: where can open source model loaders be found? is there a common place? if not, it seems like it might be advantagous to create such a page... this question comes up rather often.

07-18-2000, 08:08 AM
The file format is .S3D but it can also save in many other formats. I'm curious as well as to why there isn't more info about this, i'm sure all the game developers out there do ~not~ sit down and create complex objects in pure code, vertex by vertex.

I was also looking at the file saved in VRML and it might be quite easy to move this to openGL but i don't want to reinvent any wheels.


07-18-2000, 08:25 AM
Over on Nate Miller's page there is some code for loading .ASE files (A format which MAX can export to).

The link is http://nate.scuzzy.net


07-19-2000, 11:32 AM
well, ASE is definitely a start. i had missed this when perusing nate miller's page...

in answer to my own first question: 3ds is an object, max is a scene (to use softimage terminology =)

and i maintain that a common place where open source model loaders may be found would be beneficial. seems like alot of us are reinvinting the wheel.

Kilam Malik
07-19-2000, 10:23 PM
Originally posted by phlake:
second: where can open source model loaders be found? is there a common place?

I don't have a page where you can find them, but a book. Its "3D graphics file formats" from Keith Rule. Web page is http://home.europa.com/~keithr/

The book describes among other formats the 3ds format (r2/r3/r4). On CD there are complete sources to parse the files. As the application he wrote (crossroads) is freeware, maybe the sources are somewhere on the net.


07-21-2000, 06:32 PM
About that book (3d graphics file formats), i read it a long time ago (when i wasn't a very good programmer...as if i am now!) and it looked like chinese. However, i do remember atleast that you need to ve familiar with file I/O to understand it since it doesn't teach you that.

Well, don't just take my word for it and go to a library somewhere, i'm sure you'll find it (i did). Thanks for the suggestion,i will re-read it.

By the way,i was thinking that rather than making a complex file converter/reader, it would be easier to make a small program like paint-braush that would take your co-ordinates in 2d from top-view(like a map) and then extrude them downward(add depth)into a scene. Granted this won't work for general objects, but it will work great for scenes where there are a lot of rooms (and walls etc)since the wall would merely be represented by 2d boxes.

I hope i helped someone and this post was not just full of rubish :-)

Kilam Malik
07-22-2000, 04:12 PM
Yes, the book implies that you are familiar with c++. Would be helpful if you are also familiar with lex/yacc, as the files are parsed with this tools. But you can use his source as library, as it loads the file for you in memory.


07-23-2000, 09:30 AM
I recently found a useful program, it's for the mac but just in case there are some mac users reading this thread here's the address:
It converts .3DMF files to OpenGL C code.
Click on the News 7/16/00 "Here" link to get to it.


07-24-2000, 02:44 AM
Hey, i found great tutorials on 3d file-loading, but since they are a diffcult reading, i will try to understand them myself and hopefully will post my own tutorial soon!
Wish me luck...


07-25-2000, 03:38 AM
I've got a 'slap-me-sideways-with-a-wet-kipper-this-is-easy' guide to loading objects on my site: http://home.clara.net/paulyg/objects.htm

and the about texturing them: http://home.clara.net/paulyg/uv.htm http://home.clara.net/paulyg/tte.htm


mike j
07-25-2000, 07:12 PM

your tutorial on 'rolling your own texture coords' was instrumental in my first venture into 3D file formats... it helped get textures on my .ASC objects