View Full Version : loading 3d objects into OpenGL at Runtime...

03 March 2004, 05:49 PM
loading 3d object in OpenGL

Hello !

I hope the problem I have is an easy one. I want to

1) build my objects in 3ds Max (Version 6),
2) export them into Format xy,
3) then load and display these 3d objects into my C++ OpenGL application

at Runtime (so not included in the source, but having the model and

textures loaded from the filesystem, yeah, at Runtime)

1) What is a good Format xy? (md2,md3,3ds,... ?!?)
"good" is defined by:
2) Is there a recommendable Exporter for it?
(hopefully without too many manual inbetween steps...)
3) and a public available C++ Loader (incl textures)?

I am aware of the usual Realtime Graphics restrictions:
all geometry becomes polygonal (I dont need any moving parts anyway), a single "skin" texture is fine, same about restriction to 2^n,m texture sizes..

a) reusing objects in a frame (like GL-"displaylists"), i.e. using a

lamppost along a road a dozen times (still having it in memory only once, ideally displaylist-like on the graphics card for performance)

b) texture mapping coordinates most work properly

c) having more than the diffuse texture channel, i.e. specular,
properly exported
d) alpha transparency (i.e. have a tree with alpha info just on a rectangle) and alpha against the material (i.e. a small label on a big object)...

e) multi-layer texturing (as in "ARB_multitexture) is not a must, though I sure "don't mind" hearing about it :-)

Thank you for help!


03 March 2004, 11:45 AM
This is quite easy, all you have to do is read a model file, and literally draw the polygons and texture info in your render function. Or use display lists to speed it up

You could use your own fileformat, but I think it would be easier to use a pre-existing fileformat instead.

Have a look at this page, look further down, it has a few loaders for popular game formats

Tom Pawlik
03 March 2004, 04:15 PM
The faster way could be to use the Flexporter Plugin, but it is available only for Max5, so you would have to rebuild it for Max6 (I'm not sure, but i think the source is included).


CGTalk Moderation
01 January 2006, 04:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.