Page Contents ×

This page provides information on the VRayEnvironmentFog node.

 

Overview


VRayEnvironmentFog is an atmospheric effect that allows the simulation of participating media like fog, atmospheric dust, etc. Volumetric properties can be determined by 3d texture maps. The atmospheric effect can also be confined with geometry objects.

VRayEnvironmentFog 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, VRayEnvironmentFog 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 that case, VRayEnvironmentFog traverses the fog volume in small steps, calculates the volume properties at each step and computes the volume lighting accordingly.

 


 

UI Path: ||Toolbar|| > V-Ray Menu icon > Volumetrics > VRayEnvironmentFog



 

Inputs


dens – Accepts only a 3D Texture loaded with a Project3D node. The texture is used to control the Fog Density parameter.

emis – Accepts only a 3D Texture loaded with a Project3D node. The texture is used to control the Emission parameter of the fog.

col – Accepts only a 3D Texture loaded with a Project3D node. The texture is used to control the Color of the fog.

obj – Accepts only geometry nodes. The geometry will be used as a gizmo to confine the atmospheric effect.

 

Common


 

 

 

Color – Defines the color of the fog when it is illuminated by light sources. You can also use a texture map to drive the fog color. This parameter can be mapped by connecting a 3d texture to the col input of the node. Note this only works with the Project3d node.

Emission – Controls the fog emission (self-illumination). You can use this parameter to substitute the ambient illumination inside the fog, instead of using GI. This parameter can be mapped by connecting a 3d texture to the emis input of the node. NOTE this only works with the Project3d node.

Emission Multiplier – A multiplier for the Emission parameter.

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

Fog Density – A multiplier for the Fog distance parameter that allows a texture to be used for the density of the fog. This parameter can be mapped by connecting a 3d texture to the dens input of the node. NOTE this only works with the Project3d node.

Fog 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 parameter determines the starting point along the Y-axis.

Light Mode – This option allows you to specify which lights will be considered when rendering the environment fog. It is used when you have certain lights affecting just specific objects in the scene while another group of lights is affecting the environment fog.

No lights – The lights in the scene will not affect the environment fog.
Use shape lights(defaults) – The lights attached to the environment fog set will be ignored. Only the lights affecting the shape where the fog resides, will be used.
Override shape lights – Only the lights affecting the environment fog set will be considered.
Intersect with shape lights – Only lights that are affecting both the shape and the environment fog set will be considered.
Add to shape lights – Both lights that are affecting the shape and the environment fog set will be considered.

Ior – Index of refraction for the volume, which describes the way light bends when crossing the material surface. A value of 1.0 means the light will not change direction.

 

GI (Indirect illumination)


 



Scatter GI – When on, 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. 

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

 

 

Raymarching


This sampler is used when any of the fog properties (color, density or emission) is mapped with a 3d texture. The sampler steps through the volume, evaluating volumetric textures and lighting, until it leaves the 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 Sample – 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).

Cut off 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.

Deep Output – Toggles writing deep data to the file. Note that enabling this option will force ray marching even for simple volumetrics which can cause slower rendering.

 

Fade Out


 



Fade Out Mode – Allows you to choose between two different modes of fade out.

Fade Out Radius – Allows you to set a radius for the fade out of the fog.

Per Object Fade Out Radius – When this option is selected the fade out effect we be applied to each fog volume independently.

 

Ray Filter


 

 

 

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

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

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

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

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

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

 

Notes


  • When using VRayEnvironmentFog with weak VRayLights, it may be necessary to turn down the Cut off 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. 
  • You can use the various procedural textures to 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.