Skip to content

Atmosphere

Controls atmospheric scattering, haze, ground reflectance, and exposure.

Properties

Changing rayleigh or turbidity rebuilds the atmosphere lookup tables, while groundAlbedo rebuilds the multiple-scattering table. Those properties, plus mieDirectionalG, mieScatteringStrength, and skyMultipleScattering, refresh the cached sky radiance. Other properties do not rebuild these GPU caches.

exposure.value

Type: uniform<float>
Default: 1.0
Units: -

Scales the linear HDR image before tone mapping. Use this as the sky's main brightness control.

Apply it in the post-processing chain before bloom and tone mapping; applyTo does not apply exposure. See Post-Processing. A value of 1.0 produces a balanced clear-noon sky. Typical range: 0.05–5.


fogDensity.value

Type: uniform<float>
Default: 1.25
Units: -

Sets how quickly distance fades scene geometry into the sky. Each pixel fades toward the sky color along its own view direction, so a distant ridge converges on the sky directly behind it rather than on a flat haze tint.

At 1, geometry is half faded near 23 km. Higher values bring the fade closer to the camera; 0 disables fog. Typical range: 0–5.

applyTo applies this. Open sky is never fogged.


fogFarFadeEnd.value

Type: uniform<float>
Default: 1100000
Units: meters

Distance from the camera at which geometry is fully replaced by sky. Must exceed fogFarFadeStart; the gap between the two is the fade ramp.


fogFarFadeStart.value

Type: uniform<float>
Default: 1000000
Units: meters

Distance from the camera at which geometry starts fading completely into the sky, in addition to the continuous fogDensity effect. Use it to hide the boundary of finite terrain, ground, or water geometry.

The default sits beyond any practical scene, so the band is off until set.


groundAlbedo.value

Type: uniform<Color>
Default: Color(0.18, 0.17, 0.15)
Units: linear RGB

Reflectance of the ground beneath the atmosphere. Brighter ground increases multiple-scattered light near the horizon; snow brightens it, while water darkens it. A gray value near 0.15 approximates average land reflectance.

Affects the sky, environment maps, and atmospheric haze. Cloud bases take their ground color from a separate groundBounceAlbedo on clouds.lighting.


mieDirectionalG.value

Type: uniform<float>
Default: 0.7
Units: -

Controls how tightly the haze glow concentrates around the sun. 0 scatters light evenly in every direction, spreading the glow across the whole sky. Higher values pull it into a tight halo at the sun.

Typical range: 0–0.999. The scattering model is undefined at 1.


mieScatteringStrength.value

Type: uniform<float>
Default: 1.0
Units: -

Scales the halo around the sun without changing haze density or sky color. Lower it to reduce an overbright halo while preserving turbidity. A value of 1.0 keeps the halo consistent with the haze. Typical range: 0–2.


multipleScattering.value

Type: uniform<float>
Default: 0.2
Units: -

Scales the skylight that fills cloud undersides and shadowed interiors. Higher values lighten cloud shadows; excessive values reduce contrast.

Affects clouds only. The sky dome uses skyMultipleScattering. Typical range: 0–2.


rayleigh.value

Type: uniform<float>
Default: 1.0
Units: -

Scales molecular scattering, which makes the sky blue and reddens a low sun. 1 approximates Earth; higher values deepen the overhead blue and strengthen sunset reds. 0 removes the blue contribution. Typical range: 0–3.


skyMultipleScattering.value

Type: uniform<float>
Default: 0.5
Units: -

Scales light that scatters more than once in the atmosphere. This light concentrates near the horizon, so the control mainly affects daytime horizon brightness.

0 leaves only single-scattered light. 1 applies the full computed contribution. Higher values brighten and desaturate the horizon. Typical range: 0–2.

Sky reflections on water and the haze in front of distant clouds use the same light and scale with it.


turbidity.value

Type: uniform<float>
Default: 3.3
Units: -

Sets the amount of aerosol haze. Higher values reduce sky saturation, dim the sun, and broaden its halo. 1 represents a clear day; 15 represents heavy smog. Typical range: 1–15.

Methods

applyParams(params)

Writes any subset of AtmosphereParams in one call. Omitted fields are left unchanged.

Returns: void

typescript
import * as THREE from 'three';

sky.atmosphere.applyParams({
  turbidity: 4.5,
  exposure: 0.95,
  // colored reflectance — tints the sky dome
  groundAlbedo: new THREE.Color(0.2, 0.18, 0.12),
});

toParams()

Returns a new AtmosphereParams containing the current values. Pass it to applyParams to restore the state, or store it in a preset's atmosphere block.

Returns: AtmosphereParams

typescript
const saved = sky.atmosphere.toParams();
sky.atmosphere.applyParams({ turbidity: 9 });
sky.atmosphere.applyParams(saved); // back to where it was

Types

AtmosphereParams

One field per property above, minus the .value. Every field is required — toParams() returns all of them, and applyParams takes Partial<AtmosphereParams>. This is also the shape of a preset's atmosphere block.

typescript
interface AtmosphereParams {
  rayleigh: number;
  turbidity: number;
  mieDirectionalG: number;
  mieScatteringStrength: number;
  multipleScattering: number;
  skyMultipleScattering: number;
  exposure: number;
  // linear RGB
  groundAlbedo: THREE.Color;
  fogDensity: number;
  // meters
  fogFarFadeStart: number;
  fogFarFadeEnd: number;
}
typescript
import type { AtmosphereParams } from 'threejs-sky-pro';

See Also

Commercial License - All Rights Reserved.