游戏的 3D 文件格式 [英] 3D File Formats for Games

查看:31
本文介绍了游戏的 3D 文件格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开始使用 XNABlender 并试图找到关于游戏开发中使用的各种 3D 文件格式的高质量、最新信息.

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.

显然,许多游戏都是使用多种自定义 3D 文件格式开发的,但我有兴趣选择使用更普遍支持的格式的良好解决方案.

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.

推荐答案

在 XNA 中,尝试自己做任何事情(特别是加载数据格式)的代价比忍受那些立即支持的不完美要高得多架子上,至少这就是文档的样子,以及我从一个非常弯曲内容管道以支持他需要的东西(运行时几何生成)的人那里听到的,我相信他知道他在做什么.所以我想 .X 和 .FBX 几乎就是这样.它们都支持骨骼动画,我认为也支持顶点变形.我不确定 Blender 到底能导出哪些功能,但如果你愿意,我可以研究一下.

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 最终将获得对 Collada 的良好支持(目前的版本没有骨架并且以多种方式损坏),并且 Autodesk 为 Collada <-> FBX 转换提供了一个很好的工具.

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.

如果您环顾业余开发社区,您会发现 Id 软件数据格式非常流行.一方面是MD2和MD3顶点变形角色动画格式,MD5骨骼动画格式,显然上面已经涵盖了它们的需求,另一方面是描述游戏关卡的BSP文件格式.

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.

BSP 的一个特点是有一个好的编辑器(GTKRadiant 和衍生工具).这是一种可以剔除隐藏几何体的有效格式.然而,在 XNA 中构建自定义几何体的运行时成本是巨大的,并且这些格式的限制在整个游戏级别中只有 64k 个顶点和 64k 个多边形,这是您现在可以直接转储到显卡上的东西,而没有性能下降会很明显.因此,您不会从直接支持它中获得任何好处.

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.

我怀疑是否有任何强大的、现代的、可用的格式和工具用于剔除优化的关卡设计,其性能优势会转化为 XNA.

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 世界工作室内容管道

地震端口

所有未维护和过时的,不知道如何优化.

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

这篇关于游戏的 3D 文件格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆