Type Method


Automatically creates and places light probes for use in illuminating a scene.


+ (NSArray<MDLLightProbe *> *)placeLightProbesWithDensity:(float)value heuristic:(MDLProbePlacement)type usingIrradianceDataSource:(id<MDLLightProbeIrradianceDataSource>)dataSource;



A value that determines the coarseness or fineness with which to evaluate the scene. Lower values evaluate fewer positions, resulting in fewer light probes and lower fidelity. Higher values evaluate more positions, resulting in higher fidelity at increased computational cost.


An option that determine how Model I/O uses the data source to position light probes.


A custom object that provides information about the scene to be evaluated.

Return Value

An array of light probe objects for use in the scene.


When you call this method, you must pass a custom object implementing the MDLLightProbeIrradianceDataSource protocol. Model I/O queries this object to determine how to place light probes.

When you use the MDLProbePlacementUniformGrid heuristic, Model I/O simply divides the boundingBox region your data source provides into value units in each dimension, and creates an array of light probe objects to fill each position in the resulting grid.

When you use the MDLProbePlacementIrradianceDistribution heuristic, Model I/O uses the same grid to sample information about the lighting conditions in your scene (by calling the sphericalHarmonicsLevel and sphericalHarmonicsCoefficientsAtPosition: methods of your data source), then creates and positions light probes to optimally account for differences in lighting conditions across the scene.

See Also

Working with Lights


Options affecting automatic placement of light probes in a scene, used with the placeLightProbesWithDensity:heuristic:usingIrradianceDataSource: method.