# multi-component, parallel volume rendering using vtk

**URL:** https://discourse.vtk.org/t/multi-component-parallel-volume-rendering-using-vtk/5988
**Category:** Support
**Created:** [June 14, 2021, 9:34am UTC](https://discourse.vtk.org/t/multi-component-parallel-volume-rendering-using-vtk/5988 "2021-06-14T09:34:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![hari](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/h/cdc98d/32.png) [@hari](https://discourse.vtk.org/u/hari)
#### Post date: [June 14, 2021, 9:34am UTC](https://discourse.vtk.org/t/multi-component-parallel-volume-rendering-using-vtk/5988/1 "2021-06-14T09:34:52Z")

</div>

Hi All,

I am trying to do a parallel multi component volume rendering using vtk in python. To do this I developed a custom, parallel aware reader using vtkpythonalgorithmbase. Currently, my approach to achieve this is as follows:

step 1: create volume rendering on each rank with same viewpoint and other settings.  
step 2: Then the final image is obtained from compositing images from each rank using compositergbapass and vtkimagerendermanager.

This method works well for volume rendering with single component. However, I am facing some issues with compositing when using multiple components. Where, one component decides the opacity and other decides color.

I have tried both independent components on and off. I have also tried using vtkfixedpointvolumeraycastmapper and gpuraycastmapper. Using any of the above combinations, the rendering hangs.

I attached my script below. Any help would be appreciated.

Thanks,  
Hari.  
[vol\_render\_iso\_var.py](https://discourse.vtk.org/uploads/short-url/yPHl41jillBxDzW615xm8TdbhDO.py) (8.1 KB)
