Which format file for 3d model SceneKit/ARKit better to use

风格不统一 提交于 2019-11-30 21:13:34

DAE (Digital Asset Exchange, aka Collada) is a vendor-neutral format for 3D assets. It supports a wide range of features that exist in multiple 3D authoring and presentation tools, but not every possible feature in SceneKit. Historically, it was the only asset format for early versions of SceneKit.

SCN format is a serialization of the SceneKit object graph. (There are convenience methods for reading/writing it on SCNScene, but really it's the same thing you get by passing an SCNScene to NSKeyedArchiver/NSKeyedUnarchiver.) Thus, it by definition supports all features of SceneKit, including physics, constraints, actions, physically based cameras, and shader modifiers.

If you're using DAE assets, deploying to iOS (or tvOS or watchOS), and not seeing any difference vs using SCN assets, there are two possible reasons:

  • Your assets use only those SceneKit features that are available in DAE format.
  • When deploying to iOS/tvOS/watchOS, Xcode (via scntool) automatically converts all 3D asset resources to SCN format. (And applies other transformations, like interleaving geometry buffers, for optimal rendering performance on iOS/tvOS/watchOS devices.) The filename in the built app's Resources directory still has a .dae extension, but the file contents are the same as SCN format.

    (SceneKit running in iOS/tvOS/watchOS actually can't read DAE, so it relies on this preprocessing by Xcode.)

The most effective 3D format that you can use in SceneKit/ARKit is a USDZ format.

USD – Universal Scene Description, was developed by Pixar. The file has the ability to create a 3D scene by composing many sources files together into successively larger aggregations. This is great but this could be a problem using USD to deliver assets in the form that they have been built up. There is a no mechanism for representing images/textures as scene descriptions encodable in USD files. Also these assets can be delivered on a variety of systems and platforms if it's a single object, can be streamed and usable without unpacking to a filesystem.

SceneKit framework supports several popular 3D file formats at the moment (geometry saved in these formats is visible in ARSCNView):

  • Collada's Digital Asset Exchange .dae

  • Pixar's Zipped Universal Scene Description .usdz

  • Pixar's ASCII Universal Scene Description .usda

  • Pixar's Binary Universal Scene Description .usd, .usdc

  • Wavefront Object .obj along with material .mtl

  • Alembic interchange file format .abc

  • Polygon File Format .ply

  • Stereolithography File Format .stl

  • SceneKit Scene .scn

  • About Reality Composer files .rcproject read here.

Hope this helps.

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