views:

805

answers:

7

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.

+3  A: 

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

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

boxofrats
COLLADA is a freaking mess to parse yourself though. If you should go this route, get some sort of parsing library.
Ricket
Yep like FCollada http://www.feelingsoftware.com/content/view/62/76.
zebrabox
+5  A: 

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
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
@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
@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
Reed Copsey
Thanks @Reed Copsey. Thats a great link and I will go with FBX.
Michael La Voie
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
A: 

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
+5  A: 

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
A: 

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

Wayne Koorts
This is not generally considered a good format but for learning about 3D APIs it'll be more than adequate for the job.
Skizz
+2  A: 

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?

Ricket
+3  A: 

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
Thanks for the excellent info!
Michael La Voie