DocsGRADEReference

Fog Gradient

5 min read

On this page

Depth and height fog with a colour gradient from near to far and from the ground up, in front of the sky; optional volumetric look with drifting density and light shafts. Live views only.

Studio categoryScene
Pipeline stageScene (scene-linear HDR, before the tonemapper)
Default position8 in its stage
Works inLive views only (viewports, PIE, games, Movie Render Queue): needs scene depth or the level
C++ / BlueprintFGradeLayer::Effects.FogGradient (FGradeFogGradient)

Manual: Fog Gradient. Every numeric parameter can be set at runtime with Set Layer Parameter using the path shown (see Animation).

Parameters

Depth / height fog with a colour gradient (near to far, ground to sky), scene-linear before the tonemapper; optional volumetric look (noise and light shafts).

ParameterBlueprint pathValuesDefaultDescription
EnabledEffects.FogGradient.Enabledon/offoffTurns the effect on.
IntensityEffects.FogGradient.Intensity0..100, keyable500..100: fog strength. At 50 a fog at the base height reaches about 95 % at End Distance; lower values thin it and let the distance show through (25 = at most half opaque), higher values thicken it (100 = 95 % half way to End Distance).
VolumetricEffects.FogGradient.Volumetricon/offoffVolumetric look: drifting 3D density noise (wisps and banks) and light shafts towards the glow, shadowed by the scene. Ray-marched at half resolution: about 0.15 / 0.25 / 0.4 / 0.6 ms at 1080p for Low / Medium / High / Epic (off: about 0.05 ms).
PresetEGradeFogGradientPresetMorning MistMood preset. In the GRADE panel, picking one sets the colours, distances, height, sky, glow and noise values (keeps Intensity, Volumetric, Use Scene Sun and Quality); editing one of them afterwards switches to Custom. The renderer always uses the values.

Colour

ParameterBlueprint pathValuesDefaultDescription
Near ColorEffects.FogGradient.NearColor.R/G/B/Acolour, keyable(0.86, 0.88, 0.9)Fog colour close to the camera (at Start Distance).
Far ColorEffects.FogGradient.FarColor.R/G/B/Acolour, keyable(0.7, 0.79, 0.92)Fog colour far away (at End Distance and beyond, and in the sky).
Use Mid ColorEffects.FogGradient.UseMidColoron/offoffThree-colour gradient: Near -> Mid (half way) -> Far. Off: a straight Near -> Far blend.
Mid ColorEffects.FogGradient.MidColor.R/G/B/Acolour, keyable(0.8, 0.84, 0.9)Fog colour half way between Start and End Distance (when Use Mid Colour is on).
BrightnessEffects.FogGradient.Brightness-4..4 EV, keyable0.5Fog brightness in stops: 0 = a white fog one stop over the exposure's mid grey (it follows the exposure, so it reads the same in any scene); +1 = twice as bright (a bright overcast sky), -2 = a dark night fog.

Distance

ParameterBlueprint pathValuesDefaultDescription
Start DistanceEffects.FogGradient.StartDistance>= 0 Meters (slider to 1000), keyable2Distance from the camera where the fog begins (m).
End DistanceEffects.FogGradient.EndDistance>= 1 Meters (slider to 5000), keyable250Distance where the colour reaches Far Colour and (at Intensity 50) the fog is about 95 % thick (m).

Height

ParameterBlueprint pathValuesDefaultDescription
Base HeightEffects.FogGradient.BaseHeightnumber Meters0World height (Z, m) of the fog floor: the fog is densest at and below it.
Height FalloffEffects.FogGradient.HeightFalloff>= 0 Meters (slider to 500), keyable25Height fog: the fog thins out above Base Height, to about a third every this many metres (0 = the same density at any height).
Top ColorEffects.FogGradient.TopColor.R/G/B/Acolour, keyable(0.68, 0.79, 0.96)Colour of the fog higher up (over the fog layer and towards the sky), blended in by Top Blend.
Top BlendEffects.FogGradient.TopBlend0..100, keyable300..100: how much the fog turns to Top Colour with height (0 = the near / far gradient only).

Sky

ParameterBlueprint pathValuesDefaultDescription
Sky AmountEffects.FogGradient.SkyAmount0..100, keyable450..100: how much the fog covers the sky (with height fog the horizon fogs most and the zenith stays clearer).
Sky DistanceEffects.FogGradient.SkyDistance>= 100 Meters (slider to 1000000)10000Anything farther than this counts as sky (m; the far plane of a Sky Atmosphere always does). Keep it closer than a sky sphere / dome mesh and past your farthest mountains; the last 20 % blend.

Glow

ParameterBlueprint pathValuesDefaultDescription
GlowEffects.FogGradient.Glow0..100, keyable450..100: light of the sun scattered in the fog: a bright glow around it (forward scattering) and the light shafts of the volumetric look.
Glow ColorEffects.FogGradient.GlowColor.R/G/B/Acolour, keyable(1, 0.85, 0.62)Colour of the glow (multiplied by the scene sun's colour when it comes from the scene).
Use Scene SunEffects.FogGradient.UseSceneSunon/offonGlow towards the brightest directional light of the world; without one (or off) Glow Yaw / Glow Pitch set the direction.
Glow YawEffects.FogGradient.GlowYaw-180..180 deg40Compass direction of the glow when it does not follow the scene sun (world yaw in degrees, 0 = +X).
Glow PitchEffects.FogGradient.GlowPitch-10..90 deg12Elevation of the glow when it does not follow the scene sun (degrees above the horizon).

Volumetric

ParameterBlueprint pathValuesDefaultDescription
Noise ScaleEffects.FogGradient.NoiseScale1..200 Meters15Volumetric: size of the drifting fog wisps and banks (m).
Noise AmountEffects.FogGradient.NoiseAmount0..100, keyable55Volumetric, 0..100: contrast of the wisps (0 = smooth fog, 100 = clear gaps between dense banks).
WindEffects.FogGradient.Wind0..10012Volumetric, 0..100: wind speed of the drift (100 = about 10 m/s).
Wind DirectionEffects.FogGradient.WindDirection-180..180 deg30Volumetric: direction the fog drifts to (world yaw in degrees, 0 = +X).
Light ShaftsEffects.FogGradient.LightShafts0..100, keyable60Volumetric, 0..100: light shafts: the glow is shadowed by the scene (screen space, from the depth), so beams fan out between trees, columns or window frames. Strongest looking towards the glow.
QualityEGradeEffectQualityMediumVolumetric ray-march quality (half resolution; approximate GPU cost at 1920x1080 on a mid-range GPU): Low = 10 steps, about 0.15 ms; Medium = 16 steps, about 0.25 ms; High = 24 steps, finer shafts and noise, about 0.4 ms; Epic = 32 steps, about 0.6 ms. Auto = the Studio quality.

Enumerations

Fog Gradient Preset (EGradeFogGradientPreset)

Mood presets of the Fog Gradient (each sets the colours, distances, height, sky, glow and volumetric noise values; editing one of them in the GRADE panel switches to Custom).

ValueMeaning
Morning MistSoft white ground mist with a warm sun glow, thinning out a few metres up (the default look).
Blue HourDeep blue to violet fog of the hour after sunset, a pink glow low on the horizon.
Desert HazeWarm, bright, far-reaching dust haze that bleaches the distance under a high sun.
Toxic SwampThick sickly green fog hugging the ground, dense close to the camera.
Horror NightDark cold fog that swallows everything a few metres away, a pale moon glow.
CustomYour own values.

Effect Quality (EGradeEffectQuality)

Per-effect quality override. Auto follows grade.Quality (the Studio quality setting).

ValueMeaning
Auto-
Low-
Medium-
High-
Epic-

Generated from the GRADE C++ headers. Back to the reference index.