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. Volume rendering is required to handle the complex light transport.
When dealing with volumetric effects that are homogeneous (the participating media is unchanging inside the volume, i.e. 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. 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. RenderMan provides a volume primitive (RiVolume) which supports this need.
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. This differs from a parametric surface, which can typically only respond to queries on the surface parameterized by two dimensional coordinates. For volume rendering of participating media such as smoke, the most typically used variable is the density of the volume. For more complicated situations like fire, densities like fuel, temperature, or velocity may be part of the variables associated with the volume primitive.
There are two descriptions of the volume primitive typically used with RenderMan.
With the geometry description of a volume being relatively simple, setting the shading parameters of the volume is critical to the overall look. For volume effects like fog, smoke, and clouds, RenderMan provides a dedicated shader called PxrVolume. After performing a volumetric simulation, a typical workflow for rendering involves setting up the geometry description as above, deciding which variables in the geometry description need to be mapped either directly to inputs of PxrVolume, or remapped using intermediate Pattern nodes, and finally tweaking the settings in PxrVolume to control the overall volumetric look. Note that scattering in the volume is controlled by the Max Path Length parameter in the chosen integrator and not the individual diffuse and specular trace depths.
The "dice" "minlength" attribute should be set to -1 to provide a hint about what the minlength should be based on the voxel data. This may become the default behavior in the future.
For debugging purposes, in the Renderman.ini file you can find /prman/deepcomp/flagvolumes and Option "deep" "int flagvolumes" controls now interpret the value 1 as an "auto" mode. This is on by default, but off if generating any deep images in DTEX format. Use 2 to force it always on. This only affects samples generated by volumes.