How to open .obj/3dMAX file in OpenGL


I need to open an .obj file in OpenGL(this .obj file was generated by a software named formZ, a house model actually). However, I have no idea how to complete this.
If you happen to know how to do this, would you please give me some advice? Thanks very much!


Yuyu Dai

P.S. if you happen to know how to open .fmz or .3ds file in OpenGL, it will be even more helpful to me. Thanks.

please try not to cross post comments, most people read both boards so it just clutters the forum. But try
you could also write your own look at
for file format info
or lastly
search google

You should be able to find a 3ds file loader on the web. There are quite a few out there. There are also quite a few ASE loaders as well, including one in the nvidia SDK. As for 3d Studio Max, After writing an ASE loader I finally got sick an tired of trying to parse such large text files and since then have written my own Max exporter plugin. Look at the Max SDK, the 3ds and ASE exporters are there in their complete source. Very easy to modify to make it do what you want.


Sorry for the cross posting. Thanks very much for your suggestions!


I found this cool program called Deep Exploration.

It allows you to open all sorts of model files, and save them to .cpp files. The cpp files can contain normals, tex coordinates, whatever you specify. And it even writes a display list for you, so all you have to do in your code is:

#include “the_cpp_file”
GLint some_id
some_id = Gen3DObjectList();


Its probably not the fastest thing out there, but it gets teh job done very easily.


[This message has been edited by Ultrix (edited 04-12-2002).]