Home Rendering 

Volumetric Rendering

Volumetric rendering is an approach in mantra that allows high quality, integrated rendering of volume-like effects such as: smoke, clouds, spray, and fire.

Scenes that are particularly suited to rendering with mantra volumes include detailed “hero” clouds, smoke, or fire as well as fields of instanced clouds, smoke, or fire. Scenes with a single uniform fog, for example, may not be suitable for volumetric rendering.

Volumetric Rendering from a Primitive

  1. Create an object.

  2. At the geometry level of the object create an IsoOffset node and attach it to the geometry.

  3. In the parameter editor of the IsoOffset node, set the Output Type to SDF Volume, turn on the Invert Sign checkbox, and turn off the Laser Scan checkbox. You can modify the Divisions and Iso Divisions parameters to get a more detailed volume.

  4. Create a Material in the SHOP network that consists of a VEX Volume Cloud shader and assign it to the object.

    For more information on creating and assigning materials, see the Materials help.

  5. Set up lights. If you want shadows you must set the Shadow Type parameter to either Depth Map Shadows or Ray-Traced Shadows on the Shadow tab of the light. Using depth map shadows is much faster than ray traced shadows.

    For more information on setting up Lights see the Lights and Cameras help.

  6. Render your scene and you will see smoke.

Note

You may want to tweak the volume step size, shadow map, quality, and volume primitive divisions.

Volumetric rendering can also be done automatically with a fluid solver, as fluids have default shaders. For more information see Fluid Simulation.

Controlling Quality and Performance of Volumetric Rendering for Surfaces

Volumetric rendering uses ray marching to step through volumes. Ray marching generates shading points in the volume by uniformly stepping along rays for each pixel in an image.

To...Do this

Change the quality of the volume ray marching

Increasing the pixel samples produces more ray marches within that pixel leading to higher quality. Using more pixel samples also improves the antialiasing and motion blur quality for the volume. This value can be modified in the Pixel Samples field on the Sampling sub-tab of the Properties tab in the parameter editor of the render node.

Improve quality and decrease performance

Decrease the Volume Step Size to produce more samples in the volume interior. This field can be edited on the Sampling sub-tab of the Properties tab in the parameter editor of the render node.

You can also change the Shadow Step Size to adjust the quality of shadows.

Generally, it is better to decrease the volume step size than to increase the pixel samples because a smaller volume step size will result in more accurate renders.

This example shows a render that uses 2×2 Pixel Samples and a Volume Step Size of 0.25.

This example shows the same scene rendered with 4×4 Pixel Samples and a Volume Step Size of 1. The detail in the shadow has been lost and the volume is more transparent. However, the quality level is approximately the same.

Controlling Quality and Performance of Volumetric Rendering for Shadows

Shadow map generation uses the samples and shadow step size to control the quality and performance in exactly the same way they are used for on surfaces. Since volumes often cast soft shadows and diffuse shadows, it is often possible to use low-resolution deep shadow maps when rendering volumes, which leads to quicker render times. These parameters can all be specified on the Shadow tab of a Houdini light.

Note

The shadow map resolution can be changed on the Shadow tab of a light node.

Rendering Metaballs

Metaballs can be rendered as a volume in mantra. Metaball rendering can be enabled by turning on the Metaballs as Volume checkbox on the Geometry sub-tab of the Render tab of a Geometry object. Any point attributes on the metaballs will be interpolated to the shading position in the same manner that point attributes are interpolated for metaball surfaces.

This examples shows metaballs rendered as a volume using randomized point color attributes.