Example 1: Fog color
Example 2: Fog distance
Example 3: Fog emission
Example 4: Scatter GI and Scatter bounces
Example 5: Volumetric caustics
Example 6: Fog height and gizmo nodes
Example 7: Sampling parameters (without textures)
Example 8: Sampling parameters (raymarcher with textures)
This example demonstrates the effect of the fog color. Note how color only changes the way the volume reacts to light, and not the volume transparency. In this example, the fog density is mapped with a checker texture. A Box gizmo is used to confine the fog volume.
In the following examples, the fog color has been mapped with a texture. World XYZ mapping type was used for the textures.
A Gradient Ramp texture with Solid interpolation. A Noise texture with Turbulence type.
This example demonstrates the effect of the Fog distance parameter. Note how larger values make the fog more transparent. A Box gizmo is used to confine the fog volume.
Fog distance is 4.0 Fog distance is 16.0 Fog distance is 64.0
In the following examples, the fog density has been mapped with a texture. World XYZ mapping type was used for the textures.
No texture Checker texture Regular Noise texture Inverted turbulence Noise texture
This example demonstrates the effect of the Fog emission parameter. The Fog color is grey so as to better show the effect of the emission. Note that since we also have GI enabled, the fog emission causes the volume to illuminate both itself and other objects around it. The fog density is mapped with a Checker texture. A Box gizmo is used to confine the fog volume.
Fog emission is black (no emission), Fog color is grey Fog emission is dark blue, Fog color is grey Fog emission is dark blue, Fog color is black (only the fog emission affects the image)
In the following examples, the Fog emission has been mapped with a texture. The Fog color is grey to better show the light scattering inside the volume, produced by the global illumination. The scene for the last image is available here.
Fog emission is mapped with a Gradient Ramp texture. Fog emission is mapped with a Noise texture with Turbulence type.
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. The scene for the last image (for 3ds Max 2008) is available here.
GI is off in the V-Ray settings - the fog volume only shows direct lighting. GI is on, Scatter GI is off - the fog does not scatter GI and so looks identical to the left image (it is lit with direct light only). GI is on, Scatter GI is on, Scatter bounces is 1. Notice how the fog volume is affected by the skylight. The irradiance map was used for a primary GI engine. GI is on, Scatter GI is on, Scatter bounces is 2. Irradiance map + brute force GI for secondary bounces. GI is on, Scatter GI is on, Scatter bounces is 4. Irradiance map + brute force GI. GI is on, Scatter GI is on, Scatter bounces is 8. Irradiance map + brute force GI. GI is on, Scatter GI is on, Scatter bounces is 100. Irradiance map + Light cache for secondary bounces.
GI scattering is especially important when creating cloud-like volumes. For example, compare the following two images, done with and without GI scattering. The scene for the right image can be found here. You can view the rendered sequence here (requires DivX codec from http://www.divx.com).
Global illumination is off Global illumination is on (irradiance map + light cache) with Scatter GI on and Scatter bounces set to 100
The following example shows GI scattering inside a smoke volume. The volumetric textures (density and emission) for this example are provided from a fluid dynamics simulation in the form of 3d textures. Irradiance map and the light cache are used for both sequences. Note how GI scattering causes the smoke to be naturally illuminated by the fire. The entire animations are available here and here (requires DivX codec available from http://www.divx.com/).
Scatter GI is off Scatter GI is on; Scatter bounces is 100
This example demonstrates volumetric caustics and colored shadows with different settings. The scene for the third image (for 3ds Max 2008) is available here.
Caustics are off, Affect shadows for the sphere material is off Caustics are off, Affect shadows for the sphere material is on. Caustics are on. Caustics are on, and the fog density is mapped with a 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 same with the exception of the caustics subdivs for the light in the light settings dialog. Note how the more photons are shot, the more defined the caustics are. In this example, we also have the caustics Max. density parameter 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). The scene for the last image can be found here.
The light has 100 Caustics subdivs (10,000 caustics photons are shot). The light has 500 Caustics subdivs (250,000 caustics photons are shot). Note the broken caustics beam - this is not because there are not enough caustics photons, but because we don't have enough samples for the fog itself. The light has 500 Caustics subdivs again, but the fog Subdivs parameter is set to 32. Note the improved sampling of the caustics beam.
When there are no gizmo nodes connected to VRayEnvironmentFog, the volume occupies space downward from a certain height along the scene Z-axis, determined by the Fog height parameter. The following examples demonstrate this. Note that as the Fog height is increased, the scene becomes darker - this is 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 is 40 Fog distance is 200 Fog height is 20 Fog height is 40 Fog heght is 100 Fog height is 200
When there are gizmos connected to VRayEnvironmentFog, then the volume is confined only inside the specified atmospheric gizmos and the Fog height parameter is ignored.
BoxGizmo SphereGizmo CylGizmo Several gizmos Several gizmos; the Fog color is mapped with a Gradient texture with Object XYZ mapping type. Mesh used as a Gizmo
Gizmo falloff radius = 4
Gizmo falloff mode = Multiply by density
Gizmo falloff radius = 4
Gizmo falloff mode = Add density to falloff
When no textures are used, VRayEnvironmentFog uses a simple sampling algorithm where samples are distributed according to the volume density. The only quality parameter for this sampler is the Subdivs parameter.
Subdivs is 1 Subdivs is 8 Subdivs is 16
When any of the parameters (density, color or emission) is mapped with a texture, VRayEnvironmentFog uses a raymarching algorithm to compute the intersection of a ray with the volume.
The following examples demostrate the effect of the Step size parameter. A Box gizmo is used to confine the volume, and the density is mapped with a 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 ok in most cases.
In the examples below, the Fog distance parameter is 5.0.
Step size is 1.0 Step size is 2.5 Step size is 5.0 Step size is 10.0
In the examples below, the Fog distance is 20.0.
Step size is 4.0 Step size is 10.0 Step size is 20.0 Step size is 40.0
The following example demonstrates the effect of the Texture samples parameter. This parameter allows for more accurate sampling of textures with rapid changes, without the need to increase the Step size parameter, and thus saving render time.
Texture samples is 1, Step size is 4.0 - note the noise. Texture samples is 4, Step size is 4.0 - much better result, with only minor increase in render time. Texture samples is 1, Step size is 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.