3D File Formats for Games

∥☆過路亽.° 提交于 2019-12-04 17:26:14

问题


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.


回答1:


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.




回答2:


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.




回答3:


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.




回答4:


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

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




回答5:


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?




回答6:


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.




回答7:


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




回答8:


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




回答9:


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



来源:https://stackoverflow.com/questions/1174982/3d-file-formats-for-games

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!