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

# SCNLight

A light source that can be attached to a node to illuminate the scene.

```
class SCNLight
```

## Overview

You illuminate your scene by attaching lights to [`SCNNode`](/documentation/SceneKit/SCNNode) objects using their [`light`](/documentation/SceneKit/SCNNode/light) property.

You set a light’s type using its [`type`](/documentation/SceneKit/SCNLight/type) property. Depending on a light’s type, its position and direction may affect its behavior—you control the light’s position and direction through the node that the light is attached to. The direction of a light, if applicable to its type, is along the negative z-axis of its node’s local coordinate system.

A light’s other properties affect how it illuminates a scene. All lights have a [`color`](/documentation/SceneKit/SCNLight/color) property, which interacts with [`SCNMaterial`](/documentation/SceneKit/SCNMaterial) objects to produce the pixel colors in a rendered scene. Other properties, such as attenuation, shadowing, and spot angle, can affect the behavior of certain types of lights.

The number and type of lights in a scene is a key factor in SceneKit’s rendering performance. For efficient rendering, follow these tips:

- Use SceneKit lights only for dynamic light sources or lights that affect moving objects. For statically lit portions of your scene, create a light map texture in an external 3D authoring tool (also known as *baked lighting*) and apply it to objects in the scene using the [`multiply`](/documentation/SceneKit/SCNMaterial/multiply) material property.
- Minimize the number of lights on each element of the scene. You can achieve most common lighting effects using no more than three lights, and you only need a single ambient light source. SceneKit only uses up to eight light sources per node when rendering, ignoring any additional lights. If you set the [`attenuationEndDistance`](/documentation/SceneKit/SCNLight/attenuationEndDistance) property on a spotlight or omnidirectional light to limit its area of effect, SceneKit ignores the light (and its performance cost) when rendering objects outside that area. You can also use the [`categoryBitMask`](/documentation/SceneKit/SCNLight/categoryBitMask) property to choose which nodes are illuminated by a light.

## Topics

### Creating a Light

[`+  light`](/documentation/SceneKit/SCNLight/light)

Creates a new light object.

[`+  lightWithMDLLight:`](/documentation/SceneKit/SCNLight/lightWithMDLLight:)

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

### Modifying a Light’s Appearance

[`type`](/documentation/SceneKit/SCNLight/type)

A constant identifying the general behavior of the light.

[`LightType`](/documentation/SceneKit/SCNLight/LightType)

Constants specifying the general behavior of a light, used by the [`type`](/documentation/SceneKit/SCNLight/type) property.

[`color`](/documentation/SceneKit/SCNLight/color)

The color of the light. Animatable.

[`temperature`](/documentation/SceneKit/SCNLight/temperature)

The color temperature, in degrees Kelvin, of the light source. Animatable.

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

The luminous flux, in lumens, or total brightness of the light. Animatable.

[`sphericalHarmonicsCoefficients`](/documentation/SceneKit/SCNLight/sphericalHarmonicsCoefficients)

Data describing the estimated lighting environment in all directions for a light probe.

### Managing Light Attributes

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

A name associated with the light.

[`-  attributeForKey:`](/documentation/SceneKit/SCNLight/attribute(forKey:))

Returns the value of a lighting attribute.

[`-  setAttribute:forKey:`](/documentation/SceneKit/SCNLight/setAttribute(_:forKey:))

Sets the value for a lighting attribute.

[Lighting Attribute Keys](/documentation/SceneKit/lighting-attribute-keys)

Keys for specifying the behavior of a light using the [`attribute(forKey:)`](/documentation/SceneKit/SCNLight/attribute(forKey:)) and [`setAttribute(_:forKey:)`](/documentation/SceneKit/SCNLight/setAttribute(_:forKey:)) methods.

### Managing Light Attenuation

[`attenuationStartDistance`](/documentation/SceneKit/SCNLight/attenuationStartDistance)

The distance from the light at which its intensity begins to diminish. Animatable.

[`attenuationEndDistance`](/documentation/SceneKit/SCNLight/attenuationEndDistance)

The distance from the light at which its intensity is completely diminished. Animatable.

[`attenuationFalloffExponent`](/documentation/SceneKit/SCNLight/attenuationFalloffExponent)

The transition curve for the light’s intensity between its attenuation start and end distances. Animatable.

### Managing Spotlight Extent

[`spotInnerAngle`](/documentation/SceneKit/SCNLight/spotInnerAngle)

The angle, in degrees, of the area fully lit by a spotlight. Animatable.

[`spotOuterAngle`](/documentation/SceneKit/SCNLight/spotOuterAngle)

The angle, in degrees, of the area partially lit by a spotlight. Animatable.

[`gobo`](/documentation/SceneKit/SCNLight/gobo)

An image or other visual content affecting the shape and color of a light’s illuminated area.

### Managing Shadows Cast by the Light

[`castsShadow`](/documentation/SceneKit/SCNLight/castsShadow)

A Boolean value that determines whether the light casts shadows.

[`shadowRadius`](/documentation/SceneKit/SCNLight/shadowRadius)

A number that specifies the amount of blurring around the edges of shadows cast by the light. Animatable.

[`shadowColor`](/documentation/SceneKit/SCNLight/shadowColor)

The color of shadows cast by the light. Animatable.

[`shadowMapSize`](/documentation/SceneKit/SCNLight/shadowMapSize)

The size of the shadow map image that SceneKit renders when creating shadows.

[`shadowSampleCount`](/documentation/SceneKit/SCNLight/shadowSampleCount)

The number of samples from the shadow map that SceneKit uses to render each pixel.

[`shadowMode`](/documentation/SceneKit/SCNLight/shadowMode)

The mode SceneKit uses to render shadows.

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

Options for SceneKit’s rendering of shadows cast by a light, used by the [`shadowMode`](/documentation/SceneKit/SCNLight/shadowMode) property.

[`shadowBias`](/documentation/SceneKit/SCNLight/shadowBias)

The amount of correction to apply to the shadow to prevent rendering artifacts.

[`orthographicScale`](/documentation/SceneKit/SCNLight/orthographicScale)

The orthographic scale SceneKit uses when rendering the shadow map for a directional light.

[`zFar`](/documentation/SceneKit/SCNLight/zFar)

The maximum distance between the light and a visible surface for casting shadows.

[`zNear`](/documentation/SceneKit/SCNLight/zNear)

The minimum distance between the light and a visible surface for casting shadows. Animatable.

### Choosing Nodes to be Illuminated by the Light

[`categoryBitMask`](/documentation/SceneKit/SCNLight/categoryBitMask)

A mask that defines which categories this light belongs to.

### Managing Photometric Lights

[`IESProfileURL`](/documentation/SceneKit/SCNLight/iesProfileURL)

The URL for a file that contains photometry data describing the intended appearance of the light.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

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

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

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

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

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