SceneFog
Since 0.6Changed in 0.7
Fields
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
preset | FogPreset | no | light-haze, valley-mist, morning-mist, dense, aerial | A named fog that fills every number this block leaves out (density, heightFalloff, baseHeightM, maxOpacity; the colour stays the sky's when absent). light-haze: a faint 30 km haze that thins above about 800 m. valley-mist: 6 km visibility pooled in the lowest few hundred metres. morning-mist: 3 km visibility in the lowest 50 m or so. dense: 500 m visibility. aerial: 20 km visibility thinning within about 250 m of height, capped at half: depth for a 0.3-1 km scene whose sky is a panorama (no physical aerial perspective). The others are sized so a 1-4 km scene keeps its distant terrain in view except dense. Any number written beside it wins. A sky.preset time of day supplies one when fog is absent. Height mode (the default) and exponential read it; linear ignores its density. | |
visibilityM | number | no | Meteorological visibility, metres, within 1..1000000: the distance at which the fog reaches 95% at the base height (density = 3 / visibilityM). A way to write density in units that do not white a scene out; writing both is the error fog-density-and-visibility. Without a preset or heightFalloff the fog thins with height at 0.0012 per metre, a layer about 800 m deep. | ||
mode | FogMode | no | height, exponential, linear | height (default): exponential fog that thins with height (heightFalloff). exponential: the same with no falloff, 1 - e^(-density * d) past startDistanceM. linear: none at startDistanceM, full at endDistanceM. | |
color | string | no | Hex colour of a fully fogged surface as it shows on screen, the spelling skyColor uses: "#8FC0F0". Absent: HD lights the fog by the sky and the sun itself; the standard renderer takes the sky's horizon colour, and fogs the sky toward it. | ||
density | number | no | 0 | height and exponential: extinction per metre at the base height, 0..1. Default 0.02. | |
heightFalloff | number | no | 0 | height only: how fast density thins with height, per metre, 0.001..10. Default 0.2. | |
baseHeightM | number | no | 0 | height only: the height, in metres, where density is density. Default 0. | |
startDistanceM | number | no | 0 | Metres from the camera where fog begins, 0 or more. Default 0. | |
endDistanceM | number | no | 100 | linear only: metres where fog is total, more than startDistanceM. Default 100. | |
maxOpacity | number | no | 1 | Cap on the fog's cover, 0..1. Default 1. | |
hd | SceneFogHd | no | HD-only fog fields; the standard renderer ignores them. |