New in ParaView 5.9: Volume rendering with a separate opacity array

July 20, 2020

Previous versions of ParaView supported volume rendering with independent mapping of colors and opacities to different components of a single input data array. However, it was available only for very specific dataset array formats, and it was not straightforward to create those arrays if they did not already exist. Coming in ParaView 5.9, ParaView’s user interface has been improved to make selection of a separate array for opacity mapping simple.

Consider the example a computed tomography image of a tooth. By computing and using the gradient of the density field as the scalar opacity array, the internal and external shape of the tooth is emphasized by making high-gradient areas more opaque. The absolute density of those regions is separately shown with a color map applied to the original density field.

We have augmented ParaView to expose controls in the GUI and the Python scripting interface to make mapping by a designated opacity array much easier. For the Volume representation, we have added a display property called “Use Separate Array for Opacity”. When checked, ParaView shows additional controls for selecting the array to use for opacity mapping. If the selected array has more than one component, either a component from the array or the magnitude of the vector field represented by the array can be selected. The new GUI elements are shown in the screenshot below:

When the “Use Separate Opacity Array” property is enabled, transfer function resetting follows the same semantics as when the existing “Multi Components Mapping” is enabled. That is, the opacity transfer function range is set to the range of the component/magnitude of the selected opacity array, and the range of the color transfer function is set to the range of the component/magnitude of the array selected for color mapping. Specifying a custom data range can now be done independently for color and opacity arrays through the “Set Range” dialog.


For each dataset type, ParaView provides several volume rendering algorithms for each volumetric dataset type. Each algorithm trades rendering accuracy for performance. Several of these mappers do not support separate color and opacity mapping. As a consequence, the newly exposed options for choosing a separate opacity array are not available for those mappers. The most often used volume renderers do support separate opacity arrays, however. For unstructured grids, the “Projected tetra” and “Resample to Image” volume renderers support a separate opacity array. For regular grids, the “GPU Based” volume renderer support a separate opacity array, as does the “Smart” volume renderer when GPU-based volume rendering is supported.


The authors thank the Data Analysis and Assessment Center of the United States Department of Defense High Performance Computing Modernization Program for sponsoring the development of this ParaView feature.

Leave a Reply