Fog Volume Features
intermediate conceptsVolumetric Fog & Mist 3 · Core Concepts
The Fog Volume Features part of the inspector, under the fog settings, has the options of each fog volume that are not part of the profile.
Native Lights
With Enable Native Lights on (default), the URP point and spot lights of the scene light the fog, with their shadows. This option needs the Forward+ or Deferred+ rendering path; the inspector shows a warning when the renderer uses another path.
| Setting | Description |
|---|---|
| Intensity Multiplier | Brightness of the point and spot lights inside the fog. |
| Native Light Steps | Number of samples between each light and the fog that it lights, so thick fog hides the light behind it. More samples are slower. With 0 the fog does not block these lights. |
| Rendering Layer Mask | Only the lights that share a rendering layer with this mask light the fog. It needs the Light Layers option of the URP asset. |
Cookie
With Cookie on, the fog shows the cookie texture of the sun light.
Cast Shadows
With Cast Shadows on, the fog casts its shadow on the ground and on the objects. It needs:
- The Light Volume option of the fog volume (Rendering Settings).
- The Light Cookies option of the URP asset.
- A sun light without a cookie of its own. The fog uses the cookie of the sun light for its shadow, so if the sun already has a cookie, the fog does not cast its shadow.
Fog Voids
With Enable Voids on (default), the Fog Void objects of the scene remove the fog inside them. Use them to keep the fog out of houses, caves and vehicles.
To create one, choose GameObject > Effects > Volumetric Fog & Mist 3 > Fog Void. The void is the box of its transform; move, rotate and scale it to fit the interior.
| Fog Void setting | Description |
|---|---|
| Roundness | Shape of the void, from a box (0) to a round shape (1). |
| Falloff | Softness of the border of the void. With 0 the border is sharp; with 1 the void removes no fog. |
Up to 16 voids act at the same time: the ones nearest to the camera.
Follow
With Enable Follow on, the fog volume moves with another object, for example the player or the camera, so there is always fog around it.
| Setting | Description |
|---|---|
| Target | Object that the fog volume follows. |
| Mode | Full XYZ follows the target in every direction. Restrict To XZ Plane follows it over the ground and keeps the altitude of the fog volume. Restrict To XY Plane keeps the position of the fog volume along the Z axis. |
| Offset | Distance in meters from the target to the center of the fog volume. In the restricted modes, the value of the axis that is not followed is the position of the fog volume on that axis; with 0 the fog volume keeps its current position. |
With Follow on, disable Is Local in the Fog of War settings if the cleared places must stay fixed in the world.
Sorting Order
Drawing order when several fog volumes overlap. A fog volume with a higher value is drawn over the fog volumes with a lower value. With the same value, the nearest fog volume is drawn last.
Fog of War
With Enable Fog Of War on, a map over the ground removes or tints the fog in parts of the fog volume. Scripts and the Fog of War editor change the map, for example to clear the fog around the player. See Scripting Support (C#) for the methods.
| Setting | Description |
|---|---|
| Center | Center of the fog of war area. |
| Is Local | The fog of war area moves with the fog volume. Disable it to keep the cleared places fixed in the world, for example when the fog volume follows the player. |
| Coverage | Size of the fog of war area in meters. With zero, the area is the box of the fog volume. |
| Show Coverage Bounds | Shows the bounds of the fog of war area in the Scene view. |
| Texture Width / Texture Height | Size in pixels of the fog of war map. More pixels give more detail and cost more to update. With a height of zero, the height takes the width. |
| Restore Delay | Seconds before the fog starts to come back to a cleared place. With 0 the fog stays cleared. |
| Restore Duration | Seconds that the fog takes to come back after the restore delay. |
| Border Smoothness | Softness of the border of the cleared areas. 0 gives a sharp border, 1 a smooth transition. |
| Blur | Smooths the fog of war map. |
Fog of War Editor
Enable Fog Of War Editor to paint the map with a brush in the Scene view. Left click and drag on the ground to paint. Hold Shift to swap Add Fog and Remove Fog. Undo and redo are supported.
- The map is saved in a Coverage Texture asset. Click Create New Mask Texture to create one; a temporary map is not saved. The alpha channel of the texture sets the amount of fog: 0 means no fog.
- The brush modes are Add Fog, Remove Fog and Color Fog, with a color, Radius, Fuzziness and Opacity.
- Fill Mask and Clear Mask fill or clear the whole map.
- Export Coverage Texture saves the map, with its alpha channel, to a PNG file.
- The texture must be readable and not compressed. If it is not, click Fix Texture Import Settings.
Fluid Simulation
With Enable Fluid Simulation on, objects push and clear the fog. See Interactive Fog.
Fog Manager
The last line of the inspector selects the Fog Manager of the scene, or creates one. See Fog Manager & Performance.
Suggest an improvement
Help us improve this documentation page.