How to open .obj 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 also be very helpful to me.

I am kinda in the same boat.

If you go to www.gametutorials.com and look through their gl tutorials they give working code with comments on loading 3ds, quake, obj other stuff.

I am still looking for animation for a 3ds file, they just tease us with it.

Hope this helped.

I’m also interested in the .3ds keyframe tutorials at GameTutorials.com, but haven’t purchased their CD yet. I’m currently working on keyframe animation in my project, and I’ve found some alternatives.

One is Lib3DS, which can be found at: http://lib3ds.sourceforge.net

The other option I’ve found can is Display3DS, which can be found here: http://www.codeproject.com/useritems/Display3DS.asp

I hope this helps…

Nate Robins has a nice tutor with a obj loader, you can find it on his site.
http://www.xmission.com/~nate/opengl.html

Originally posted by yuyudai:
[b]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 also be very helpful to me.[/b]

Thanks!
Yuyu

With the 3dslib, I don’t have cygwin and probably wouldn’t know how to use it. I am sadly windows dependent and I have a Redhat installed but don’t have time to get into it.

Will the 3dslib completely not work if I don’t have Cygwin?

Can I just download the .dll and header somewhere for a win98 machine?

thanks…

Originally posted by escozooz:
[b]With the 3dslib, I don’t have cygwin and probably wouldn’t know how to use it. I am sadly windows dependent and I have a Redhat installed but don’t have time to get into it.

Will the 3dslib completely not work if I don’t have Cygwin?

Can I just download the .dll and header somewhere for a win98 machine?

thanks…[/b]

Actually, I decided not to go the lib3ds route because it looked a bit more complex, especially for me being somewhat of an Opengl newbie.

Display3ds might meet your needs better, it appears to be easier to integrate when you may not be the most proficient c++/opengl programmer. I’m looking at Display3ds as a reference to the .3ds file format, observing how he creates his data structure, and altering it to fit my project.

Hope this helps…

Check out

http://www.wotsit.org

There’s a lot of info and code pieces on different file formats.