Which 3D Model format should I be using?

后端 未结 6 1538
别那么骄傲
别那么骄傲 2020-12-29 03:43

Im writing a game engine and I\'m wondering what 3D model format should I use/load/export? Obj seems universal and easy but it also appears to be unreliable in that most mod

相关标签:
6条回答
  • 2020-12-29 04:09

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

    0 讨论(0)
  • 2020-12-29 04:17

    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

    0 讨论(0)
  • 2020-12-29 04:20

    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
    0 讨论(0)
  • 2020-12-29 04:20

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

    0 讨论(0)
  • 2020-12-29 04:29

    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.

    0 讨论(0)
  • 2020-12-29 04:30

    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

    0 讨论(0)
提交回复
热议问题