---
title: ambient
framework: scenekit
role: symbol
role_heading: Instance Property
path: scenekit/scnmaterial/ambient
---

# ambient

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

## Declaration

```swift
var ambient: SCNMaterialProperty { get }
```

## Discussion

Discussion Ambient shading describes the amount and color of ambient light reflected by the material. Ambient shading is uniform in all directions at all points on a surface. If a scene does not contain lights whose type is ambient, this property has no effect on a material’s appearance. By default, the ambient property’s contents object is a dark gray color. Changing the ambient property’s contents lets you specify a different color or texture for the areas of a surface not directly illuminated by lights in a scene. To make the material respond identically to both ambient and diffuse light, set its locksAmbientWithDiffuse property to true. The figure below shows a material (with a texture for its diffuse property) before and after setting the ambient property’s contents to a solid color.

The material’s lightingModel property determines the formula SceneKit uses to combine its ambient color and other visual properties with lights and other contents in a scene to produce the final color for each rendered pixel in the rendered scene. For details, see Lighting Models. This material property does not apply to physically-based materials (see physicallyBased).

## See Also

### Related Documentation

- [normal](scenekit/scnmaterial/normal.md)
- [emission](scenekit/scnmaterial/emission.md)

### Visual Properties for Basic Shading

- [diffuse](scenekit/scnmaterial/diffuse.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)
