Jump to content
  • Advertisement
Sign in to follow this  
Saurabh Dixit

OpenGL 3ds max to opengl

This topic is 3983 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How I can import my 3d object from 3ds max openlGL .And would it possible to import everything like light postion and camera postion set in 3ds max, to opengl.

Share this post


Link to post
Share on other sites
Advertisement
There are more than one options: one is to write an importer for the .3ds file format. If you choose this way there are many reference files over the net describing the file format. I could also give you my importer (only geometry and surface property, and a couple of functions for normals and tangents generations useful for normal mapping). Note that 3ds is quite limited: for example only one uv coordinates set is allowed per surface, IIRC.
Another option is to write a script to directly export data from 3d studio max in your custom forma (a simple text file, for example). This is quite easy and you decide exactly which data you need.
Another possibility is to use COLLADA: you may be able to find plugins for exporting into this format (if not already supported).

Lights and camera settings are avilable in all those options (At least the first two, while I think that collada supports them as well).

Share this post


Link to post
Share on other sites
You could also use lib3ds as a helper library to load 3ds files.
http://lib3ds.sourceforge.net/
Might save you some work on writing your own importer.

Good luck.

Share this post


Link to post
Share on other sites
hey

I'm not sure what relation the *.3ds format did have, or currently has with 3D Studio Max, but the native format for 3D Studio Max since I've known it (since version 3.0) has been the *.max format.

Hmm, I don't know of any docs/specs for the *.max format myself, so I think your best bet would to be write an exporter.

Personally, now days I prefer Blender, and if you are interested I can probably point you towards some places as to learn to write scripts for it.

Anyhows maybe that *.3ds format will be okay for you, as I think it might support data of various other objects, such as lights, cameras and such (assuming the 3dsmax exporter makes use of this). Although I don't think it properly supports skeletal animation, but only some form of object level animation. Another thing is the normals are per face, in which the direction is defined by the order the vertices of a face are stored. Hmm, I hope that made some sense.

If you want to learn about the Autodesk *.3ds format then checkout 3ds-0.93 Specifications, or spacesimulator.net - TUTORIAL 4: 3DS LOADER.

Anyhows that will do for now, hehe.

cyas

Share this post


Link to post
Share on other sites
Quote:
Original post by yosh64
hey

I'm not sure what relation the *.3ds format did have, or currently has with 3D Studio Max, but the native format for 3D Studio Max since I've known it (since version 3.0) has been the *.max format.

Hmm, I don't know of any docs/specs for the *.max format myself, so I think your best bet would to be write an exporter.

Personally, now days I prefer Blender, and if you are interested I can probably point you towards some places as to learn to write scripts for it.

Anyhows maybe that *.3ds format will be okay for you, as I think it might support data of various other objects, such as lights, cameras and such (assuming the 3dsmax exporter makes use of this). Although I don't think it properly supports skeletal animation, but only some form of object level animation. Another thing is the normals are per face, in which the direction is defined by the order the vertices of a face are stored. Hmm, I hope that made some sense.

If you want to learn about the Autodesk *.3ds format then checkout 3ds-0.93 Specifications, or spacesimulator.net - TUTORIAL 4: 3DS LOADER.

Anyhows that will do for now, hehe.

cyas



*.3ds was the format of 3dstudio until the Max line came out. AFAIK the *.max format, unlike *.3ds, is a closed format. Perhaps even 3ds was closed, I don't know, but there is a lot of (un)official documentation about it. I don't belive that there is a freely available document about max format...

Share this post


Link to post
Share on other sites
hey

First I advise you to checkout, and run through the Blender 3D: Noob to Pro - Python Scripting tutorials.

Yep, the Interactive Console script is just great, I found it nice for learning my way around data structures and such.

Also, be careful about what API reference you use, as I found some to be outdated, but I think THIS ONE might be okay :).

BTW, you can find more tutorials at wiki.blender.org - BSoD/Introduction to Python Scripting.

I also found checking out existing scripts helpful too, and as such here is my export script. It's not quite complete and I will update it soon, but it's for exporting models/skeletons/animations. Ohh, and maybe you will find my notes of data structures and such handy.

Finally, if you run into problems or anything, then maybe drop into #blendercoders (irc.freenode.net), and hopefully they can help ya out.

cyas

Share this post


Link to post
Share on other sites

For reading, writing and creating .3ds files an official toolkit is available here.
It may not be the most user friendly library, but it is the most complete 3ds library as far as I know.

Serge van Keulen

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!