The Environment section in VRAYforC4D render parameters is where you can specify a color and a texture map to be used during GI and reflection/refraction calculations. This group allows you choose Environment settings for indirect illumination calculations.

Environment

Color – lets you specify the environment color.

Brightness – a multiplier for the color value. Note that the multiplier does not affect the environment texture (if present).

Texture – lets you choose a GI environment texture. Note that if present, the texture overrides the specified Color.

Multiplier– a multiplier for the Texture value.

Map type – allow you to choose type of apply of texture map.

Offset U – allows you to adjust the refraction texture placement in horizontal direction.

Offset V – allows you to adjust the refraction texture placement in vertical direction.

Override GI Env.

This group allows you to override Environment settings for indirect illumination calculations. The effect of changing the GI environment is similar to sky light.

Color – specifies the environment color for GI. This color is ignored if there is an texture specified.

Brightness – a multiplier for the GI env. override value. Note that the multiplier does not affect the Texture (if present).

Texture – lets you choose a GI Environment texture. Note that if present, the texture overrides the specified color.

Multiplier – a multiplier for the Texture value.

Map type – allow you to choose type of apply of texture map.

Offset U – allows you to adjust the refraction texture placement in horizontal direction.

Offset V – allows you to adjust the refraction texture placement in vertical direction.

Override Reflection Env.

This group allows you to override environment settings when reflections and refractions are calculated. Note that you can also override the reflection/refraction environment on a per material basis (see VRAYforC4D Materials section). If you do not enable the Refraction override, this group of controls affects both reflections and refractions. If you enable the Refraction override, then this group affects only reflections.

Color – specifies the environment color for reflection. This color is ignored if there is an texture specified.

Brightness – a multiplier for the reflection env. override value. Note that the multiplier does not affect the Texture (if present).

Texture – lets you choose a reflection Environment texture. Note that if present, the texture overrides the specified color.

Multiplier – a multiplier for the Texture value.

Map type – allow you to choose type of apply of texture map.

Offset U – allows you to adjust the refraction texture placement in horizontal direction.

Offset V – allows you to adjust the refraction texture placement in vertical direction.

Override Refraction Env.

This group allows to override the environment for refraction rays only. When this override is disabled, VRAYforC4D will use the environment specified in the Reflection/refraction group when calculating refractions.

Color – specifies the environment color for refractions. This color is ignored if there is an texture specified.

Brightness – a multiplier for the Refraction env. override value. Note that the multiplier does not affect the Texture (if present).

Texture – lets you choose a Refraction Environment texture. Note that if present, the texture overrides the specified color.

Multiplier – a multiplier for the Texture value.

Map type – allow you to choose type of apply of texture map.

Offset U – allows you to adjust the refraction texture placement in horizontal direction.

Offset V – allows you to adjust the refraction texture placement in vertical direction.

Volume Aerial Perspective

Sunlight – choose light source that will be used as sun for calculations.

Visibility range – Specifies the distance at which the fog has absorbed 90% of the light coming from objects behind it. Lower values make the fog appear more dense, while larger values reduce the effect of the aerial perspective.

Atmosphere height – The height of the atmosphere layer in meters. Lower values can be used for artistic effects.

Inscattered light intensity – Controls the amount of sunlight scattered from the atmospheric effect. The default value 1.0 is physically accurate; lower or higher values could be used for artistic purposes.

Affect environment rays – When disabled, the atmospheric effect is applied only to camera rays that hit actual objects, but not to rays that hit the V-Ray Physical Sky. This option is disabled by default because the V-Ray Physical Sky texture already takes into account the amount of scattered sunlight. However, it is possible to enable this option for artistic effects, especially with low visibility ranges. 

Environment Fog

Environment Fog is an atmospheric effect that allows the simulation of participating media like fog, atmospheric dust and so. Volumetric properties can be determined by 3d texture maps. The atmospheric effect can also be confined with atmospheric gizmo helper objects.

Color – defines the color of the fog when it is illuminate by light sources.

Emission – this texture controls the fog color when it is illuminated by light sources.

Density – controls the fog density.

Distance – controls the fog density. Larger values make the fog more transparent, while smaller values make it more dense.

Fog Color texture – Controls the fog color when it is illuminated by light sources.

Fog Density texture – Allows you to modify the texture density. Black values in the texture correspond to perfectly transparent fog; white areas correspond to the density specified by the Fog distance parameter.

Fog Emission texture – Controls the fog light emission (self-illumination).

Scatter GI – when on, the fog will also scatter GI. Note that this can be quite slow. In many cases, GI within the fog can be substituted with a simple emission term. When this option is on, the currently selected global illumination algorithm in the Vray settings will be used to accelerateGI inside the volume (e.g. the Irradiance map, Light cache, Photon 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.

Use fog height – when this option is on and no atmospheric gizmos are specified, the fog is assumed to start from a certain Z-level height and continue downward indefinitely.

Fog height – This parameter determines the starting point along the Z-axis. If there are atmospheric gizmos listed in the Nodes section, this parameter is ignored.

 

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

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.

Texture samples – determines the number of texture samples for each step through the volume. This allows to sample textures more accurately than the volumetric lighting. It is useful in cases where the textures vary much faster than the lighting itself (e.g. for detailed fractal textures).

Simiplify texture for GI – When this option is checked Vray will use a simiplified method for calculating the GI when rednerderin parts of the fog that are textred or are being faded out.

Cutoff threshold – this parameter 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.

Max steps – specifies the maximum number of steps through the volume.

Fade out radius – when the fog effect is contained within a gizmo this option allows you to specify a falloff radius for it. This way the fog effect does not have sharp edges at the edges of the gizmo.

Fade out mode – allows you to chose between two different falloff modes: Multiply by density and Add density to falloff.

Affect Background – when this option is off the background will not be obscured by the fog.

Affect Reflections – Specifies whether the fog will be rendered in reflections.

Affect Refractions – Specifies whether the fog will be rendered in refractions.

Affect Shadows – Specifies if the fog should affect shadow rays.

Affect GI – Specifies if the fog should affect GI rays.

Affect Camera Rays – Specifies if the fog will be visible to camera rays.

Gizmos – A list of atmospheric gizmos and arbitrary meshes within which the fog will be calculated.

Lights – a list of lights that affect the volume.

Fog color

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.

Gradient Ramp texture with Solid interpolation.

Noise texture with Turbulence type.

Fog distance

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 color 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

Fog emission

This example demonstrates the effect of the Fog emission parameter. The Fog color is gray 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 gray

Fog emission is dark blueFog color is gray

Fog emission is dark blueFog 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 gray to better show the light scattering inside the volume, produced by the global illumination.

Fog emission is mapped with a Gradient Ramp texture.

Fog emission is mapped with a Gradient Ramp texture.

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 off in the V-Ray settings – the fog volume only shows direct lighting.

GI is onScatter 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 onScatter 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 onScatter GI is on, Scatter bounces is 2. Irradiance map + brute force GI for secondary bounces

GI is onScatter GI is on, Scatter bounces is 4. Irradiance map + brute force GI.

GI is onScatter GI is on, Scatter bounces is 8. Irradiance map + brute force GI.

GI is onScatter 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.

[KGVID poster=”http://vrayforc4d.net/docs/wp-content/uploads/2015/05/clouds_combined_small_thumb42.jpg” width=”300″ height=”304″]http://vrayforc4d.net/docs/wp-content/uploads/2015/03/clouds_combined_small.mp4[/KGVID]

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.

[KGVID poster=”http://vrayforc4d.net/docs/wp-content/uploads/2015/05/cfd_combined_small_thumb2.jpg” width=”640″ height=”432″]http://vrayforc4d.net/docs/wp-content/uploads/2015/03/cfd_combined_small.mp4[/KGVID]

Scatter GI is off

[KGVID width=”640″ height=”240″]http://vrayforc4d.net/docs/wp-content/uploads/2015/03/cfd_wind_combined.mp4[/KGVID]

Scatter GI is on;

Scatter bounces is 100

Fog height

When there are no gizmo nodes connected to V-Ray Environment Fog, 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. For more info on gizmo nodes, see the Example below.

Fog distance = 40
Fog height
= 20

Fog distance = 40
Fog height
= 40

Fog distance = 40
Fog height
= 100

Fog distance = 40
Fog height
= 200

Fog distance = 200
Fog height
= 20

Fog distance = 200
Fog height
= 40

Fog distance = 200
Fog height
= 100

Fog distance = 200
Fog height
= 200

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 density. The only quality parameter for this sampler is the Subdivs parameter.

Subdivs is 1

Subdivs is 8

Subdivs is 16

Sampling parameters (raymarcher with textures)

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 demonstrate 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 okay 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 1Step size is 4.0 – note the noise.

Texture samples is 4Step size is 4.0 – much better result, with only minor increase in render time.

Texture samples is 1Step 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.

Gizmo nodes

When there are gizmos connected to V-Ray Environment Fog, 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 ObjectXYZ 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

Volumetric caustics

This example demonstrates volumetric caustics and colored shadows with different settings.

Caustics are offAffect shadows for the sphere material is off.

Caustics are offAffect 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. 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 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 fogSubdivs parameter is set to 32. Note the improved sampling of the caustics beam.