Parameters
intermediate conceptsDynamic 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
| Parameter | Type | Default | Description |
|---|---|---|---|
| Profile | DynamicFogProfile | None | ScriptableObject containing all fog appearance settings. Multiple volumes can share the same profile. Its settings are shown below this field in the inspector. |
| Show Boundary | bool | off | Draws the fog volume box with a faint overlay and highlighted edges so its boundary is visible in the Game View. |
| Allow Rotation | bool | off | When enabled, the fog volume follows the rotation of the GameObject. When disabled, the rotation is reset to identity every frame. |
| Enable Fade | bool | off | Fades 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 Distance | float | 1 | Width 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 Controller | Transform | None | The 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 Volumes | bool | off | When 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 Volumes | List | empty | Optional list of allowed sub-volumes. If no sub-volume is specified, any sub-volume in the scene is used. |
Profile: Appearance
| Parameter | Type | Default | Description |
|---|---|---|---|
| Base Altitude | float | 0 | World-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 Clip | bool | off | When enabled, base altitude acts as a hard clipping plane preventing fog from rendering below it. |
| Use XYZ Distance | bool | on | When 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). |
| Density | float | 0.55 | Overall 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 Distance | float | 0 | Pushes fog away from the camera. No fog renders within this distance. Useful to keep nearby objects fog-free. |
| Height Spread | float | 0.94 | Controls 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 Height | float | 10000 | World-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 Max | float | 100000 | Maximum rendering distance from the camera. Pixels farther than this distance receive no fog. |
| Tint Color | Color | RGB 195, 195, 200 | Base tint color applied to the fog. The alpha channel controls the overall fog opacity. |
| Use Vertical Gradient | bool | on | Multiplies the fog by the Vertical Gradient. When disabled, the fog uses the tint and noise colors only. |
| Vertical Gradient | Gradient | HDR 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 Projection | bool | off | When 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 Clip | bool | off | Hides 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
| Parameter | Type | Default | Description |
|---|---|---|---|
| Noise Color Blend | float | 0.1 | Maximum blend towards Noise Color, modulated by the noise pattern. Range 0 (tint color only) to 1. |
| Noise Color | Color | RGB 175, 180, 182 | Secondary color mixed into the fog through the noise pattern. |
| Scale | float | 50 | Horizontal scale of the noise pattern. Higher values produce larger, more spread-out fog wisps. |
| Shift | float | 0 | Offset added to the noise value used to mix in Noise Color. Range -1 to 1. |
| Noise Distance Atten | float | 1 | Attenuates 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
| Parameter | Type | Default | Description |
|---|---|---|---|
| Turbulence | float | 10 | Strength 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. |
| Speed | float | 0.73 | Animation speed of the wind and of the noise turbulence. |
| Direction | Vector3 | (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
| Parameter | Type | Default | Description |
|---|---|---|---|
| Light Diffusion Power | float | 32 | Concentration of the glow around the sun direction, from 0 to 128. Higher values produce a tighter glow. |
| Light Diffusion Intensity | float | 0.4 | Intensity 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. |
| Brightness | float | 1 | Multiplies the sun color and intensity when Use Sun Color is enabled. It has no effect when Use Sun Color is disabled. |
| Use Sun Color | bool | on | When 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
| Parameter | Type | Default | Description |
|---|---|---|---|
| Dithering | float | 1 | Dithering strength to reduce color banding artifacts in smooth gradients, from 0 to 2. |
| Render Queue | int | 3099 | Render 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 ID | int | 0 | Optional sorting layer ID (number) for the fog renderer, used to control the order with other transparent renderers such as Sprite Renderer. |
| Sorting Order | int | 0 | Optional 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
| Enable Fog Of War | bool | off | Activates the fog of war system for this volume. |
| World Center | Vector3 | (0, 0, 0) | World-space center of the fog of war coverage area. |
| World Coverage | Vector3 | (1024, 0, 1024) | World-space size of the fog of war area. |
| Show Boundaries | bool | off | Draws the fog of war area as a gizmo in the Scene View. |
| Texture Size | int | 256 | Resolution 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 Delay | float | 0 | Seconds (0 to 100) before cleared fog begins restoring. A value of 0 means fog never restores. |
| Restore Duration | float | 2 | Seconds (0 to 25) for the fog to fully restore after the delay. A value of 0 means instant change. |
| Border Smoothness | float | 1 | Controls the edge smoothness of cleared fog areas, from 0 to 1. |
| Blur | bool | off | Blurs the fog of war texture to produce a softer transition between clear and opaque fog areas. |
| Fog Of War Editor | bool | off | Activates the Scene View brush to paint or remove fog of war on the Coverage Texture (see Special Features). |
| Dim Fog | bool | off | Renders the fog with extra transparency in Edit Mode so the terrain stays visible while painting. Play Mode and builds are not affected. |
| Coverage Texture | Texture2D | None | Fog of war mask texture. An alpha of zero means no fog. It must be square and readable (Read/Write enabled). |
Was this page helpful?
Suggest an improvement
Help us improve this documentation page.