Sign in to follow this  
f8k8

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.

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

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

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


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

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.

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.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kwizatz
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.



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?

Share this post


Link to post
Share on other sites
Quote:
Original post by Code-R
Quote:
Original post by Kwizatz
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.

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this