<!--
{
  "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/SCNMaterialProperty",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNMaterialProperty"
  },
  "title" : "SCNMaterialProperty"
}
-->

# SCNMaterialProperty

A container for the color or texture of one of a material’s visual properties.

```
class SCNMaterialProperty
```

## Overview

A material has several visual properties that together determine its appearance under lighting and shading. SceneKit renders each pixel in the scene by combining the information from material properties with the locations, intensities, and colors of lights.

A material property’s contents can be either a color, which provides a uniform effect across the surface of a material, or a texture, which SceneKit maps across the surface of a material using texture coordinates provided by the geometry object the material is attached to. A texture, in turn, can come from any of several sources, such as an image object, a URL to an image file, a specially formatted image or set of images for use as a cube map, or even animated content provided by Core Animation, SpriteKit, or AVFoundation—for the full set of options, see the [`contents`](/documentation/SceneKit/SCNMaterialProperty/contents) property.

> Note:
> Typically, you associate texture images with materials when creating 3D assets with third-party authoring tools, and the scene files containing those assets reference external image files. For best results when shipping assets in your app bundle, place scene files in a folder with the `.scnassets` extension, and place image files referenced as textures from those scenes in an Asset Catalog.
> 
> Xcode then optimizes the scene and texture resources for best performance on each target device, and prepares your texture resources for delivery features such as App Thinning and On-Demand Resources.

SceneKit uses the material property’s [`contents`](/documentation/SceneKit/SCNMaterialProperty/contents) object in different ways for each visual property of a material. For example:

- When you provide a color for the [`diffuse`](/documentation/SceneKit/SCNMaterial/diffuse) property, it determines the material’s base color—geometries using the material appear shaded in gradations of this color when illuminated by white light. If you instead provide an image, SceneKit maps the image across the geometry’s surface instead of shading with a uniform base color.
- When you provide a color for the [`specular`](/documentation/SceneKit/SCNMaterial/specular) property, it affects the color of light reflected directly toward the viewer from the surface of a geometry using the material. If you instead provide a grayscale image, it determines the tendency of the material to reflect light directly toward the viewer—lighter pixels in the image make those areas of the material appear more shiny, and darker pixels make the material appear more matte.
- The [`normal`](/documentation/SceneKit/SCNMaterial/normal) property specifies the orientation of a surface at each point. Materials are uniformly smooth by default, so specifying a color for this property has no useful effect. Instead, you can specify an image for this property that describes the contours of the surface. SceneKit uses this image (called a normal map) in lighting, creating the illusion of a complex, bumpy surface without increasing the complexity of the geometry.

For more details on each visual property and the ways their contents affect a material’s appearance, see [`SCNMaterial`](/documentation/SceneKit/SCNMaterial).

SceneKit also uses [`SCNMaterialProperty`](/documentation/SceneKit/SCNMaterialProperty) objects elsewhere:

- To provide content to be rendered behind a scene, in the [`background`](/documentation/SceneKit/SCNScene/background) property of an [`SCNScene`](/documentation/SceneKit/SCNScene) object,
- To affect the color and shape of illumination from a light source, in the [`gobo`](/documentation/SceneKit/SCNLight/gobo) property of an [`SCNLight`](/documentation/SceneKit/SCNLight) object.
- To bind texture samplers to custom GLSL shader source code snippets, in classes conforming to the [`SCNShadable`](/documentation/SceneKit/SCNShadable) protocol.

## Topics

### Creating a Material Property

[`+  materialPropertyWithContents:`](/documentation/SceneKit/SCNMaterialProperty/init(contents:))

Creates a new material property object with the specified contents.

### Working with Material Property Contents

[`contents`](/documentation/SceneKit/SCNMaterialProperty/contents)

The visual contents of the material property—a color, image, or source of animated content. Animatable.

[`intensity`](/documentation/SceneKit/SCNMaterialProperty/intensity)

A number between `0.0` and `1.0` that modulates the effect of the material property. Animatable.

### Configuring Texture Mapping Attributes

[`contentsTransform`](/documentation/SceneKit/SCNMaterialProperty/contentsTransform)

The transformation applied to the material property’s visual contents. Animatable.

[`wrapS`](/documentation/SceneKit/SCNMaterialProperty/wrapS)

The wrapping behavior for the S texture coordinate.

[`wrapT`](/documentation/SceneKit/SCNMaterialProperty/wrapT)

The wrapping behavior for the T texture coordinate.

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

Modes to apply to texture wrapping, used by the [`wrapT`](/documentation/SceneKit/SCNMaterialProperty/wrapT) and [`wrapS`](/documentation/SceneKit/SCNMaterialProperty/wrapS) properties.

[`minificationFilter`](/documentation/SceneKit/SCNMaterialProperty/minificationFilter)

Texture filtering for rendering the material property’s image contents at a size smaller than that of the original image.

[`magnificationFilter`](/documentation/SceneKit/SCNMaterialProperty/magnificationFilter)

Texture filtering for rendering the material property’s image contents at a size larger than that of the original image.

[`mipFilter`](/documentation/SceneKit/SCNMaterialProperty/mipFilter)

Texture filtering for using mipmaps to render the material property’s image contents at a size smaller than that of the original image.

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

Texture filtering modes, used by the [`minificationFilter`](/documentation/SceneKit/SCNMaterialProperty/minificationFilter), [`magnificationFilter`](/documentation/SceneKit/SCNMaterialProperty/magnificationFilter), and [`mipFilter`](/documentation/SceneKit/SCNMaterialProperty/mipFilter) properties.

[`maxAnisotropy`](/documentation/SceneKit/SCNMaterialProperty/maxAnisotropy)

The amount of anisotropic texture filtering to be used when rendering the material property’s image contents.

[`mappingChannel`](/documentation/SceneKit/SCNMaterialProperty/mappingChannel)

The source of texture coordinates for mapping the material property’s image contents.

[`borderColor`](/documentation/SceneKit/SCNMaterialProperty/borderColor)

A color used to fill in areas of a material’s surface not covered by the material property’s image contents.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

### 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)