XR Light Estimate
Updated
Lights the scene like the real room.
- Type
comp-xr-light-estimate- Script class
XRLightEstimateComponent- Per entity
- One
- Version
- 1.0.0
Read about it in XR world: what it does, how to use it from a script, and examples.
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Match the room's light and depth in ARAn XR World with XR Light Estimate and XR Depth Occlusion: in AR the scene is lit like the real room and real things hide virtual ones. Buttons switch between a fast mode and high realism, with shadows from the real main light and soft occlusion.
This one needs AR: enter AR on an Android phone or a Quest 3 and press High realism. On a desktop there is no estimate or depth, so the stage lights stay in charge and the buttons only change the settings.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(XRLightEstimateComponent); if (component) log(component.props);}