VRayEnvironmentFog examples |
Example 4: Scatter GI and Scatter bounces
Example 5: Volumetric caustics
Example 6: Fog height and gizmo nodes
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 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.
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.
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.
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.