This page provides information on the V-Ray Environment Fog Atmospheric Effect.


Page Contents



V-Ray Environment Fog is an atmospheric effect that simulates participating media like fog, atmospheric dust, etc. These volumetric properties can be set by the use of 3D texture maps, or confined to a specific area with the use of geometric objects.

It can use either of two algorithms to calculate volumetric lighting. The first algorithm is a simple exponential sampling scheme, which is used when there are no texture maps specified. In this mode, V-Ray Environment Fog takes a number of random points inside the volume and calculates the volumetric lighting at those points.

The second algorithm is a raymarching scheme which is used when any of the volume properties are mapped with a texture. In this case, V-Ray Environment Fog traverses the fog volume in small steps, calculates the volume properties at each step, and computes the volume lighting accordingly.

V-Ray Environment Fog is a global atmospheric effect. Although the V-Ray Volume Material could be used in its place in some circumstances, it is considered good practice to use to use V-Ray Environment Fog for a global atmospheric effect and V-Ray Volume material for more localized needs. See the V-Ray Volume Material page for more details about the differences between the two approaches.




UI Paths:

|Item List Viewport| > Add Item dropdown > V-Ray Atmospheres > V-Ray Environment Fog



|Add Item window|| > Directories > V-Ray Atmospheres rollout > V-Ray Environment Fog



Basic Parameters




Fog Color (map) – Defines the color of the fog when it is illuminated by light sources. A texture map can drive the fog color. For more information, see the Fog Color example below.

Emission Color (map) – Defines the color of the light emitted by the fog. (self-illumination). This channel can provide ambient illumination inside the fog as an alternative to using GI. Emission Color is multiplied by Fog Color to produce the visible color of the fog itself. For more information, see the Emission Color example below.

Emission Multiplier (map) – Magnifies the total light emission from the fog.

Fog Distance – Controls the fog density. Larger values make the fog more transparent, while smaller values make it more dense. For more information, see the Fog Distance example below.

Fog Density (map) – A multiplier for the Fog Distance channel that can use a texture for the density of the fog.

Opacity Mode – When enabled, the density of the fog will be treated as opacity.

Subdivs – Determines the number of points inside the fog for which volumetric lighting is evaluated. Smaller values for this channel render faster, but may produce noise in the image. Higher values render longer, but with less noise.

Use Height – Determines whether or not the Height value should be taken into account

Height – If the fog is not contained within a volume, it is assumed to start from a certain Y-level height and continue downward indefinitely. This channel determines the starting point along the Y-axis. For more information, see the Height example below.

Y is up – When enabled, then the Y axis is treated as up instead of the Z axis.



Example: Fog Color


This example demonstrates the effect of the Fog Color. Note how this color only changes the way the volume reacts to light, and not the volume transparency. In this example, the fog density is mapped with V-Ray Checker texture. A Box mesh is used to confine the fog volume.



Fog Color = reddish-orange


Fog Color = green


Fog Color = blue




In the following examples, Fog Color has been mapped with a texture.



Fog Color = Gradient texture with Texture U Input parameter

Fog Color = V-Ray Bercon Noise texture





Example: Fog Distance


This example demonstrates the effect of the Fog Distance parameter. Note how larger values make the fog more transparent. A Box mesh is used to confine the fog volume.



Fog Distance = 4.0


Fog Distance  = 16.0

Fog Distance  = 64.0



In the following examples, Fog Density has been mapped with a texture.






No texture





V-Ray Checker texture




V-Ray Bercon Noise texture


V-Ray Bercon Noise texture with Fractal Turbulence and swapped colors





Example: Emission Color


This example demonstrates the effect of the Emission Color parameter. Since we also have GI enabled, the fog emission causes the volume to illuminate both itself and the other objects around it. Fog Density is mapped with a V-Ray Checker texture, and a Box mesh is used to confine the fog volume.

Note that in the last image, Fog Color is black, which causes the fog's visible color to be provided entirely by Emission Color.



Emission Color = black (no emission), Fog Color = gray


Emission Color = dark blue, Fog Color = gray


Emission Color = dark blue, Fog Color = black




In the following examples, Emission Color has been mapped with a texture. Fog Color is gray in each case to better show the light scattering inside the volume due to global illumination.



Emission Color = Gradient texture


Emission Color = V-Ray Bercon Noise texture with red color





Example: Height


When there are containing meshes connected to V-Ray Environment Fog, the volume occupies space downward from a certain height along the scene's up-axis (Y). The amount of space it occupies is determined by the Height parameter. As Height is increased, the scene becomes darker because the sun is blocked by a larger amount of fog. This can be corrected by increasing the Fog Distance parameter, and thus making the fog more transparent. Note also the sudden decrease of brightness when the camera is included inside the fog volume.


Fog Distance
= 40
Height = 20


Fog Distance
Height =40


Fog Distance
= 40
Height = 100


Fog Distance
= 40
Height = 200


Fog Distance = 200
Height = 20


Fog Distance = 200
Height = 40


Fog Distance = 200
Height = 100


Fog Distance = 200
Height = 200





Example: Sampling Parameters (without Textures)


When no textures are used, V-Ray Environment Fog uses a simple sampling algorithm where samples are distributed according to the volume's density. The only quality parameter for this sampler is the Subdivs parameter. By default, subdivisions are handled by the image sampler. Enabling the Use Local Subdivs parameter in the DMC Sampler rollout will enable this option. Under most circumstances, this is not usually recommended.



= 1


Subdivs =  8


Subdivs =  16





Example: Volumetric Caustics


This example demonstrates how volumetric fog can be used with caustics to produce colored shadows. These effects depend on caustics settings and also the material assigned to the shadow-casting object inside the fog.

The example scene is a sphere over a plane. A V-Ray Material has been assigned to the sphere, and references to the Affect shadows parameter pertain to the settings for this material. The Enable caustics parameter refers to the Caustics parameters. The first two examples show how the fog behaves without caustics, for comparison with images that follow. 


Enable caustics = off, Affect shadows = off


Enable caustics = off,  Affect shadows = on


Enable caustics = on,  Affect shadows = on


Enable caustics = on,  Affect shadows = on,
Fog Density = V-Ray Smoke texture



The quality of the volumetric caustics depends on the sampling of the volume fog, on the V-Ray caustics settings, and the caustics settings for the light. In the first two images below, all parameters are the same with the exception of the Caustics subdivs value, which can be set in the V-Ray Light Settings. Notice how the more photons are shot, the more defined the caustics are. In this example, the Max density parameter in the Caustics settings is set to 0.3 in order to limit the photon density in the caustics map. This saves memory and makes the rendering faster, although it will limit the spatial resolution of the caustics (in our case, to 0.3 scene units). 



Caustics subdivs = 100 (10,000 caustics photons are shot)


Caustics subdivs = 500 (250,000 caustics photons)
The broken caustics beam indicates there aren't
enough samples for the fog itself.


Caustics subdivs = 500, fog Subdivs increased to 32.
Note the improved sampling of the caustics beam.




Advanced Parameters




Solid Mode – When enabled, allows the fog to be rendered as a solid object.

Solid Threshold – Specifies a threshold, below which the fog will be considered solid.

Jitter – When rendering a volumetric object, some artifacts may occur due to the regular raymarching step. To prevent this, a small random offset can be added to the step, using this check box

Deep Output – Enables depth data output using deep images for use in deep compositing applications.

IOR – Specifies the index of refraction for the volume, which describes the way light bends when entering the volume. A value of 1.0 means the light will not change direction



Fade Out




Fade Out Mode – Specifies between two different modes of fade out.

Fade Out Radius – Specifies a radius for the fade out of the fog.






Scatter GI – When enabled, the fog will also scatter global illumination. Note that this can be quite slow. In many cases, global illumination within the fog can be substituted with a simple emission term. When this option is on, the currently selected global illumination algorithm in the V-Ray settings will be used to accelerate GI inside the volume (e.g. the irradiance maplight cachephoton map or brute-force).

Scatter Bounces – When Scatter GI is enabled, this controls the number of GI bounces that will be calculated inside the fog.




Example: Scatter GI and Scatter Bounces


This example demonstrates the effect of the Scatter GI and Scatter bounces parameters. Note how multiple scattering of light inside the volume greatly increases the realism of the image.



GI is disabled in the V-Ray settings
the fog volume only shows direct lighting


GI disabled, Scatter GI disabled
The fog does not scatter GI and so looks identical to the previous image (it is lit with direct light only).


GI enabled, Scatter GI enabled, Scatter Bounces = 1
Notice how the fog volume is affected by the skylight. The Irradiance map was used for a primary GI engine.





GI enabled,  Scatter GI  enabled, Scatter Bounces = 2
Irradiance map + Brute force GI for secondary bounces


GI enabled,  Scatter GI  enabled, Scatter Bounces = 4
Irradiance map + Brute force GI




GI enabled,  Scatter GI  enabled, Scatter Bounces = 8
Irradiance map + Brute force GI


GI enabled,  Scatter GI  enabled, Scatter Bounces = 100
Irradiance map + Light cache for secondary bounces






Example: Importance of GI


GI scattering is especially important when creating cloud-like volumes. For example, compare the following two images, done with and without GI scattering.  

NOTE: If specialized 'Hero' clouds were needed with more detail, then these would be best done using V-Ray Volume material contained within a mesh



Global Illumination disabled

Global Illumination enabled (Brute Force+ Light cache) with Scatter disabled



Global Illumination enabled  (Brute Force+ Light cache)
Scatter GI  enabled  and  Scatter Bounces  =  100





This sampler is used when any of the fog properties (color, density or emission) are mapped with a 3d texture. The sampler steps through the volume, evaluating the volumetric textures and lighting, until it leaves the volume (if the fog is contained within a volume), or until the accumulated volume transparency falls below a certain cut-off threshold, or until a specified number of maximum steps is reached.

Simplify Textures for GI – When this option is checked V-Ray will use a simplified method for calculating the GI when rendering parts of the fog that are textured or are being faded out.

Step Size – Determines the size of one step through the volume. Smaller steps produce more accurate results but are slower to render. In general, dense volumes require smaller step sizes than more transparent volumes. In practice, step sizes that are two to three times smaller than the Fog Distance parameter work well.

Max Steps – Specifies the maximum number of steps through the volume.

Texture Samples – Determines the number of texture samples for each step through the volume. Higher values sample textures more accurately than the volumetric lighting. This setting is useful in cases where the textures vary much more than the lighting itself (e.g. for detailed fractal textures). For more information, see the Texture Samples example below.

Cutoff Threshold – Controls when the raymarcher will stop traversing the volume. If the accumulated volume transparency falls below this threshold, the volume will be considered opaque and tracing will be aborted. Higher values make the rendering faster but may introduce artifacts.



Example: Step Size with Raymarching


When any of the parameters (density, color or emission) is mapped with a texture, V-Ray Environment Fog uses a raymarching algorithm to compute the intersection of a ray with the volume.

The following examples demonstrate the effect of the Step Size parameter. A Box gizmo is used to confine the volume, and the density is mapped with a V-Ray Checker texture. Note how smaller values cause less noise and smoother shading of the volume. Note also that more dense volumes require smaller values of the Step Size parameter in order to produce a smooth result, compared to more transparent volumes. In general, values for the Step Size that are 2 to 3 times smaller than the Fog Distance parameter work well.

In the examples below, the Fog Distance parameter is 5.0.



Step Size = 1.0


Step Size
 = 2.5




Step Size
 = 5.0


Step Size
 = 10.0




In the examples below, the Fog distance is 20.0.



Step Size
 = 4.0


Step Size
 = 10.0




Step Size
 = 20.0


Step Size
 = 40.0






Example: Texture Samples with Raymarching



The following example demonstrates the effect of the Texture samples channel. This parameter allows for more accurate sampling of textures with rapid changes, without the need to increase the Step size channel, and thus saving render time.



Texture Samples
 = 1, Step Size = 4.0
Note the noise.


Texture Samples
= 4, Step Size = 4.0
Much better result with only minor increase in render time.


Texture Samples
 = 1, Step Size = 1.0
In practice, the texture is sampled with the same rate as with the image on the left,
but render time is greatly increased since lighting is also sampled at a greater rate.




Ray Filter


Affect Background – Enables or disables the tracing of background rays through the volumetric.

Affect Reflections – Enables or disables the tracing of reflection rays through the volumetric.

Affect Refractions – Enables or disables the tracing of refraction rays through the volumetric.

Affect Shadows – Enables or disables the tracing of shadow rays through the volumetric.

Affect GI – Enables or disables the tracing of GI rays through the volumetric.

Affect Camera – Enables or disables the tracing of Camera rays through the volumetric.





Gizmos – Select from a list of arbitrary meshes within which the fog will be calculated. Note that when using a mesh acting as a Gizmo you should disable the mesh visibility or its rendering in order to be able to see the atmospheric effect placed inside. To do this, disable its visibility in the Item list or control the visibility with an Item shader, or make the mesh not renderable by setting its Render channel value to No. Multiple meshes can be specified for the gizmo using the Schematic setup.

Include Child Items – When enabled, child mesh items to the ones specified for gizmo will be used as well.






Lights mode – Specifies which scene lights contribute to the illumination of the volume.

No Lights – No lights effect the volume.
All Lights – All scene lights contribute to the illumination of the volume
Specify lights – Only specified lights will effect the volume.


Specify Lights Mode



Lights – A list of lights that affect the volume. Multiple Lights can be specified using the Schematic setup.

Include Child Items – When enabled, any light that is child to the specified in the Lights list will affect the volume too.



  • When using V-Ray Environment Fog with weak V-Ray Lights, it may be necessary to turn down the Cutoff threshold parameter of the lights. The default value for this parameter works fine for surfaces, but for volumes, where a lot of weak light contributions are added together, it may produce a visible sharp boundary where the light calculations stop. 
  • Various procedural textures can modify volume properties.
  • V-Ray does not have separate global illumination maps for volumetric rendering. Instead, all GI engines (the irradiance map, light cache, global/caustics photon maps) have been modified to support volumetric data.