Page tree

Versions Compared

Key

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

...

Rendering volumes in Katana is similar to rendering other geometry: you'll need a volume primitive and a volume shader. The RenderMan Volume primitive is created in Katana using the PrmanVolume node. For a simple homogeneous volume such as fog you'll just need to assign the PxrVolume shader to the PrmanVolume primitive. More complex shading can be built on top of a PxrPrimvar pattern wired to connect volume data into the volume shader. RenderMan's volume shader PxrVolume along the PxrPrimvar and other patterns, provide a complete volume workflow for either OpenVDB volume data or geometric volume primitives. For more details on RenderMan's volume primitives see the RenderMan Volume Documentation.

Currently PrmanVolume supports two types of volumes:

...

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 accessed by the shading network via the PxrPrimvar pattern node:

 

 

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

...

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

OpenVDB Fire

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

...

Code Block
$density = bias($density,0.815);
$density1 = 0.9 * smoothstep($density, 0.136, 0.15);
$density2= 0.9 * (1 - smoothstep($density, 0.15, 0.857));

if ($density < 0.15) {
    $density = $density1;
} else {
     $density = $density2;
}
$density

 

Resources