OpenVDB

OpenVDB

OpenVDB is an open source hierarchical data structure for volumes. The OpenVDB Maya plugin ($RMSTREE/plug-ins/OpenVDB.so) is supported by Renderman for Maya.

images/rfmOpenVDBIcon.png

With one click on the icon, RfM automatically creates the default setup for reading, visualizing, and rendering OpenVDB volume data.

For more information about OpenVDB, see the OpenVDB FAQ.

How To Read OpenVDB

In Renderman for Maya, to read an OpenVDB file, simply click on the OpenVDB icon. This will create an OpenVDB Read, which allows a user to browse to an OpenVDB file via the file picker for the VDB File Path.

images/rfmOpenVDBRead.png

How To Visualize OpenVDB

After an OpenVDB file is loaded, an OpenVDB Visualize tab will appear in the Attribute Editor.

The OpenVDB Visualizer displays the OpenVDB volume data inside Maya as well as provides options to change how the OpenVDB data is emitted to the RIB.

By default, Renderman for Maya emits an RiVolume. If the Surface checkbox is checked in the OpenVDBVisualize node, or if the OpenVDB file contains only level set data, then an RiBlobby is emitted instead. In this case the user will want to wire in a different shader than the default PxrVolume. Renderman for Maya's Custom Shading Group attribute can be added to connect in a shading group.

images/rfmOpenVDBVisualizer.png

RIB Options

The following options can be used to change how the data gets emitted to the RIB for your OpenVDB volume.

VDB Grid Name

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 available in the pulldown menu. Pick the grid name you want to sample.

Surface

Instead of creating a RiVolume, this will create a RiBlobby. Note that turning this on can slow down your render.

Isovalue

This sets the threshold for the volume.

Visualizer Options

The following attributes are for visualizing only. Changing them does not change the render of the volume.

Active Value Bounding Box

Show/hide active value's bounding box.

Internal Nodes

Show/hide internal nodes.

Leaf Nodes

Show/hide leaf nodes.

Active Tiles

Show/hide active tiles.

Active Voxels

Show/hide active voxel.

OpenVDB Shading Network

The OpenVDB Visualizer icon automatically sets up the volume shading group.

images/rfmOpenVDBNodeNetwork.png

A default shading group is automatically created with a PxrVolume with a PxrPrimvar for density. This default shading group can be modified according to your needs.

images/rfmOpenVDBVolumeSGNetwork.png

RIB Example

Grid Name = density

Volume "blobbydso:impl_openvdb" [-19.2683 20 -7.80488 80.9756 -18.7805 18.5366] [0 0 0]
       "constant string[2] blobbydso:stringargs" ["/home/smith/fire.vdb" "density"]
       "varying float density" [] "varying float temperature" [] "constant float blobbydso:threshold" [0]

Grid Name = temperature

Volume "blobbydso:impl_openvdb" [-19.2683 20 -7.80488 80.9756 -18.7805 18.5366] [0 0 0]
       "constant string[2] blobbydso:stringargs" ["/home/smith/fire.vdb" "temperature"]
       "varying float density" [] "varying float temperature" [] "constant float blobbydso:threshold" [0]