Parameters

intermediate concepts

Dynamic Fog & Mist 2 (URP) · Core Concepts

Overview

Dynamic Fog & Mist 2 settings are organized into the DynamicFog component (attached to the fog volume GameObject) and the DynamicFogProfile ScriptableObject. This page documents every parameter.

DynamicFog Component Settings

ParameterTypeDefaultDescription
ProfileDynamicFogProfileNoneScriptableObject containing all fog appearance settings. Multiple volumes can share the same profile. Its settings are shown below this field in the inspector.
Show BoundarybooloffDraws the fog volume box with a faint overlay and highlighted edges so its boundary is visible in the Game View.
Allow RotationbooloffWhen enabled, the fog volume follows the rotation of the GameObject. When disabled, the rotation is reset to identity every frame.
Enable FadebooloffFades the fog in when the Character Controller enters the volume and out when it leaves it, instead of appearing abruptly. Evaluated in Play Mode only.
 Fade Distancefloat1Width of the blend zone inside the volume boundary. The fog goes from 0% at the edge to 100% when the Character Controller is Fade Distance units inside. Minimum 0.1.
 Character ControllerTransformNoneThe player or camera checked against the fog volume and its sub-volumes. If empty, the main camera is used in Play Mode. This field appears under Enable Fade and under Enable Sub Volumes.
Enable Sub VolumesbooloffWhen the Character Controller enters a Dynamic Fog Sub Volume, the fog profile blends towards the sub-volume profile over the sub-volume Fade Distance. Evaluated in Play Mode only.
 Sub VolumesListemptyOptional list of allowed sub-volumes. If no sub-volume is specified, any sub-volume in the scene is used.

Profile: Appearance

ParameterTypeDefaultDescription
Base Altitudefloat0World-space Y position of the fog layer base. Above it, the fog thins out exponentially according to Height Spread. Fog also renders below this height, getting denser, unless Base Altitude Clip is enabled.
Base Altitude ClipbooloffWhen enabled, base altitude acts as a hard clipping plane preventing fog from rendering below it.
Use XYZ DistanceboolonWhen enabled, the fog accumulates along the full 3D view ray and thins out with height above Base Altitude. When disabled, only the horizontal (X/Z) distance from the camera is used: height, Base Altitude and Turbulence no longer change the amount of fog (Max Height and Base Altitude Clip still apply).
Densityfloat0.55Overall fog intensity multiplier (minimum 0). Higher values produce denser, more opaque fog at all distances. For horizontal viewing, fog accumulates approximately proportionally with distance (fog at 2000m is roughly twice the fog at 1000m).
Start Distancefloat0Pushes fog away from the camera. No fog renders within this distance. Useful to keep nearby objects fog-free.
Height Spreadfloat0.94Controls the vertical thickness of the fog layer, from 0 to 1. Internally the shader uses (1 - value) as the height decay rate. Higher values (closer to 1) produce a tall fog layer extending above Base Altitude. Lower values (closer to 0) create thin, ground-hugging fog concentrated near Base Altitude. When Use XYZ Distance is disabled, height is ignored and this value controls how the fog builds up with horizontal distance instead: higher values let it keep accumulating over longer distances.
Max Heightfloat10000World-space height (Y) above which the fog fades out: points higher than this value receive progressively less fog. It is an absolute height, not measured from Base Altitude.
Distance Maxfloat100000Maximum rendering distance from the camera. Pixels farther than this distance receive no fog.
Tint ColorColorRGB 195, 195, 200Base tint color applied to the fog. The alpha channel controls the overall fog opacity.
Use Vertical GradientboolonMultiplies the fog by the Vertical Gradient. When disabled, the fog uses the tint and noise colors only.
Vertical GradientGradientHDR gradient used when Use Vertical Gradient is enabled. It is sampled by the vertical angle of the view direction combined with the sun elevation, from horizontal (left) to vertical (right), so it does not depend on the world height of the fog. Its color and alpha multiply the fog color and opacity.
Box ProjectionbooloffWhen enabled, the fog is computed along rays parallel to the camera forward axis, starting at the camera plane, so it uses the eye depth instead of the radial distance from the camera position.
Depth ClipbooloffHides the fog behind opaque objects: pixels where opaque geometry is closer to the camera than the fog volume boundary receive no fog. The fog is always limited by the scene depth.

Profile: Noise

ParameterTypeDefaultDescription
Noise Color Blendfloat0.1Maximum blend towards Noise Color, modulated by the noise pattern. Range 0 (tint color only) to 1.
Noise ColorColorRGB 175, 180, 182Secondary color mixed into the fog through the noise pattern.
Scalefloat50Horizontal scale of the noise pattern. Higher values produce larger, more spread-out fog wisps.
Shiftfloat0Offset added to the noise value used to mix in Noise Color. Range -1 to 1.
Noise Distance Attenfloat1Attenuates the noise color with distance from the camera. Range 0 (no attenuation) to 1 (the noise color fades out completely at the far plane).

Profile: Wind

ParameterTypeDefaultDescription
Turbulencefloat10Strength of the noise displacement applied to the fog height. Higher values create more chaotic fog shapes. Has no effect when Use XYZ Distance is disabled.
Speedfloat0.73Animation speed of the wind and of the noise turbulence.
DirectionVector3(0.02, 0, 0)Wind direction. The X and Z components scroll the noise along those world axes and the vector length scales the scroll speed together with Speed. Y is not used.

Profile: Directional Light

ParameterTypeDefaultDescription
Light Diffusion Powerfloat32Concentration of the glow around the sun direction, from 0 to 128. Higher values produce a tighter glow.
Light Diffusion Intensityfloat0.4Intensity of the sun glow added to the fog, from 0 to 1. The glow only appears where no geometry is rendered (sky). A value of 0 disables it.
Brightnessfloat1Multiplies the sun color and intensity when Use Sun Color is enabled. It has no effect when Use Sun Color is disabled.
Use Sun ColorboolonWhen enabled, the fog color is multiplied by the color and intensity of the sun assigned in the Dynamic Fog Manager, dimmed as the sun goes below the horizon, for natural day/night transitions. When disabled, white is used.

Profile: Rendering

ParameterTypeDefaultDescription
Ditheringfloat1Dithering strength to reduce color banding artifacts in smooth gradients, from 0 to 2.
Render Queueint3099Render queue of the fog volume. Transparent objects use 3000 and above by default, so use a lower value to render the fog before all transparent objects.
Sorting Layer IDint0Optional sorting layer ID (number) for the fog renderer, used to control the order with other transparent renderers such as Sprite Renderer.
Sorting Orderint0Optional sorting order for the fog renderer within its sorting layer.

Fog of War Settings

These settings are part of the DynamicFog component and appear when Enable Fog Of War is checked. The fog of war area only uses the X and Z axes.

ParameterTypeDefaultDescription
Enable Fog Of WarbooloffActivates the fog of war system for this volume.
 World CenterVector3(0, 0, 0)World-space center of the fog of war coverage area.
 World CoverageVector3(1024, 0, 1024)World-space size of the fog of war area.
 Show BoundariesbooloffDraws the fog of war area as a gizmo in the Scene View.
 Texture Sizeint256Resolution of the fog of war texture, from 32 to 2048, rounded down to a multiple of 4. Larger textures allow finer detail but cost more memory. When a Coverage Texture is assigned, it is set to the width of that texture.
 Restore Delayfloat0Seconds (0 to 100) before cleared fog begins restoring. A value of 0 means fog never restores.
 Restore Durationfloat2Seconds (0 to 25) for the fog to fully restore after the delay. A value of 0 means instant change.
 Border Smoothnessfloat1Controls the edge smoothness of cleared fog areas, from 0 to 1.
 BlurbooloffBlurs the fog of war texture to produce a softer transition between clear and opaque fog areas.
 Fog Of War EditorbooloffActivates the Scene View brush to paint or remove fog of war on the Coverage Texture (see Special Features).
 Dim FogbooloffRenders the fog with extra transparency in Edit Mode so the terrain stays visible while painting. Play Mode and builds are not affected.
 Coverage TextureTexture2DNoneFog of war mask texture. An alpha of zero means no fog. It must be square and readable (Read/Write enabled).
Was this page helpful?