LandscapeLighting
The engine’s lighting, which a Landscape mounts unless told not to: its
sky, its sun and its fog each replaceable, as Lighting takes them.
Extends
Section titled “Extends”Pick<LightingProps,"sky"|"sun"|"fog"|"shadowSplit"|"lightMask"|"canopy"|"weather">
Properties
Section titled “Properties”| Property | Type | Default value | Description |
|---|---|---|---|
cachedShadowMapSize? |
number |
the quality level’s cachedShadowMapSize |
The side in texels, up to 4096, of the sun’s cached shadow of what stands still round the camera, as Lighting takes it; 0 draws none. Set here, it holds at every quality level. |
canopy? |
CanopyOptions |
none |
A texture laid over the world from above that says how closed the canopy is over each spot, and a share of the sun’s light every lit surface under it takes from every side, as global illumination would scatter it down through the leaves: a grove’s shade then reads lit rather than black. One texture read per lit pixel. Left out, none. |
farShadowDistance? |
number |
the quality level’s farShadowDistance |
Metres round the camera the far shadow map covers, as Lighting takes it. Set here, it holds at every quality level. |
farShadowMapSize? |
number |
the quality level’s farShadowMapSize |
The side in texels, up to 4096, of the sun’s far shadow map, as Lighting takes it; 0 draws none. Set here, it holds at every quality level. |
fog? |
false | Fog | FogExp2 |
the look's fog |
The scene’s fog, in place of the look’s: a three.js Fog, linear between two distances, or FogExp2, which thickens with distance, as under water. Made once, outside the component. The rig dims only the look’s own fog with the hour. false sets none. Left out, the look’s fog, or none without a look. |
lighting? |
true |
true |
Mounts the engine’s lighting: the sun, the sky, their fill light, the exposure that follows the hour, and the look’s fog and stack. false mounts none of it, for a game that lights the scene itself, with its own <Lighting> or its own lights; a look then sets only the hour the Landscape opens on and its wind. |
lightMask? |
LightMaskOptions |
none |
A texture laid over the world from above that dims the sun by region, and the sky’s fill and the fog with it, so a region reads unlit: a dark side of the world, with lit circles in it the game draws as it runs. One texture read per lit pixel. Lights other than the sun and the moon, such as a lantern’s, keep their light, and so does a glowing surface. Left out, none. |
shadowDistance? |
number |
the quality level’s shadowDistance |
Metres along the view the sun’s shadow reaches, from the camera, as Lighting takes it. Set here, it holds at every quality level, so a strategy view’s longer reach costs the same on a phone. |
shadowMapSize? |
number |
the quality level’s shadowMapSize |
The side of each of the sun’s two cascade maps in texels, up to 4096; 0 casts none. Set here, it holds at every quality level. |
shadowSplit? |
number |
14 |
Metres along the view where the sun’s near, sharper cascade ends and the far one starts, kept under half shadowDistance. Lower it for a view whose near ground is close, such as a first-person one; raise it for a camera far above its ground, such as a strategy view. Unity and Godot give it as a share of the distance. |
sky? |
false | LookBackground |
the engine's scattering sky |
The sky behind the scene. Left out, the engine’s own: a scattering sky with clouds that follows the hour. An equirectangular image in its place, { file, sunU }, with sunU the column its sun stands in, 0 to 1 across, which the rig turns onto its sun; the scene takes its soft light from the image too, unless the look names an environment.image. false draws none, for a game that draws its own sky or sets scene.background itself, and the scene is lit from the engine’s sky. |
sun? |
boolean |
true |
Whether the sun lights the scene by day, and the moon by night: one sun light, which casts the shadow. false leaves it out, as in a cave; the sky’s fill light stays. |
weather? |
false | Partial<LiveWeather> |
the world's weather |
The scene’s own layer over the world’s weather, which the listed plugin’s weatherRule gives, such as weather()’s: false draws none of it, for an interior or a cave, and a partial record replaces the fields it names, such as { temperatureOffset: 0 } to keep the grade’s warmth in the rain. setLightingWeather lays the page’s own over both. |