1.9. Transforming and Combining Volumes

There are several different cases where an application has to deal with multiple volumes. The first case is where the scene contains multiple independent volumes. By independent we mean that each volume is rendered with no dependency on the data values in the other volumes. The volumes may have completely different dimensions and extent in 3D. We explain this case in Section 1.9.1, “Independent volumes”.

Another case is where the application needs to transform a volume. When we say "transforming a volume", we mean something different than transforming geometry. Although classical transform nodes can be applied to the geometric extent of a volume, transforming a volume means to modify the values in the volume, effectively producing a new volume (or volumes). Transforming a volume can be useful for tasks ranging from simply scaling the values in the volume, to applying a noise reduction filter to generating derived data sets like seismic "attributes". VolumeViz provides three ways to transform a volume:

The third case is where there are multiple data volumes that are combined to render a single volume on the screen. Combining volumes could mean combining the data values by arithmetic, for example computing the difference volume by subtraction. Combining volumes could mean setting data values to a completely transparent value according to the values in a second "mask" volume. Or combining volumes could mean “blending” the volumes by combining color values. VolumeViz provides two ways to combine volumes.

  • Class SoDataCompositor SoDataCompositor SoDataCompositor defines a volume combining function that is applied to each set of tiles (one from each input volume), on the CPU, after they are loaded (returned from the volume reader) but before the resulting tile is stored in system memory. The combining operation is only applied once to each set of tiles and the result is a single tile. So multiple input volumes become a single volume in memory. This class is explained in Section 1.9.3, “Combining volumes”.

  • Applications can also combine volumes on the GPU as part of the rendering pipeline. This is done by writing a custom shader function in the GLSL language and replacing the VVizCombineData or VVizComputeFragmentColor function in the VolumeViz shader framework. This is explained in Section 1.8, “Shaders”.