Model file formats

Recommended Posts

Just wondering how everyone stores their models. I'm looking for an easy to use format which can be exported from 3DS Max and can store bone information (weights, animations etc) and the standard mesh information.

0

Share this post

Link to post

Share on other sites

I've never used it (I'm actually not at the stage in my project where I'm loading many models), but I think that .X has all of those things, and I believe that it's fairly common, so there should be a 3ds exporter for it.

Share this post

Link to post

Share on other sites

You don't need to use the .X file format with DirectX. You should use whatever file format fits into your workflow the best, and supports the options and features your specific game requires. There is no one best file format.

Personally, I use a custom XML-like format that I export from Blender using a Python script (it exports either as pure XML, if I want it readable and don't mind the massive size) or binary tagged with XML-like blocks, as needed. I can feed this format directly to my engine, or to an intermediate tool which will strip off the parts of the model that I don't actually need for whatever specific case I'm working on (the engine can do this too... but that's a runtime thing rather than a preprocessing thing).

The whole system and workflow is pretty robust, and it can be easily optimized to support specific features of a model, or not, as I need. It did, however, take a non-trivial amount of time to set up. :)

If you aren't looking to invest that kind of effort I'd suggest MD3 or MD5, or .X if you really have to (I personally hate the .X format but it IS quite easy to load with DirectX).

0

Share this post

Link to post

Share on other sites

The dotXSI format is available for use. There is an File Toolkit with a DLL that allows to load the info quickly into your game. And if you buy XSIFoundation 5, you get all the source code for the FTK and you can add it to your project.

The greater problem is how to move your objects from Max to XSI. The XSI4Max plugin has a critical flaw that won't allow us to move the first bone. Anyway if you place the first bone in a fixed place, you can handle all your move easilly. Currently we use Kaydara FBX as a way to move from one platform to the other... whick makes me think that my next engine will use FBX as our file format.

Luck!Guimo

0

Share this post

Link to post

Share on other sites

I found an easy one to start with is 3d studios ascii format .ase, its readable in a text editor and stores bone aniamtions in static key frames, which saves alot of hasel when starting to write a loader.Ive managed to get some prety good animations loaded, only problems are that the file size becomes hugh for long animations, due to the static frame storage.

Hope that helps

Tom Hog

0

Share this post

Link to post

Share on other sites

I am writting a MD5 importer/exporter for XSI as part of my MD5 library, so far the library parses and writes md5mesh and md5anim files, but most of the work in building the mesh and animating it realtime is still something the programmer has to do.

Here is a screenshot of the Doom 3 imp, I have not written the skeleton construction code, but the mesh comes up alright.

0

Share this post

Link to post

Share on other sites

I've decided to use the MD5 format. At the moment, I've written the parsing code (but it's untested at the moment), I'm just trying to figure out the best way of sending the skinning information to the GPU.

0

Share this post

Link to post

Share on other sites

Original post by KwizatzI am writting a MD5 importer/exporter for XSI as part of my MD5 library, so far the library parses and writes md5mesh and md5anim files, but most of the work in building the mesh and animating it realtime is still something the programmer has to do.

Here is a screenshot of the Doom 3 imp, I have not written the skeleton construction code, but the mesh comes up alright.

Wow! that's exatly what I've been looking for for a long time! Will this be publicly available? if so, what license will it use?

0

Share this post

Link to post

Share on other sites

Original post by KwizatzI am writting a MD5 importer/exporter for XSI as part of my MD5 library, so far the library parses and writes md5mesh and md5anim files, but most of the work in building the mesh and animating it realtime is still something the programmer has to do.

Here is a screenshot of the Doom 3 imp, I have not written the skeleton construction code, but the mesh comes up alright.

[pic removed]

Wow! that's exatly what I've been looking for for a long time! Will this be publicly available? if so, what license will it use?

Yes, it is loselly LGPL, you can use it for commercial or non commercial projects as much as you want as long as you share any changes and patches, I don't really care whether or not you redistribute the unmodified source though.

It is currently available thru my CVS server, cvsroot :pserver:anonymous@cvs.aeongames.com:/cvsrepo , module md5lib...

If you dont know what I am talking about, let me know and I'll create a snapshot of the source, I have not created Visual Studio project files for the Windows XSI importer/exporter yet though.