<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLPhotometricLight",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLPhotometricLight"
  },
  "title" : "MDLPhotometricLight"
}
-->

# MDLPhotometricLight

A light source whose shape, direction, and intensity of illumination are determined by a photometric profile.

```
class MDLPhotometricLight
```

## Overview

You create a photometric light from a file in the IES format, containing physical measurements of a light source. Many manufacturers of real-world light fixtures publish such files describing the lighting characteristics of their products. This photometry data measures the light web surrounding a light source—measurements of the light’s intensity in all directions around the source.The [`MDLPhotometricLight`](/documentation/ModelIO/MDLPhotometricLight) provides two ways to interpret a light web:

- As a cube map texture. Use the [`generateCubemap(fromLight:)`](/documentation/ModelIO/MDLPhotometricLight/generateCubemap(fromLight:)) method to generate a texture, then use the [`lightCubeMap`](/documentation/ModelIO/MDLPhotometricLight/lightCubeMap) property to access the texture. In this texture, each texel represents the light’s intensity in the direction from the cube’s center to the texel’s position on the cube.
- **As spherical harmonics.** Use the [`generateSphericalHarmonics(fromLight:)`](/documentation/ModelIO/MDLPhotometricLight/generateSphericalHarmonics(fromLight:)) method to generate a set of spherical harmonic coefficients, and then use the [`sphericalHarmonicsLevel`](/documentation/ModelIO/MDLPhotometricLight/sphericalHarmonicsLevel) and [`sphericalHarmonicsCoefficients`](/documentation/ModelIO/MDLPhotometricLight/sphericalHarmonicsCoefficients) properties to access these coefficients. Spherical harmonic coefficients provide a more compact representation of the same information as the cube map texture, so you can use them during shading without the performance cost of a texture lookup.

Both the [`MDLPhotometricLight`](/documentation/ModelIO/MDLPhotometricLight) and [`MDLAreaLight`](/documentation/ModelIO/MDLAreaLight) classes can describe lights with interesting shapes—an area light offers a simpler design that can be implemented with better rendering performance, and a photometric light offers design that better models real-world light fixtures at the cost of higher computational complexity.

## Topics

### Creating a Photometric Light

[`-  initWithIESProfile:`](/documentation/ModelIO/MDLPhotometricLight/init(iesProfile:)-57hxs)

Initializes a light from photometry data in the file at the specified URL.

### Interpreting the Light Web as a Cube Texture

[`-  generateCubemapFromLight:`](/documentation/ModelIO/MDLPhotometricLight/generateCubemap(fromLight:))

Generates a cube map texture from the light’s photometry data.

[`lightCubeMap`](/documentation/ModelIO/MDLPhotometricLight/lightCubeMap)

A cube map texture describing the light’s intensity in all directions.

### Interpreting the Light Web as Spherical Harmonics

[`-  generateSphericalHarmonicsFromLight:`](/documentation/ModelIO/MDLPhotometricLight/generateSphericalHarmonics(fromLight:))

Generates spherical harmonics information based on the light’s photometry data.

[`sphericalHarmonicsCoefficients`](/documentation/ModelIO/MDLPhotometricLight/sphericalHarmonicsCoefficients)

Data containing spherical harmonics coefficients that describe the light’s intensity in all directions.

[`sphericalHarmonicsLevel`](/documentation/ModelIO/MDLPhotometricLight/sphericalHarmonicsLevel)

The number of levels of generated spherical harmonics information.

## Relationships

### Conforms To

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

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

[`MDLNamed`](/documentation/ModelIO/MDLNamed)

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

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

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

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

### Inherits From

[`MDLPhysicallyPlausibleLight`](/documentation/ModelIO/MDLPhysicallyPlausibleLight)

---

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)