Model file formats

Started by
10 comments, last by Kwizatz 18 years, 5 months ago
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.
Advertisement
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.
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
I hear that MDL and MD3/4/5 are good to use for meshes with attached skeletons. Softimage XSI has a VERY good format for that sort of stuff but I think it's proprietary.

The Milkshape formats are also very good for basic skeletal 3D models.

If you've got special requirements, you could always write your own in-house format. Quite a lot of development houses do this.
What format you should use depends on what you want to do with the model. If you are making a game with DX, for example, then you will need the .x format.
------------------------------Support the Blue Skies in Games Campaign!A blog... of sorts.As a general rule, if you don't have a general rule in your signature, you aren't as awesome as someone who does. General rules roxor teh big one one ones.
I'm using collada. It is in xml and is pretty easy to use and understand.
http://www.collada.org
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).
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


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
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.

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.

This topic is closed to new replies.

Advertisement