---
title: MDLPhotometricLight
framework: modelio
role: symbol
role_heading: Class
path: modelio/mdlphotometriclight
---

# MDLPhotometricLight

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

## Declaration

```swift
class MDLPhotometricLight
```

## Overview

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 provides two ways to interpret a light web: As a cube map texture. Use the generateCubemap(fromLight:) method to generate a texture, then use the 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:) method to generate a set of spherical harmonic coefficients, and then use the sphericalHarmonicsLevel and 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 and 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

- [init(iesProfile:)](modelio/mdlphotometriclight/init(iesprofile:)-57hxs.md)

### Interpreting the Light Web as a Cube Texture

- [generateCubemap(fromLight:)](modelio/mdlphotometriclight/generatecubemap(fromlight:).md)
- [lightCubeMap](modelio/mdlphotometriclight/lightcubemap.md)

### Interpreting the Light Web as Spherical Harmonics

- [generateSphericalHarmonics(fromLight:)](modelio/mdlphotometriclight/generatesphericalharmonics(fromlight:).md)
- [sphericalHarmonicsCoefficients](modelio/mdlphotometriclight/sphericalharmonicscoefficients.md)
- [sphericalHarmonicsLevel](modelio/mdlphotometriclight/sphericalharmonicslevel.md)

### Initializers

- [init(IESProfile:)](modelio/mdlphotometriclight/init(iesprofile:)-64z2m.md)

### Instance Methods

- [generateTexture(_:)](modelio/mdlphotometriclight/generatetexture(_:).md)

## Relationships

### Inherits From

- [MDLPhysicallyPlausibleLight](modelio/mdlphysicallyplausiblelight.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [MDLNamed](modelio/mdlnamed.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Lights

- [MDLLight](modelio/mdllight.md)
- [MDLAreaLight](modelio/mdlarealight.md)
- [MDLLightProbe](modelio/mdllightprobe.md)
- [MDLLightProbeIrradianceDataSource](modelio/mdllightprobeirradiancedatasource.md)
- [MDLPhysicallyPlausibleLight](modelio/mdlphysicallyplausiblelight.md)
