<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNMaterial",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNMaterial"
  },
  "title" : "SCNMaterial"
}
-->

# SCNMaterial

A set of shading attributes that define the appearance of a geometry’s surface when rendered.

```
class SCNMaterial
```

## Overview

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 [`SCNMaterialProperty`](/documentation/SceneKit/SCNMaterialProperty) class that provides a solid color, texture, or other 2D content for that aspect of SceneKit’s rendering. The material’s [`lightingModel`](/documentation/SceneKit/SCNMaterial/lightingModel-swift.property) 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 [`SCNMaterial.LightingModel`](/documentation/SceneKit/SCNMaterial/LightingModel-swift.struct).

You attach one or more materials to an instance of the [`SCNGeometry`](/documentation/SceneKit/SCNGeometry) class using its [`firstMaterial`](/documentation/SceneKit/SCNGeometry/firstMaterial) or [`materials`](/documentation/SceneKit/SCNGeometry/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.

## Topics

### Creating a Material

[`+  material`](/documentation/SceneKit/SCNMaterial/material)

Creates a new material object.

[`+  materialWithMDLMaterial:`](/documentation/SceneKit/SCNMaterial/materialWithMDLMaterial:)

Creates a material from the specified Model I/O material object.

[`name`](/documentation/SceneKit/SCNMaterial/name)

A name associated with the material.

### Choosing a Shading Model

[`lightingModelName`](/documentation/SceneKit/SCNMaterial/lightingModel-swift.property)

The lighting formula that SceneKit uses to render the material.

[`LightingModel`](/documentation/SceneKit/SCNMaterial/LightingModel-swift.struct)

Constants specifying the lighting and shading algorithm to use for rendering a material.

### Visual Properties for Physically Based Shading

[`diffuse`](/documentation/SceneKit/SCNMaterial/diffuse)

An object that manages the material’s diffuse response to lighting.

[`metalness`](/documentation/SceneKit/SCNMaterial/metalness)

An object that provides color values to determine how metallic the material’s surface appears.

[`roughness`](/documentation/SceneKit/SCNMaterial/roughness)

An object that provides color values to determine the apparent smoothness of the surface.

### Visual Properties for Special Effects

[`normal`](/documentation/SceneKit/SCNMaterial/normal)

An object that defines the nominal orientation of the surface at each point for use in lighting.

[`displacement`](/documentation/SceneKit/SCNMaterial/displacement)

[`emission`](/documentation/SceneKit/SCNMaterial/emission)

An object that defines the color emitted by each point on a surface.

[`selfIllumination`](/documentation/SceneKit/SCNMaterial/selfIllumination)

An object that provides color values representing the global illumination of the surface.

[`ambientOcclusion`](/documentation/SceneKit/SCNMaterial/ambientOcclusion)

An object that provides color values to be multiplied with the ambient light affecting the material.

### Visual Properties for Basic Shading

[`diffuse`](/documentation/SceneKit/SCNMaterial/diffuse)

An object that manages the material’s diffuse response to lighting.

[`ambient`](/documentation/SceneKit/SCNMaterial/ambient)

An object that manages the material’s response to ambient lighting.

[`specular`](/documentation/SceneKit/SCNMaterial/specular)

An object that manages the material’s specular response to lighting.

[`reflective`](/documentation/SceneKit/SCNMaterial/reflective)

An object that defines the reflected color for each point on a surface.

[`multiply`](/documentation/SceneKit/SCNMaterial/multiply)

An object that provides color values that are multiplied with pixels in a material after all other shading is complete.

[`transparent`](/documentation/SceneKit/SCNMaterial/transparent)

An object that determines the opacity of each point in a material.

[`shininess`](/documentation/SceneKit/SCNMaterial/shininess)

The sharpness of specular highlights. Animatable.

[`fresnelExponent`](/documentation/SceneKit/SCNMaterial/fresnelExponent)

A factor affecting the material’s reflectivity. Animatable.

[`locksAmbientWithDiffuse`](/documentation/SceneKit/SCNMaterial/locksAmbientWithDiffuse)

A Boolean value that determines whether the material responds identically to both ambient and diffuse lighting. Animatable.

### Managing Opacity and Blending

[`transparency`](/documentation/SceneKit/SCNMaterial/transparency)

The uniform transparency of the material. Animatable.

[`transparencyMode`](/documentation/SceneKit/SCNMaterial/transparencyMode)

The mode SceneKit uses to calculate transparency for the material.

[`SCNTransparencyMode`](/documentation/SceneKit/SCNTransparencyMode)

The modes SceneKit uses to calculate the opacity of pixels rendered with a material, used by the [`transparencyMode`](/documentation/SceneKit/SCNMaterial/transparencyMode) property.

[`blendMode`](/documentation/SceneKit/SCNMaterial/blendMode)

The mode that determines how pixel colors rendered using this material blend with other pixel colors in the rendering target.

[`SCNBlendMode`](/documentation/SceneKit/SCNBlendMode)

Modes that describe how SceneKit blends source colors rendered using a material with destination colors already in a rendering target, used by the [`blendMode`](/documentation/SceneKit/SCNMaterial/blendMode) property.

### Customizing Rendered Appearance

[`litPerPixel`](/documentation/SceneKit/SCNMaterial/isLitPerPixel)

A Boolean value that determines whether SceneKit performs lighting calculations per vertex or per pixel. Animatable.

[`doubleSided`](/documentation/SceneKit/SCNMaterial/isDoubleSided)

A Boolean value that determines whether SceneKit renders both front and back faces of a surface.

[`cullMode`](/documentation/SceneKit/SCNMaterial/cullMode)

The mode determining which faces of a surface SceneKit renders. Animatable.

[`SCNCullMode`](/documentation/SceneKit/SCNCullMode)

The modes SceneKit uses to determine which polygons to render in a surface, used by the [`cullMode`](/documentation/SceneKit/SCNMaterial/cullMode) property.

[`fillMode`](/documentation/SceneKit/SCNMaterial/fillMode)

[`SCNFillMode`](/documentation/SceneKit/SCNFillMode)

### Managing Render Targets

[`writesToDepthBuffer`](/documentation/SceneKit/SCNMaterial/writesToDepthBuffer)

A Boolean value that determines whether SceneKit produces depth information when rendering the material.

[`readsFromDepthBuffer`](/documentation/SceneKit/SCNMaterial/readsFromDepthBuffer)

A Boolean value that determines whether SceneKit uses depth information when rendering the material.

[`colorBufferWriteMask`](/documentation/SceneKit/SCNMaterial/colorBufferWriteMask)

[`SCNColorMask`](/documentation/SceneKit/SCNColorMask)

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`SCNShadable`](/documentation/SceneKit/SCNShadable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`SCNAnimatable`](/documentation/SceneKit/SCNAnimatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)