16

I'm getting started with XNA and Blender and am trying to find good quality, up to date information on the various 3D file formats that are used in game development.

Clearly many games are developed with multiple and custom 3D file formats, but I'm interested in choosing a good solution using a more commonly supported format.

What are the most popular formats and what distinguishes them?

NOTE Ideally, they should support animations, but I would also be interested in other formats that might be used for building maps or static objects.

BinaryMisfit
  • 29,219
  • 2
  • 37
  • 44
Michael La Voie
  • 27,772
  • 14
  • 72
  • 92

9 Answers9

10

In XNA, penalty of trying to do anything on your own (load data formats in particular) is much higher than living with imperfections of the ones supported right off the shelf, at least that's what the documentation looks like, and what i heard from someone who bended the content pipeline dearly to support what he needs (runtime geometry generation) and whom i trust to know what he is doing. So i guess .X and .FBX are pretty much gonna be it. They both support skeletal animation, and i think also vertex morping. I'm not exactly sure what features exactly Blender is able to export into them, but i can look into it if you like.

Blender 2.5 is going to finally have good Collada support (current one doesn't have armatures and is broken in multitude of ways), and Autodesk provides a good tool for Collada <-> FBX conversion.

If you look around hobby development community, you'll see that Id software data formats are quite popular. On the one hand the MD2 and MD3 vertex morphing character animation formats, MD5 skeletal animation format, whose needs are obviously covered by the above, and on the other hand the BSP file format, which describes game levels.

One thing that speaks for BSP is that a good editor is available (GTKRadiant and derivatives). This is an efficient format which can cull hidden geometry. However, the runtime cost of building custom geometry in XNA is significant, and with the limits of these formats are quite modest at 64k vertices and 64k polygons in the whole game level, which is something you can just dump onto the graphics card nowadays and no performance drop will be noticeable. So you don't gain any benefit from supporting it directly.

I doubt there are any powerful, modern, available formats and tools for culling-optimized level design, whose performance benefits would translate into XNA.

A couple of links you might want to check out, if you haven't already:

3D World Studio content pipeline

Quake port

All unmaintained and out of date, no idea how optimized or not.

3yE
  • 508
  • 3
  • 12
7

The already mentioned COLLADA and FBX are the only standard formats that have achieved any significant adoption in the games industry. Few games will load them directly though - they are generally used as intermediate formats for export from DCC apps and then further processed into more optimized runtime formats that are generally custom and engine specific.

Hobbyist developers often use file formats from popular games as a starting point. The Quake 3 model and map formats were quite popular for a while. Microsoft's .X format was also quite popular for hobbyist projects due to the availability of a number of exporters and loading support in the D3DX framework.

mattnewport
  • 13,728
  • 2
  • 35
  • 39
6

If you're using XNA, then the best option is probably FBX. The main reason I say this is that it is the single, non XNA specific, format supported natively by XNA in the content creation pipeline.

Reed Copsey
  • 554,122
  • 78
  • 1,158
  • 1,373
  • Thanks for the advice, though I'm still interested in other formats, especially if someone else has already created an open source importer/processor – Michael La Voie Jul 24 '09 at 00:03
  • @The Lame Duck: Why would you want something else if you can get the best results using fbx format? Like Reed mentionned, XNA will natively support it, and if Blender does export to that format, that would probably be your best option. – tomzx Jul 24 '09 at 00:15
  • @tomzx - Very true, fbx may be the best option. I'm still curious how it compares to .md3 or .md5 or even COLLADA. Does it support the same features? – Michael La Voie Jul 24 '09 at 00:34
  • 1
    FBX supports just about all of the main features - it's was designed to handle all of the same feature sets as collada (as well as export to collada), plus other things in addition. See: http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=8224926 – Reed Copsey Jul 24 '09 at 00:44
  • Thanks @Reed Copsey. Thats a great link and I will go with FBX. – Michael La Voie Jul 24 '09 at 17:38
  • Main thing to bear in mind about FBX is that it's proprietary and owned by Autodesk. I'd also add that I've never come across a games dev studio that uses it. COLLADA is big, complex but has the advantage of being an open standard – zebrabox Aug 05 '09 at 08:24
5

You probably want to look at COLLADA which is a widely used standard in 3D game development:

http://en.wikipedia.org/wiki/COLLADA

boxofrats
  • 882
  • 6
  • 8
  • COLLADA is a freaking mess to parse yourself though. If you should go this route, get some sort of parsing library. – Ricket Jul 24 '09 at 13:48
3

I chose the MS3D format because its specification is simple, makes sense, does have animation and also rigging (joints), and is documented.

Also see my previous question, very similar to this one, and the answer I wrote to it (which, oddly enough, seems to be at the bottom of the page):

[SOLVED] Recommended 3D model type for in-game character model, loaded manually?

Community
  • 1
  • 1
Ricket
  • 33,368
  • 30
  • 112
  • 143
2

It might be worth giving glTF a look.

There is also a glTF 2.0 version in the works that adds physics based rendering support. Draft on the Khronos site.

Assimp has 'partial' support for it. Not sure what's lacking.

There's also a bunch of loaders for different languages (C++, WebGL/JS, Rust, Go) on the github.

There's also a COLLADA to gltf converter.

It uses a JSON file as a kind of manifest then loads the data into other files such as .bin for binary, various images and glsl for shaders. There is a binary extension though.

Of course since it's newish (and still under development) support won't be so great. Last time I looked COLLADA's was a fairly hit and miss too.

There is also Declarative 3D.

See this paper that covers both.

Both of those format do have a bit of a web focus, but should be fine for games too.

David C. Bishop
  • 6,437
  • 3
  • 28
  • 22
0

Not an expert (far from it, just toyed around).

I guess that the 3d studio max format (.3ds) is quite used, as well as renderman RIB file. I was also fond of the AC3D file format (it's plain text).

Stefano Borini
  • 138,652
  • 96
  • 297
  • 431
0

For many years now the DirectX file format (.x extension) is very popular and Blender contains a built-in exporter for this.

Wayne Koorts
  • 10,861
  • 13
  • 46
  • 72
  • 1
    This is not generally considered a good format but for learning about 3D APIs it'll be more than adequate for the job. – Skizz Jul 24 '09 at 13:58
0

PMD file. They are used for MMD animations and much more! Just search around Deviantart.com for things like "MMD models"

PMD and PMX AND OBJ