# multi-vtkvolume-rendering-problem

**URL:** https://discourse.vtk.org/t/multi-vtkvolume-rendering-problem/9099
**Category:** Support
**Created:** [August 6, 2022, 10:31pm UTC](https://discourse.vtk.org/t/multi-vtkvolume-rendering-problem/9099 "2022-08-06T22:31:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Dawid](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dawid/32/5605_2.png) [@Dawid](https://discourse.vtk.org/u/Dawid)
#### Post date: [August 6, 2022, 10:31pm UTC](https://discourse.vtk.org/t/multi-vtkvolume-rendering-problem/9099/1 "2022-08-06T22:31:44Z")

</div>

Hi everybody,  
Recently I researched multi-volume rendering.  
I use vtkGPUVolumeRayCastMapper in VTK 9.1.0.  
I use a multi-volume rendering method to separate the nodules and other volume .

In the following figure, I used the method of vtkVolume.

 ![azimuth_10](https://discourse.vtk.org/uploads/default/original/2X/7/724bf954661da48f6a8aed68d94fc29fc04c17a8.jpeg)  
 ![azimuth_80](https://discourse.vtk.org/uploads/default/original/2X/c/cb3f52ec6e7fce7d1ceb9b023407628fb91b5deb.jpeg)  
 ![azimuth_250](https://discourse.vtk.org/uploads/default/original/2X/1/19963ce914f79dbb02d5abd9cda67a458a758b1d.jpeg)  
 ![azimuth_270](https://discourse.vtk.org/uploads/default/original/2X/d/de6837f2bf3985f0d1526cf975edda128665a29e.jpeg)

In the following figure, I used the method of vtkMultiVolume.

 ![azimuth_10](https://discourse.vtk.org/uploads/default/original/2X/4/4ac9a438222fe4478b851fb0c376c7a7020e60e4.jpeg)  
 ![azimuth_80](https://discourse.vtk.org/uploads/default/original/2X/4/4a2d0969fc01bf06b821c5569940ed32073ce7be.jpeg)  
 ![azimuth_250](https://discourse.vtk.org/uploads/default/original/2X/0/06496574ecfe9b2544166c7f807c3bc5334a593b.jpeg)  
 ![azimuth_270](https://discourse.vtk.org/uploads/default/original/2X/d/daff264fae3c26db4de873a44d6acbaab98c4ab7.jpeg)

All parameters are the same when I used both volume rendering methods.  
When I used the method of vtkMultiVolume, the position and focus of the light are fixed.  
But when I use the method of vtkVolume, the light moved with the camera

I hope the light to move with the camera when I use the method of vtkMultiVolume, so how to do?  
Can anyone give me some advice? Thanks in advance.

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [August 7, 2022, 10:47am UTC](https://discourse.vtk.org/t/multi-vtkvolume-rendering-problem/9099/2 "2022-08-07T10:47:20Z")

</div>

You may try to call `renderer->UpdateLightsGeometryToFollowCamera()` to update the lights positions.

I still consider multi-volume rendering as an experimental feature, because it still has many limitations and bugs (related to transformed volumes, sampling distance computation, cropping, etc).

For lung nodule visualization I would recommend segmenting the nodules and the lung parenchyma using AI-based fully automatic or semi-automatic tools and display them using semi-transparent surface rendering (with depth peeling enabled). You can add in a simple volume rendering for displaying some more anatomical context.

---

<div class="post-metadata">

### Author: ![Dawid](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dawid/32/5605_2.png) [@Dawid](https://discourse.vtk.org/u/Dawid)
#### Post date: [August 7, 2022, 12:45pm UTC](https://discourse.vtk.org/t/multi-vtkvolume-rendering-problem/9099/3 "2022-08-07T12:45:46Z")

</div>

Thanks for your advice. I’ll try to use your proposal later. But now I want to solve the problem of lights. I just called renderer-\>UpdateLightsGeometryToFollowCamera().but I still get the same result with vtkMultiVolume. Could you give me some other suggestions? Thank you very much!

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [August 7, 2022, 5:02pm UTC](https://discourse.vtk.org/t/multi-vtkvolume-rendering-problem/9099/4 "2022-08-07T17:02:38Z")

</div>

> [@Dawid](#):
>
> Could you give me some other suggestions?

I have already given it (don’t use multi-volume renderer for this purpose).

Why are you considering using multi-volume rendering (a very complex and computationally quite expensive technique) for this simple visualization task?

> [@Dawid](#):
>
> I just called renderer-\>UpdateLightsGeometryToFollowCamera().but I still get the same result with vtkMultiVolume

I vaguely remember having this issue when we added multi-volume rendering available in 3D Slicer and solving this with this call. It has to be called after every camera motion (along with resetting camera clipping planes, etc). If this advice does not help then you probably need to debug into it or contract Kitware or some developers familiar with VTK rendering to investigate this for you.
