Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A VDB grid is a sparse tree representation of voxel data. For instance, a float grid stores one single-precision floating point value per voxel. After the OpenVDB file is loaded, a list of grid names become available in the pulldown menu. Pick the grid name you want to sample. All grids are sent to the renderer as primvars, however only those wired into the PxrVolume shader will be used. 

Filter Width

 If set to 0, this disables mipmapping. If greater than 0, values less than 1 bias towards finer levels of the mipmap and values larger than 1 bias towards coarser levels.

Density Multiplier

Scales the values in the density grid of the volume. This should be more efficient than scaling the density in the PxrVolume shader.

Density Rolloff

Values greater than 0 produce a logarithmic falloff in density values. Smaller rolloff values produce greater falloff.


Note

Blobbies are currently not supported by the PrmanVolume node.

 


Box Volumes

The PxrVolume shader can be attached to any closed piece of geometry for simple effects within a shaped region, however for effects such as fog that enclose the camera or envelop light sources RenderMan requires that the PxrVolume shader be attached to an RiVolume object. This is accomplished in Katana by selecting the ‘box' volume type in the PrmanVolume node:

 


The default settings of the node will create a uniform fog effect with a primvar called “density”. Below is the Katana recipe for creating and shading a fog volume:

Katana Fog Shading Network

 


 


More complex effects can be set up on a Box volume by adding the primvars via the UI and setting up a corresponding PxrPrimvar pattern to be wired into the PxrVolume shader.

...

With the PrmanVolume type parameter set to ‘vdb’ you’ll have parameters available to enter the OpenVDB filename then select the base density grid: 


OpenVDB Shading Network

RfK will internally create primvars for all grids found in the VDB file (float or vector3). There is no penalty if they are not used. These primvars are . PxrVolume can look up the density and velocity primvars by name.  For accessing other primvars or to modify the existing density and velocity, primvars can also be accessed by the shading network via the PxrPrimvar pattern node: 


 


Connect the result of PxrPrimvar directly to the the PxrVolume shading node, or wire it through other shading nodes, as in the image below:

 




With the two networks wired together we can combine the overlapping volumes in a single render:

 


The example scene using the PrmanVolume primitive and PxrVolume shader can be found here.

...

An example of using multiple vdb grids as primvar input to the PxrVolume shader is shown below: 


The expressions that you use in the PxrSeExpr node are going to be look dependent.  When creating the file for the documentation, below is what was used for the incandescence and the density bias.

...