Type Method


Creates an asset from the specified SceneKit scene, using the specified allocator.


+ (instancetype)assetWithSCNScene:(SCNScene *)scnScene bufferAllocator:(id<MDLMeshBufferAllocator>)bufferAllocator;



A SceneKit scene object.


An object responsible for allocating mesh vertex and index data. If nil, Model I/O uses an internal allocator object.

Return Value

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.

The 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 MTKMeshBufferAllocator 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.

See Also

Importing Assets from SceneKit

+ assetWithSCNScene:

Creates an asset from the specified SceneKit scene.