

With the geometry description of a volume being relatively simple, setting the shading parameters of the volume is critical to the overall look.

The Primitive Variables tab describes the mapping from the OpenVDB grids to the variables that will be made available to RenderMan. An OpenVDB file has been loaded from disk and the contents of the density grid visualized in Maya.

Below is an illustration of using the OpenVDB Viewer node supplied with RenderMan for Maya. In this case, the volume description simply involves the extents of the box, the OpenVDB file, and the grids from the OpenVDB file which correspond to useful primitive variables. RenderMan provides a plugin called impl_openvdb which can use VDB files directly.

In the attribute editor, the resolution describes the number of subdivisions of the box, which ultimately affect the accuracy of the volume simulation and rendering in this case, the box is divided into 10x10x10 voxels. In the Maya user interface shown below, the bounds of the box are directly manipulated in the viewer on the left. This approach is used by RenderMan for Maya to render Maya fluids. This representation, while simple, may lead to unwieldy RIB files for dense volumes. A lookup of a variable within the box perform trilinear or tricubic interpolation of the nearest lattice points. The simplest is a box subdivided in three dimensions into a regular lattice of voxels, with values provided for arbitrary variables at every corner of the lattice.There are two descriptions of the volume primitive typically used with RenderMan. For more complicated situations like fire, densities like fuel, temperature, or velocity may be part of the variables associated with the volume primitive. For volume rendering of participating media such as smoke, the most typically used variable is the density of the volume. This differs from a parametric surface, which can typically only respond to queries on the surface parameterized by two dimensional coordinates. The volume primitive is simply a rectangular axis-aligned box which can return a value for an arbitrary variable at a three dimension coordinate inside the box. RenderMan provides a volume primitive (RiVolume) which supports this need. However, if the effects are heterogeneous (like fog or clouds), then a special type of geometry is typically needed in order to provide values that change over a three dimensional domain. unclouded glass or water), a dedicated volume shader like PxrVolume or a surface shader that supports some volumetric effects like PxrSurface can be used on closed geometry of any type - for example a subdivision mesh. When dealing with volumetric effects that are homogeneous (the participating media is unchanging inside the volume, i.e. Volume rendering is required to handle the complex light transport. The rendering of effects like fog, smoke, clouds, cloudy water, and even glass is complicated because light no longer just interacts with the surface of a material it can be both attenuated and scattered inside and within the participating media.
