我应该使用哪种 3D 模型格式?

发布于 2024-07-14 03:57:03 字数 1433 浏览 16 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

泛滥成性 2024-07-21 03:57:03

Khronos 组(OpenGL 标准机构)拥有

Collada 是一种基于开放 XML 的 3D 模型格式,由 Collada.org 常见问题解答:

COLLADA 1.4.x 功能集包括:

  • 网格几何体
  • 变换层次结构(旋转、平移、剪切、缩放、矩阵)
  • 效果
  • 着色器(Cg、GLSL、GLES)
  • 材质
  • 纹理
  • 灯光
  • 相机
  • 蒙皮
  • 动画
  • 物理(刚体、约束、布娃娃、碰撞、体积)
  • 实例化
  • 技术
  • 多重表示
  • 资产
  • 用户数据

Collada is an open XML based format for 3d models owned by the Khronos group(OpenGL standards body)

From the Collada.org FAQ:

The COLLADA 1.4.x feature set includes:

  • Mesh geometry
  • Transform hierarchy (rotation, translation, shear, scale, matrix)
  • Effects
  • Shaders (Cg, GLSL, GLES)
  • Materials
  • Textures
  • Lights
  • Cameras
  • Skinning
  • Animation
  • Physics (rigid bodies, constraints, rag dolls, collision, volumes)
  • Instantiation
  • Techniques
  • Multirepresentations
  • Assets
  • User data
深府石板幽径 2024-07-21 03:57:03

在担心您想要支持哪些 3D 格式之前,我认为您应该真正关注您计划在引擎中实现哪些功能。 将这些写下来作为要求,并从列表中选择支持大多数功能的格式...因为您想要展示您的引擎(我假设您正在计划公开提供您的引擎)。 如果您的引擎具有特定功能(这对于游戏引擎来说总是一件好事),您甚至可能想推出自己的格式。

之后,支持尽可能多的流行格式(.X、.3DS、.OBJ、.B3D)...您的引擎越容易访问,就越多人愿意使用它!

Collada 是一种很好的通用格式,但就像 Nils 提到的那样,它不是最终部署的理想格式。

Before worrying about what 3D formats you want to support, I think you should really focus on what features you are planning to implement in your engine. Write those down as requirements, and pick the format that supports the most features from the list... as you'll want to showcase your engine (I am assuming you are planning for your engine to be publicly available). You might even want to roll your own format, if your engine has specific features (which is always a good thing to have for a game engine).

After that, support as many of the popular formats as you can (.X, .3DS, .OBJ, .B3D)... the more accessible your engine is, the more people will want to work with it!

Collada is a nice and generic format, but like Nils mentions, it is not an ideal format for final deployment.

暮年慕年 2024-07-21 03:57:03

我使用自己的二进制格式。 我尝试过使用现有的格式,但总是遇到限制。 有些是可以解决的,有些则很糟糕。

科拉达可能值得一看。 我不认为它是一种适合 3D 引擎读取的格式。 不过作为通用数据交换格式还是不错的。

http://www.collada.org/mediawiki/index.php/Main_Page

I use my own binary format. I've tried to use existing formats but always run into limitations. Some could be worked around, others where showstoppers.

Collada may be worth a look. I don't think that it's that good as a format to be read by a 3D engine. It's fine as a general data-exchange format though.

http://www.collada.org/mediawiki/index.php/Main_Page

梦醒时光 2024-07-21 03:57:03

科拉达+1。 您可能还需要自定义本机二进制格式以实现真正的快速加载(通常只是顶点/索引缓冲区数据的二进制转储,加上材质和骨架数据,以及碰撞数据(如果适用))。

游戏行业的一个趋势是支持在引擎的开发人员版本中加载像 collada 这样的格式,但也有一个工具链可以导出优化版本以供发布。 开发人员版本可以动态更新网格,因此当艺术家保存更改时,文件会自动重新加载,使他们能够(几乎)即时获得模型的所见即所得视图,但仍然提供完全优化的发布格式。

+1 for Collada. You may also want a custom native binary format for really fast loading (usually just a binary dump of vertex/index buffer data, plus material and skeleton data, and collision data if appropriate).

One trend in the games industry is to support loading a format like collada in the developer build of the engine, but also have a toolchain that exports an optimized version for release. The developer version can update the mesh dynamically, so as artists save changes, the file is automatically reloaded allowing them an (almost) instant WYSIWYG view of their model, but still providing a fully optimised release format.

半岛未凉 2024-07-21 03:57:03

很好地支持 Collada,然后提供与其他格式之间的良好转换器(这可能是困难的部分)。 这将为您提供最大的灵活性。 看看 C4 引擎

support Collada well, and then supply good converters to/from the other formats (this might be the hard part). This will give you maximum flexibility. Take a look at C4 engine

我是有多爱你 2024-07-21 03:57:03

Collada 很棒,但它更多的是在 3D 应用程序方面。 即,它最适合在应用程序之间传输 3D 数据,而不是从游戏引擎内加载 3D 数据。 你研究过Lua吗? 它在游戏中被广泛使用,因为它是一种脚本语言,速度快得离谱(非常适合游戏),而且非常灵活(可用于表示引擎所需的任何数据)。

Collada is great, but it lives more on the 3D app side of things. ie it's best used for transferring 3D data between applications, not loading 3D data from within a games engine. Have you looked into Lua? It's widely used in games because its a scripting language that's both ridiculously quick (perfect for games) and very flexible (can be used to represent whatever data you need for your engine).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文