This page provides some useful tips for rendering volumetric effects.
Volumetric vs Volumetric Geometry mode when rendering on the CPU
The Volumetric Geometry mode is provided as an option for the following reasons:
- Generation of Render Elements for compositing - for a complete list of the supported Render Elements in both Volumetric and Volumetric Geometry mode, please check the V-Ray Render Elements Support page.
- Blending of multiple atmospheric effects in the scene - e.g. you use an Aerial Perspective and a Phoenix FD Simulation - if the mode is set to Volumetric, one would be entirely behind the other in the rendered image.
- The Volumetric Geometry mode does not work with Probabilistic Volumetrics.
- The Volumetric Geometry mode tends to be slower to render. Ideally, you should work in Volumetric mode all the time and switch to Volumetric Geometry only when generating the Render Element passes.
- The Approximate and Approximate+Shadows Scattering options under Volumetric Render Settings → Smoke Color are not supported in Volumetric Geometry mode. It would default to Disabled scattering.
- You may need to increase the V-Ray Settings → Global Switches → Advanced toggle → Max.Transparency Levels option which will slow-down rendering. When rendering in Volumetric Geometry mode, procedural geometry made up from multiple transparent layers is generated at render-time. Think of it as sprites used in video games - a sequence of slices facing the camera.
- The default 3ds Max Scanline renderer is not supported.
When rendering with V-Ray GPU, the Render Mode does not matter - Render Elements are generated and the rendering speed is the same in both the Volumetric and Volumetric Geometry modes.
AUR vs VDB Cache Format
VDBs render slower than AUR files.
The VDB layout which makes it possible to render huge sparse-grid volumes makes rendering everyday volumes slower than the dense-grid AUR format.
If you can choose between AUR and VDB, go with AUR when possible. The rendering speed-up with AUR files can go up to 2x depending on the complexity of the setup.
Furthermore, resimulation results when using VDBs as a base usually differ from the results when using AUR files due to differences in the default compression methods.
Core Volumetric Shader Settings
Rendering roll-out → Step %.
The Step % parameter is the main sampling control when rendering volumetric effects. The higher you can set the Step %, the faster the rendering will go. Eventually artifacts will start to appear for very high values, so that is where you must stop increasing the Step %.
The Step % option specifies the ray marching step of the camera rays as a percentage of the cell size. As the renderer traces rays through the simulator, this value controls how often to get information from the grid. If the Step % is more than 100, some cells will be skipped and artifacts may appear. A lower percentage might be necessary so that fine details are not lost when custom changes are made to the Opacity curves for Fire / Smoke.
Rendering roll-out → Shadow Step %.
The Shadow Step % is similar to the Step % in a sense that it is responsible for the sampling quality of the volume but for the shadows cast by the volume over itself and the surrounding objects only. The higher you can set the Shadow Step %, the faster the rendering will go. Eventually the shadows will become washed out for very high values, so that is where you must stop increasing the Shadow Step %.
Volumetric Options → Smoke Color → Use Light Cache | Light Cache Speedup.
In general, for lower-resolution simulations, the Phoenix FD Light Cache will significantly speed up the rendering. As the resolution increases, the benefit from using the Phoenix FD Light Cache diminishes. If Use Light Cache is disabled, try enabling it to check if that will speed-up the rendering. You can reduce the render times significantly by increasing the Light Cache Speedup setting. Increasing it from 0.9 to 0.99 to 0.999 should yield a big difference in render speed.
The Light Cache Speedup should be increased until artifacts start appearing in the rendered image. Grid Light Cache artifacts will look like voxel-sized dark and bright spots. They would also flicker in animation. Grid artifacts start appearing when a voxel does not get to cast enough shadow rays – this is usually related to the lighting setup – e.g. the illumination is too dim, there are too many grids in the scene, etc. If you see these artifacts, then your Light Cache Speedup is too high and you have to decrease it. If decreasing it to zero still does not help, disable the Light Cache.
Disable the Use Light Cache option if:
- Reducing the Light Cache Speedup option to zero does not help resolve artifacts in the smoke. If you see bright and dark voxels, this means the light cache speedup is too high. If you see pixel sized noise, then it's the sampling - you should adjust the V-Ray settings accordingly (e.g. increasing the Max Subdivs for the Bucket Sampler).
- You are rendering an animation and you notice flickering which will not go away after reducing the Light Cache Speedup.
- You are using Progressive rendering.
- There are multiple grids in the scene - for a large number of grids in the same scene, disabling the Phoenix FD Light Cache might speed things up, as opposed to a single grid where it's best to keep it enabled.
When rendering with V-Ray GPU, the Use Light Cache option is ignored entirely - the Phoenix FD Light Cache is a CPU-only 'hack' used to speed up CPU rendering.
V-Ray Sampling Artifacts:
Pixel-sized artifacts caused by low V-Ray Sampling settings could manifest in the rendered image, especially if using Smoke Color → Scattering → Ray-Traced (GI).
To resolve these, increase the Max Subdivs in the V-Ray Settings window.
Volumetric Options → Fire / Smoke Color / Smoke Opacity roll-outs
If using any textures for modulating / replacing the Fire, Smoke Color or Smoke Opacity, disable them to check how the rendering speed compares. Some textures and complex texture networks can be slow to evaluate and render.
Volumetric Options → Smoke Opacity → Optimize Big Volumetric Grids
When enabled, an optimization pre-pass over each grid in the scene will be run to speed up the rendering process.
It's best to keep this option enabled unless:
- You are low on RAM - this option requires additional memory during rendering, so you could disable it if you don't have enough RAM.
- Multiple Volumetric Grids are present in the scene - a pre-pass will be run for each grid - this may delay the rendering start long enough to negate the render speed gains from the optimization.
- Progressive Rendering is enabled - the pre-pass will delay the start of the rendering process - you may want to disable it if that behavior is undesirable
This parameter only affects the rendering speed - the quality of the rendered image is not affected.
Volumetric Options → Smoke Opacity → Minimum Visible Opacity
If the opacity of a voxel is below the specified value, the voxel will not be shaded at all. This option is a huge time saver for volume rendering. It should always be kept at 0.001 or higher unless the Smoke is getting cut off abruptly.
Volumetric Options → Smoke Color → Scattering
This option controls how light rays are scattered inside the volume. It's best kept at Approximate or Approximate+Shadows (the latter also affects the shadows cast over the scene geometry).
Ray-Traced (GI only) is the more realistic setting, but it would be very slow to render with large grids using V-Ray Adv (CPU). You could use this option when:
- You need realistic looking vapor clouds.
- You are rendering with V-Ray GPU - Ray-Traced Scattering is significantly faster when rendering on the GPU. V-Ray Global Illumination should be enabled for this option to have any effect, otherwise it would default to Disabled scattering.
- You are rendering in Volumetric Geometry Mode with V-Ray Adv (CPU) - the Approximate and Approximate+Shadows options are not supported.
Volumetric Options → Smoke Color → External Scatter Mult
If you want to get a better sense of volume for the look of the smoke, instead of increasing its opacity, you could decrease the External Scatter Mult - this would prevent light from going too deep in the smoke and you would get stronger shadows in the volume with the same opacity.
Volumetric Options → Fire → Fire Lights
Enabling Create Fire Lights simulates Global Illumination by placing light sources in the bright parts of the fire, which produces similar results and renders much faster. It can be used in with both GI on and off as well, because it would help in cases where large environments need to be illuminated by very small, very bright Fire Lights.
Disable Create Fire Lights - if this speeds up the rendering significantly then you can experiment with the options in the Fire Lights section.
When rendering with V-Ray GPU, the Fire Lights options are ignored entirely. Global Illumination should be enabled from the V-Ray Settings if you need the Smoke and/or the scene to be illuminated by the fire.
Grid-Based Self Shadowing ignores any geometry inside the grid and shines right past it. This also applies for intersecting grids. If this behavior is undesirable, switch to Ray-Traced Self-Shadowing mode.
If you are in the default Grid-Based Self-Shadowing mode, the most important thing for increasing render speed is to try to decrease the Light Resolution(%), especially if there are many volumes shining on each other. Do not be afraid to decrease it below 1% - light resolution usually does not matter for detail nearly as much as the opacity resolution so you should be able to drop it very low before shading artifacts start showing up.
For very simple scenes, setting the V-Ray Settings → Global Switches → Advanced → Adaptive lights drop-down to Full Lights Evaluation may speed up the rendering of volumetric effects.
For more information on Adaptive Lights, take a look at the Understanding Adaptive Lights article.
Smoke Opacity and Probabilistic Volumetrics
Thick (highly opaque) Smoke renders faster than thin (highly transparent) Smoke because the lighting calculations for voxels completely hidden behind other, opaque voxels, can be skipped entirely.
If your Smoke is dense, you can speed up rendering further try enabling the Use Probabilistic Shading option in the Environment and Effects window to see if that gives you a boost in render speeds.
If your Smoke is highly transparent, Probabilistic Volumetrics won't make much of a difference, and in some cases may even slow down your renders.
If V-Ray's Global Illumination is enabled, the number of GI Samples will heavily affect the render times. Both high and low values will increase the render time - you should aim to find a good value somewhere in the middle.
V-Ray Adv vs V-Ray GPU Rendering of Volumetric effects
All options under the Rendering roll-out are supported by V-Ray Adv (CPU).
The following options are not supported by V-Ray GPU:
- Smoke Color → Scattering → Approximate & Approximate+Shadows - V-Ray GPU is significantly faster when using the Ray-Traced (GI Only) option. V-Ray Global Illumination should be enabled for this option to have any effect.
- Smoke Color → Use Light Cache. This option refers to the internal Phoenix FD Light Cache, which is not related to the V-Ray Light Cache. It's a CPU-only feature that helps speed up Bucket rendering.
- Fire → Fire Lights. All Fire Lights options are ignored when rendering with V-Ray GPU. Enable Global Illumination from the V-Ray Settings if you need the Smoke and/or the scene to be illuminated by the fire.