A set of shading attributes that define the appearance of a geometry's surface when rendered.
- iOS 8.0+
- macOS 10.8+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
When you create a material, you define a collection of visual attributes and their options, which you can then reuse for multiple geometries in a scene.
A material has several visual properties, each of which defines a different part of SceneKit’s lighting and shading process. Each visual property is an instance of the
SCNMaterial class that provides a solid color, texture, or other 2D content for that aspect of SceneKit’s rendering. The material’s
lighting property then determines the formula SceneKit uses to combine the visual properties with the lights in the scene to produce the final color for each pixel in the rendered scene. For more details on the rendering process, see
You attach one or more materials to an instance of the
SCNGeometry class using its
materials property. Multiple geometries can reference the same material. In this case, changing the attributes of the material changes the appearance of every geometry that uses it.