PDA

View Full Version : How to export a model from 3D Studio MAX and show it in C++ using OpenGL



muhammadatharniaz
07-16-2003, 08:58 AM
Please ignore my message regarding delphi..

I am interested in the "How to export a model from 3D Studio MAX and show it in C++ using OpenGL".
Is it possible???
Please also guide me in finding the online sources to achieve this objective.
Thanks a lot....

DalTXColtsFan
07-16-2003, 09:35 AM
As you've no doubt guessed, this is a very frequently asked question http://www.opengl.org/discussion_boards/ubb/smile.gif.
www.gametutorials.com (http://www.gametutorials.com) has a detailed tutorial that achieves this end, as does nehe.gamedev.net. It's all a matter of learning the file format and reading it and either or both of these sites should get you what you want.

Good luck!

muhammadatharniaz
07-16-2003, 09:47 AM
Thank your very much for your kind guidance. I will go through the tutorials and will ask questions if i find some??

nexusone
07-16-2003, 10:35 AM
I forget the name, but there is a piece of software that will converts 3D models into diffrent formats.
I think it supports 3D Studio Max and one of the options is to convert the model into C/C++ code.

But the better aproach is to goto as the other poster stated to a website and learn to read the 3D Studio Max files in without havin to convert the files. Make your program more flexible and to update your model you will not have to re-compile your code, just replace the 3D Max file.


Originally posted by muhammadatharniaz:
Please ignore my message regarding delphi..

I am interested in the "How to export a model from 3D Studio MAX and show it in C++ using OpenGL".
Is it possible???
Please also guide me in finding the online sources to achieve this objective.
Thanks a lot....

jubei_GL
07-18-2003, 01:11 PM
well, one problem with importing 3D max models to openGL is that you will not have support for Skeleton Animation . All you will have is Static 3D model unless you will manually animate it, and that is HARD expecially with more complex human type models .

The easiest way to import 3D max model is to first Extract it in Max to .3ds file . Than inside your OpenGL application you just have to read in the Address( that will tell you what this chunk holds [ex] texture info, camera info, etc ), and few more bytes that
represent the size of this chunk . Once you know the size, you just read in the rest.

Last year I wrote MFC application that actually lets you read in .3ds object and then just takes the Vertices[](float) info and Faces[](V?,V?,V?) info and writes it to a readable file. THan in your OpenGL program you will just read in first array of Vertices and second array of Faces and then just based on Faces reconstruct the 3D model . However I can't seem to find this program anymore, but I still have it Im sure of that.

Reading .3ds file format is VERY EASY, trust me . If you have any problems with it, just ask. I still remember few things, spent countless hours debugging the the things that I read from 3ds .