Jump to content
  • Advertisement
Sign in to follow this  
Little Coding Fox

General Solution to writing model exporters?

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

Hey everyone. Lately the development of my game engine has been a bit slow 'cos i've been trying to think of a way to create exporters to my own 3D format in a good way, without having to write the same exporter for various modellers, so i thought about writing a model format converter. However, i have a bit of a hard time trying to figure out how to work with the COLLADA api's or the FBX api's, collada's 'cos i cant find a non-java-based api, and FBX's 'cos i cant find a tutorial that EXPLAINS things properly instead of mixing stuff and getting me all confused in the end. So my question is, do you guys know of a good way to write a model format converter that can convert both static and animated models to my own format? Sorry for writing such a strange post... i hope somebody can help me Sory for the trouble, and have a nice day!

Share this post


Link to post
Share on other sites
Advertisement
Here's how I'm doing it:

Like you I decided writing importer/converters was simpler than learning many app's APIs.

I decided on a simple binary model format of my own, which could be read straight into VBO without any changes.

Python is very well suited to writing simple parsers due to it's interactivity and easy use of functional stuff and lambdas. I use python to parse the external model formats and write out my simple binary format. I have a python class that takes the data in a standard format and writes the files. This means if I decide to change my file formats later I'll only have to change this class, instead of many exporters. As the exporters could all be in different weird scripting languages, this is much more appealing to me. [smile]

So far I've done halflife smd, brown ifs, and obj. I plan to do collada at some point soon, but I think I'll just use a markup parser like Beautiful Soup and just scrape out the bits I'm interested in, as opposed to using fcollada for example. I'm not interested in supporting the entire collada format - that's for the tool developers. I'll use the collada refinery to get the data in the form I need - triangle lists, vert attributes - then parse that and ignore the rest.

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.

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!