What problem does it solve?
SceneKit provides a high-level, node-based toolkit to create interactive 3D scenes, visuals, and simple physics-driven interactions for iOS apps, removing the need to write low-level rendering code while enabling rapid prototyping and product-ready visual features. It helps developers assemble node hierarchies, apply physically based materials and lighting, animate with actions or transactions, simulate collisions and forces, add particle systems, and integrate scenes into SwiftUI.
Core Features & Use Cases
- Scene composition: create SCNScene graphs, manage SCNNode transforms, and share geometry to reduce draw calls.
- Materials & lighting: apply SCNMaterial with PBR, set up SCNLight types and shadow maps, and scope illumination using category bit masks.
- Animation & physics: animate with SCNAction, SCNTransaction, or explicit Core Animation; configure SCNPhysicsBody, collisions, contact tests, and gravity.
- Model loading & assets: load .usdz, .scn, and other model formats, use SCNReferenceNode for lazy loading, and prefer .usdz for distribution.
- Advanced patterns: custom geometry, shader modifiers, Metal integration via SCNProgram, LOD, render loop delegates, and SpriteKit overlays for HUDs.
- Use case: build an interactive product viewer that loads a .usdz model, supports orbit controls in SwiftUI, displays realistic lighting with PBR materials, and falls back to baked lighting for performance.
Quick Start
Create a SceneView or SCNView, set its scene to an SCNScene that loads a .usdz asset, add a camera node and a directional light, and enable allowsCameraControl for interactive preview.