Light Probe Solver
Updated
Bakes the scene’s light probes and shadows in the editor.
- Type
comp-light-probe-solver- Script class
LightProbeSolverComponent- Per entity
- One
- Version
- 1.3.0
Read about it in Light probes: what it does, how to use it from a script, and examples.
Properties
Section titled “Properties”The props the runtime declares for this component, with their defaults and accepted ranges.
| Prop | Default | Range |
|---|---|---|
bounces |
0 ≤ x ≤ 3, integer |
|
cubemapSize |
4 ≤ x ≤ 64, integer |
|
far |
0. |
|
near |
0. |
|
occlusion |
0 ≤ x ≤ 1 |
|
samples |
4 ≤ x ≤ 128, integer |
|
softness |
0 ≤ x ≤ 1 |
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
The runtime Light Probes demo's room: red and green walls, a lamp and a probe volume, with a Light Probe Solver on the scene root. The script reports the solver's settings and whether the volume is baked; baking itself runs in the editor.
Read the log: in play the solver cannot bake, so the volume reports itself unbaked. Download the project and press Bake in XR Creator to see the walls' colours bleed onto the spheres. Drag to orbit the camera, scroll to zoom.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(LightProbeSolverComponent); if (component) log(component.props);}