Which format file for 3d model SceneKit/ARKit better to use
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 difference between .dae
and .scn
formats is notable. Collada .dae
(which stands for digital asset exchange
) is a cross-platform XML-based schema file format used for graphics and visual effects in 3D authoring apps, like Maya or Blender. SceneKit's .scn
is Xcode's native file format, which works in iOS and macOS apps. Unfortunately, scene's complexity and hierarchical structure aren’t the .dae
and .scn
formats’ strong sides. So, the most robust and effective today 3D file format that you can use in SceneKit
/ARKit
and RealityKit
is a USDZ format.
USD family – Universal Scene Description, developed by Pixar. It is a cross-platform Python-based schema file format has the ability to create a 3D scenes by composing many sources files together into successively larger aggregations.
SceneKit formats
SceneKit
supports many popular 3D formats. Geometry kept in those formats is visible thru 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 its material description.mtl
Alembic interchange file format
.abc
Polygon file format
.ply
Stereolithography file format
.stl
Apple proprietary SceneKit Scene format
.scn
To convert
.fbx
and.glTF
files into.usdz
use command line.
RealityKit formats
Since 2019, the RealityKit framework has been gaining popularity. It works with the following three file formats:
Pixar's Zipped Universal Scene Description
.usdz
Apple Reality Composer multi-scene hierarchy
.rcproject
Apple proprietary format (has much faster uploading time)
.reality
Read about Reality Composer formats
.rcproject
and.reality
here.