# Volumes

###### OpenVDB bunny cloud volume available here. C4D (R18) scene available here.

Some volume file formats, such as OpenVDB, allow storing much larger datasets while being optimized for random access to volume data, which is more efficient for rendering.

OpenVDB, developed at DreamWorks Animation, is an open source C++ library comprising a novel hierarchical data structure and a suite of tools for the efficient storage and manipulation of sparse volumetric data discretized on three-dimensional grids.

Rendering of volumes should not be confused with Atmosphere Volume, which is a global effect.

A polymesh node now can be a volume container when step_size is greater than zero, and in that mode it will interpret the assigned shader as a volume shader. This can be done by adding a Mesh Volume tag to the polymesh.

Custom AOVs are not currently supported with volumes.

Volumes can only receive indirect lighting from other emissive volumes when the Volume Ray Depth is above 0.

### Type

The built-in volume types are OpenVDB, Box or Sphere. You can install custom third-party volume plugins (e.g. copy the volume binary to the \$C4D_INSTALL/C4DtoA/procedurals folder) as well which appear in the list.

### Render

The Render tab contains generic shape parameters, such as the visibility controls, shadow cast, matte, etc. See the Geometry parameters page for more details.

Enlarge the volume by Padding. This is useful when displacing a volume with a noise for example. Note that this slack applies not only to the bounding box but also to the voxels used for ray extents inside the bounding box. When velocity motion blur is enabled, some extra padding is computed, based on the maximum value of the velocity field, and the maximum of the velocity padding and user padding is applied. When padding exceeds the bounding box maximum dimension, the ray extents acceleration makes little sense and is disabled, so you should set the padding as tightly as possible.

For best performance, this should be set as low as possible, while still covering the maximum displacement amount.

The amount of padding to add to the volume bounds for displacement

## OpenVDB

#### File path

The location of the VDB file. File sequences are automatically recognized and numbers are replaced with # characters in the file name. You can manually edit the path if you don't want padding in the file name.

Make sure that the IPR is not running when setting the file path, otherwise the bounding box will not display at the correct size in the viewport.

#### Animation

Loads a file sequence when enabled. Loads the sequence automatically based on the file name in case it's easily recognizable (e.g. test_001.ass). Otherwise you case specify the padding pattern (e.g. ####) in the fie name explicitly.

#### Start frame

Defines the first frame of the animation when a frame sequence is defined (with # is used in the path).

#### End frame

Defines the last frame of the animation when a frame sequence is defined (with # is used in the path).

#### Step frame

Defines the increment of the animation when a frame sequence is defined (with # is used in the path). For example start frame 0, end frame 10, step frame 3 selects frame 0, 3, 6, 9 from the animation.

#### Offset

Defines which frame of the scene the animation starts at. For example offset 2 means that the first frame of the animation is at frame 2. Offset -2 positions the third frame of the animation at frame 0 of the scene.

#### Loop

Defines how the animation is repeated.

• none: no repeat, nothing is displayed when the animation is ended.
• freeze: keeps the last frame rendered when moving further on the timeline.
• repeat: repeats the animation from the beginning.
• ping pongwill animate forward, then in reverse, then forward again, and so on.

#### Scale

Scales the volume according to the Export scale defined in the render settings. For instance if the Export scale is 1 m and the volume is specified as 1 cm, then it is scaled down by 0.01.

The density and emission of the Standard Volume shader depends on the scale, which is not updated by the plugin automatically. When you scale down a volume, you have to scale the density and emission intensity up.

#### Available Grids

Displays the grids (channels) available in the selected OpenVDB file.

#### Grids

A list of OpenVDB grids to read and make available as channels in the volume shading context. Examples of Grid names are density, fuel, heat, temperature or velocity.

#### Velocity Grids

Either 1 vector grid (eg. v or vel) or 3 float grids (eg. vel.xvel.yvel.z) representing the velocity field, to be used for motion blur. No motion blur will occur if an invalid combination of grids or if no grids are specified. Note that all velocity grids declared here are also available as channels in the shading context.

#### Velocity Scale

A scale factor for the velocity field. A value of 0 disables motion blur.

#### Velocity Threshold

Controls filtering of noisy velocities resulting in the faster rendering of motion blur from physics simulations. The default value of 0.001 should have little to no visual impact. Setting it to zero disables filtering entirely.

#### Step Scale

A scaling factor applied to the step size, mostly useful when the Volume Step is set to Automatic, to modulate the automatic value. For low frequency, smoke-like volumes, a value of 4 is a reasonable starting point.

## Implicit

OpenVDB volumes can be rendered and shaded as implicit surfaces by changing the Shape type to implicit.

#### Solver

The uniform solver may be used for arbitrary fields. It works by taking small steps through the field to find the surface. This makes it relatively slow, but suitable for arbitrary fields generated by a procedural texture shader for example. When the field is a level set, for example from a level set grid in a VDB file, the levelset solver may be used instead for better performance and quality. Level sets guide the solver towards the surface, to converge quickly with few steps.

#### Threshold

The surface is defined where the field value equals the threshold. The surface is defined by the implicit equation:

$field(x) = threshold$

#### Samples

The number of samples used to find intersection points. Increase this value to avoid artifacts such as holes.

#### Field Channel

Volume channel used as the field to define the implicit surface.

#### Field

Shader to generate the scalar field used to define the implicit surface.

By default a standard_volume shader is assigned to the volume which reads the 'density' channel. Assign a new standard_volume shader to customize the render.

If you need to further edit the result of the reading of a channel, for instance to color correct it, you can use the Volume Sample RGB and Volume Sample Float shaders to feed the Scattering color of the standard_volume shader.

## Reducing Noise

To reduce the amount of noise in a volume, you must ensure that any lights in your scene have sufficient volume samples, or alternatively that you have enough AA samples.

An example scene file can be found here (R16). You will also need to download the smoke2.vdb file.

#### Volumes and Atmosphere Volume

Currently, Atmosphere Volume does not compose well against volumes. This is because atmosphere's return a single flat result that is opacity mapped on top of whatever is in the background of the pixel.

Left: floor plane geometry hidden. Right: floor plane geometry visible. Fluid renders incorrectly. Click images above to view animation.

• No labels