Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

johnnyBravo

I want to load meshes..what file type .3ds?

This topic is 5179 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

Hi, i use to use direct3d and loaded .x files, i am now confused on how to load meshes for opengl, i want to use a free file type, eg anim8or is what i use to make my models, and i can export to 3ds, i thought there might be a tutorial on 3ds or an8 files. Or is there some file type that opengl people generally use?

Share this post


Link to post
Share on other sites
Advertisement
A 3DS file is somewhat bloated, you could readin the 3DS file and save to your own format.

There are plenty of tutorials for loading and parsing a 3DS file. Check over at www.gametutorials.com and www.wotsit.org. They both explain the file format and give examples of loading it. If you need the animation information do a search on the Articles and Resources section with the google search tool.

Of course you could always use a different file format (ex. milkshape, obj, whatever). There a programs for free that will convert the format for you.

dimebag

Share this post


Link to post
Share on other sites
I took the approach suggested by the previous posted. .3DS files are easy to find on the web for free or for cheap. most people can export to that format so it's a nice one to support. I wrote a compile time program that converts .3DS files to my own model file format. this reduces runtime file loading time since i can put the model into a format directly supported by my engine so it's a quick read in -> typecast -> get running solution.

this requires you, of course, to develop your own model format, but if you're already displaying objects in your game this should be a pretty easy task. writing the .3DS importer can be a bit of a pain but you'll appreciate learning your way around binary file reading & manipulation.

you can find the .3DS model format on the web along with a small number of useful tutorials through the wunderkind google.

-me

[edited by - Palidine on June 10, 2004 2:18:31 PM]

Share this post


Link to post
Share on other sites
I''ve just finished a 3ds importer for a demo. I''ve acctually never worked with "chunk-based" files before, it was quite an interesting learning experience.

3DS is good since it has widespread use, but it has some problems, most notably the fact that there is no official documentation for it, and different programs exports the files a little different. Luckliy, Milkshape can often save it back into a consistent format.

I''ve heard quite a number of good comments about Milkshapes modelformat, so it might be worth checking out. NeHe (http://nehe.gamedev.net) has a tutorial on loading it in any event.

For most home projects (game-like), game-specific formats can be very useful. Loaders for Q2 and Q3 model formats can be found under virtually every rock...

Share this post


Link to post
Share on other sites
3DS files do support animation. You have to read in the keyframes and do the interpolation yourself. Gametutorials has a section on this, but you have to buy the CD. If you want more info on 3DS animation do a google search under the Articles and Resources tab for "3DS Keyframe Animation" you will find info on how to do this.

If you have questions let me know. I just went through learning all of this. I am in the process of writting an app to read in a 3DS file and display the contents in a tree view and have it to where the user can export individual chunks.

dimebag

Share this post


Link to post
Share on other sites
I''d just like to tack a question or two on to this discussion: I''m in the (very) early stages of writing a 3DS loader/converter, and the models I''m having made will be built in parts, with "links" between them (like a car model would have links where the wheels attach, for example. This is required in my project for rotation of certain parts). If a model is built in a 3DS scene (which it will be), can I load the individual meshes/parts from that scene, so I can convert them to my own internal format and link them together in the program? I assume that you can load individual meshes/parts, and identify them by their names?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!