I'm writing my own small-time game from scratch, and now I'm looking to start creating models. I've been wondering- what is the best model format to use? Given that I will be writing the model loading code myself and using whatever program generates them. Ideally, I'd look for a format that has fairly wide support between modelling programs, so I can pick the one I like most to actually perform the building, and the format itself would be relatively simple to load, rather than having all of the latest features.

  • \$\begingroup\$ What would be your first choice in terms of a modeling tool? \$\endgroup\$ – user1430 Feb 6 '11 at 17:46
  • 1
    \$\begingroup\$ Collada DAE is an exchange format that most tools can output to. Its up-straight, good ole XML. \$\endgroup\$ – brainydexter Feb 6 '11 at 18:48
  • \$\begingroup\$ @Josh Petrie: I don't really have any experience with modelling tools, which is why I was looking for larger support- so that I could experiment and pick a tool after building my model system and checking that it works. \$\endgroup\$ – DeadMG Feb 11 '11 at 18:16

I have used Value's SMD format for a while to good effect (there's an extremely bare bones loader checked in to the SlimDX repository; it's in C# but it should be easily translatable to C++). I picked it because it was straightforward to load and debug (since it's a text-based format), supported textures and skeletal animation, and was natively supported by the XSI Mod Tool.

I used it as an interchange format which was eventually compiled down to a proprietary binary format.

Although it seems like Valve has replaced SMD with DMX, which I don't know much about.

.X is a reasonable choice as well -- although it's being phased out to a degree by the DX SDK, it's still possibly to load the files even in later versions of Direct3D (if you don't mind round-tripping through the 9 D3DX interfaces) and you can find exporters for just about every modeling tool out there.

.obj is also common, but lacks animation support (if that matters).

If you don't mind setting up a longer asset pipeline, and cannot find a combination of format + modelling tool + exporter that works for you, you might consider looking in to FBX or Collada. They're both interchange formats -- so you probably don't want to load them directly (Collada, in particular, is painfully verbose), but you may be able to construct an asset transformation pipeline using the tools associated with both formats to allow you to use the model format you want with the modelling tool you like best.


Since you've tagged DirectX, you could use .X meshes. You can then export 3D Studio Max models using the Panda Exporter (Found here: http://www.andytather.co.uk/Panda/directxmax.aspx)

If you don't want to use the DX meshes for any reason, you could potentially use Lib3DS (Found at: http://code.google.com/p/lib3ds/) Although it's not very well documented and you might end up pulling your hair out :) There is a tutorial on using it here: http://www.donkerdump.nl/node/207

The advantage here is that you don't need to export your .3DS meshes.

Of course if you want the format to be used in a wide variety of modelling programs, then you're probably going to need an exporter (Like Panda above). You could also use the .OBJ format which is a human readable file, so it's not too difficult to parse and write some loading code for it. I'm no expert in OBJ files, since the .X format has been suitable for my needs so far.

Hope that helps.


If you want to use non-animated models and want to write your own loader, I would recommend OBJ format. I have used it several times and it's simple and easy to load.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.