Creates an asset from the specified SceneKit scene, using the specified allocator.
- iOS 10.0+
- macOS 10.12+
- tvOS 10.0+
A SceneKit scene object.
An object responsible for allocating mesh vertex and index data. If
nil, Model I/O uses an internal allocator object.
A new asset object.
SceneKit is a high-level framework for modeling, animating, and displaying 3D scenes. (For details, see SceneKit.) The
SCNScene class describes an entire scene to be displayed. A scene contains nodes (
SCNNode objects) that manage the position and orientation of content, such as meshes (
SCNGeometry objects) with attached materials, cameras, and lights. Use this method to convert an entire SceneKit scene and all of its contents to a Model I/O representation, which you can then process or export.
allocator parameter controls vertex and index data allocation for any meshes contained in the scene. For example, to use the MetalKit framework for loading vertex data into GPU buffers for rendering using Metal, pass a
MTKMesh object. By specifying an allocator, you can ensure that mesh data is copied a minimal number of times between being read from a file and being loaded into GPU memory for rendering.