import type WebSceneVirtualLighting from "../../../webscene/VirtualLighting.js"; import type { EventedMixin } from "../../../core/Evented.js"; import type { VirtualLightingProperties as WebSceneVirtualLightingProperties } from "../../../webscene/VirtualLighting.js"; export interface VirtualLightingProperties extends WebSceneVirtualLightingProperties, Partial> {} /** * The VirtualLighting class allows you to change the lighting in the scene to virtual light. The position of the light * follows the camera and has a slight top-right offset in respect to the camera. * * ![scene-lightings](https://developers.arcgis.com/javascript/latest/assets/references/core/views/virtualLightCombined.avif) * * Example: * ```js * let view = new SceneView({ * container: "viewDiv", * * map: new Map({ * basemap: "satellite", * ground: "world-elevation" * }), * environment: { * lighting: { * type: "virtual" // autocasts as new VirtualLighting() * } * } * }); * ``` * The lighting visualization updates as soon as the type property changes: * ``` * view.environment.lighting = { * type: "virtual", * directShadowsEnabled: true // autocasts as new VirtualLighting({ directShadowsEnabled: true }) * } * ``` * * @since 4.23 * @see [Sample - Daylight component](https://developers.arcgis.com/javascript/latest/sample-code/daylight/) * @see [Sample - Exaggerating elevation](https://developers.arcgis.com/javascript/latest/sample-code/layers-custom-elevation-exaggerated/) * @see [Sample - Line markers and label placement](https://developers.arcgis.com/javascript/latest/sample-code/visualization-line-markers/) */ export default class VirtualLighting extends VirtualLightingSuperclass { constructor(properties?: VirtualLightingProperties); /** * Enables global illumination for more realistic lighting in the scene through ambient occlusion and emissive lighting. * * **Ambient occlusion** darkens areas where surrounding geometry blocks ambient light, adding definition to corners, crevices, and spaces between buildings. * * **Emissive lighting** illuminates surfaces near emissive materials. The illumination depends on the emitters’ strength and color, as well as their distance from the surfaces they illuminate. See the [Visualizations with light-emitting symbols sample](/sample-code/light-emitting-symbols/) for more details on configuring emissive symbols. * *
* Comparison of scene lighting with global illumination enabled and disabled *
Global illumination, enabled on the right, provides more detailed ambient occlusion shading and emissive lighting.
*
* * Global illumination is a camera-dependent, screen-space approximation based on visible depth, surface normals, and recent frame data. It is not a physically exact lighting simulation or a scene-wide path tracer. Off-screen or hidden geometry cannot reliably provide indirect light. * It is meant to be used mainly for visual context, not illumination measurements or lighting-compliance analysis. * * Global illumination progressively accumulates lighting over multiple frames, reducing noise and improving visual quality. After camera or scene changes, lighting settles over successive rendered frames. During navigation, reduced resolution trades detail for rendering cost. * * * **Known limitations** * * - Global illumination is not supported with [GaussianSplatLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GaussianSplatLayer/): neither ambient occlusion nor emissive lighting will be computed for this layer. * - [SceneView.takeScreenshot()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#takeScreenshot) uses a dedicated accumulation path to compute global illumination. Captures with global illumination enabled can therefore take substantially longer to finish. * - Small emitters, or emitters that appear small on screen due to distance may produce only weak illumination. Increasing size, [emissive strength](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/Symbol3DEmissive/#strength) and enabling [glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) can help improve visibility, but cannot guarantee a particular light footprint or replace missing screen-space samples from arbitrary distances and angles. * - Global illumination is disabled at high camera altitudes. * * @default false * @beta * @since 5.2 * @see [Sample - Global Illumination](https://developers.arcgis.com/javascript/latest/sample-code/global-illumination/) */ accessor globalIllumination: boolean; /** * Indicates that the light source is virtual light. Virtual light is top - right position respect to the camera * enabling user to observe the scene independant to the possition of the sun. */ get type(): "virtual"; } declare const VirtualLightingSuperclass: typeof WebSceneVirtualLighting & typeof EventedMixin