How to open .obj/3dMAX file in OpenGL

Hi,

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!

Sincerely,

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 www.gametutorials.com
you could also write your own look at www.wotsit.org
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.

Devulon
devulon@hotmail.com

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

Yuyu

I found this cool program called Deep Exploration. http://righthemisphere.com/

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();
glCallList(some_id);

viola.

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

Ultrix

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