---
title: SCNMaterial
framework: scenekit
role: symbol
role_heading: Class
path: scenekit/scnmaterial
---

# SCNMaterial

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

## Declaration

```swift
class SCNMaterial
```

## Overview

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 class that provides a solid color, texture, or other 2D content for that aspect of SceneKit’s rendering. The material’s lightingModel 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. You attach one or more materials to an instance of the SCNGeometry class using its firstMaterial or 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

- [name](scenekit/scnmaterial/name.md)

### Choosing a Shading Model

- [lightingModel](scenekit/scnmaterial/lightingmodel-swift.property.md)
- [SCNMaterial.LightingModel](scenekit/scnmaterial/lightingmodel-swift.struct.md)

### Visual Properties for Physically Based Shading

- [diffuse](scenekit/scnmaterial/diffuse.md)
- [metalness](scenekit/scnmaterial/metalness.md)
- [roughness](scenekit/scnmaterial/roughness.md)

### Visual Properties for Special Effects

- [normal](scenekit/scnmaterial/normal.md)
- [displacement](scenekit/scnmaterial/displacement.md)
- [emission](scenekit/scnmaterial/emission.md)
- [selfIllumination](scenekit/scnmaterial/selfillumination.md)
- [ambientOcclusion](scenekit/scnmaterial/ambientocclusion.md)

### Visual Properties for Basic Shading

- [diffuse](scenekit/scnmaterial/diffuse.md)
- [ambient](scenekit/scnmaterial/ambient.md)
- [specular](scenekit/scnmaterial/specular.md)
- [reflective](scenekit/scnmaterial/reflective.md)
- [multiply](scenekit/scnmaterial/multiply.md)
- [transparent](scenekit/scnmaterial/transparent.md)
- [shininess](scenekit/scnmaterial/shininess.md)
- [fresnelExponent](scenekit/scnmaterial/fresnelexponent.md)
- [locksAmbientWithDiffuse](scenekit/scnmaterial/locksambientwithdiffuse.md)

### Managing Opacity and Blending

- [transparency](scenekit/scnmaterial/transparency.md)
- [transparencyMode](scenekit/scnmaterial/transparencymode.md)
- [SCNTransparencyMode](scenekit/scntransparencymode.md)
- [blendMode](scenekit/scnmaterial/blendmode.md)
- [SCNBlendMode](scenekit/scnblendmode.md)

### Customizing Rendered Appearance

- [isLitPerPixel](scenekit/scnmaterial/islitperpixel.md)
- [isDoubleSided](scenekit/scnmaterial/isdoublesided.md)
- [cullMode](scenekit/scnmaterial/cullmode.md)
- [SCNCullMode](scenekit/scncullmode.md)
- [fillMode](scenekit/scnmaterial/fillmode.md)
- [SCNFillMode](scenekit/scnfillmode.md)

### Managing Render Targets

- [writesToDepthBuffer](scenekit/scnmaterial/writestodepthbuffer.md)
- [readsFromDepthBuffer](scenekit/scnmaterial/readsfromdepthbuffer.md)
- [colorBufferWriteMask](scenekit/scnmaterial/colorbufferwritemask.md)
- [SCNColorMask](scenekit/scncolormask.md)

### Initializers

- [init(coder:)](scenekit/scnmaterial/init(coder:).md)

### Instance Properties

- [clearCoat](scenekit/scnmaterial/clearcoat.md)
- [clearCoatNormal](scenekit/scnmaterial/clearcoatnormal.md)
- [clearCoatRoughness](scenekit/scnmaterial/clearcoatroughness.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [SCNAnimatable](scenekit/scnanimatable.md)
- [SCNShadable](scenekit/scnshadable.md)

## See Also

### Lighting, Cameras, and Shading

- [SCNLight](scenekit/scnlight.md)
- [SCNCamera](scenekit/scncamera.md)
- [SCNMaterialProperty](scenekit/scnmaterialproperty.md)
