# Paraview 5.6.0 - distribute volume rendering

**URL:** https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249
**Category:** ParaView Support
**Created:** [February 7, 2019, 3:15pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249 "2019-02-07T15:15:00Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![kmilo9999](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/cc9497/32.png) [@kmilo9999](https://discourse.paraview.org/u/kmilo9999)
#### Post date: [May 7, 2019, 1:04am UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/21 "2019-05-07T01:04:01Z")

</div>

Hi @utkarsh.ayachit ,

I’m attaching the pvx file we use in our cave system. It’ll show you the complexity of it.

[yurt\_pserver.pvx](https://discourse.paraview.org/uploads/default/original/2X/a/a41e118af426f0cc168e72dd75fe764db52dd658.pvx) (25.8 KB)

I wouldnt know how to simplify it for a less robust system though.  
The ScalablePol tag is related to the scalable software we use to blend the scene into our multi display cave. So far it works with surfaces, but no volumes.

Thanks

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [May 7, 2019, 12:55pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/22 "2019-05-07T12:55:02Z")

</div>

wow…68 tiles! that’s something :).

Next, can you tell your dataset extents and bounds. That way I can put together a mock dataset for testing.

BTW, not sure if you’re aware, but an easy way to test out a CAVE setup on a desktop machine is first to remove all the `Environment` items from the pvx file and then run the pvserver on the machine as follows:

```bash
> export PV_ICET_WINDOW_BORDERS=1
> mpirun -np <num ranks> pvserver my-config.pvx

```

That creates a collection of 400x400 windows for each of the ranks that show the rendering results for each.

---

<div class="post-metadata">

### Author: ![dhl](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@dhl](https://discourse.paraview.org/u/dhl)
#### Post date: [May 7, 2019, 1:13pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/23 "2019-05-07T13:13:55Z")

</div>

68 actually 🙂

Nice trick! That will be very helpful, although 69 400x400 windows will be too big for any monitor…

We have a couple of challenges we’re running up against. One is automating finding and setting the extents/bounds. The other is that transformations seem to mess things up.

I’m hoping that Camilo can update you on the extents/bounds.

D

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [May 7, 2019, 1:21pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/24 "2019-05-07T13:21:06Z")

</div>

> One is automating finding and setting the extents/bounds.

I should be able to fix this, I think. At least I should be able to figure out if it really is needed fairly quickly.

> The other is that transformations seem to mess things up.

This will be the tricky one since I am not too familiar with the volume mapper code, but once I can reproduce it, I know whom to seek help from (cc: thanks in advance, @martink ;)). Just to confirm, this issue is only with volume rendering, right? and not when rendering surfaces? That helps isolate the problem.

---

<div class="post-metadata">

### Author: ![kmilo9999](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/cc9497/32.png) [@kmilo9999](https://discourse.paraview.org/u/kmilo9999)
#### Post date: [May 7, 2019, 2:03pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/25 "2019-05-07T14:03:44Z")

</div>

This is the link of the dataset we are currently testing with.

> **[ctVolume.vti](https://drive.google.com/file/d/15iDM-EhnetBawF0cBy06FbCm6PVu9G9y/view?usp=drive_open)**
>
> Google Drive file.

We kept the default bounds of the dataset applied by Paraview. The time changed the extensions in the source code, we followed the procedure described in the Mar 15 post along with the results obtained from the test.

Thanks

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [May 7, 2019, 7:41pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/26 "2019-05-07T19:41:09Z")

</div>

Thanks for the dataset. I can confirm that the reset clipping planes change is not needed (at least on `master` branch as of this morning). The issue is indeed that the `vtkGPUVolumeRayCastMapper` does not handle rendering correctly when `vtkCamera::UseOffAxisProjection` is true. ParaView does indeed set that to true when a pvx configuration is specified and hence the bug.

To confirm this issue with `vtkGPUVolumeRayCastMapper`, here’s what I did.

1. created a smaller dataset from the `ctVolume.vti` by subsampling it. Simply using **Extract Subset** filter in paraview with the **Sample Rate I/J/K** set to 5 and saving that dataset out did the trick. Then I used this dataset from my visualization.
2. Now, instead of volume rendering the subsampled dataset (after passing it through the `ProgrammableFilter` of course, to fix the piece request issue), I applied the **Tetrahedralize** filter. Now, I volume rendered the unstructured grid produced. While unstructured grid volume rendering in slow (hence the use of subsampling), it showed the volume data where I expected it to see in my test.

---

<div class="post-metadata">

### Author: ![kmilo9999](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/cc9497/32.png) [@kmilo9999](https://discourse.paraview.org/u/kmilo9999)
#### Post date: [May 7, 2019, 8:38pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/27 "2019-05-07T20:38:23Z")

</div>

Thank for the heads up!!!  
So, applying the programmed filter plus Tetrahedralize filter will help us displaying and transforming the volume data properly in the cave?  
Just want to be sure before proceeding with tests.

---

<div class="post-metadata">

### Author: ![dhl](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@dhl](https://discourse.paraview.org/u/dhl)
#### Post date: [May 7, 2019, 9:52pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/28 "2019-05-07T21:52:22Z")

</div>

Hi Camilo

I don’t think the recipe Utkarsh has will give good results in general, given the speed and resolution factors. It is a good test case for him to identify where the issue is in the VTK ray-casting volume renderer.

Utkarsh, is there a simpler 3D texture based volume renderer that might work for us, or is the one we’re using as simple as it gets?

Thanks for your bug finding!

-David

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [May 7, 2019, 10:26pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/29 "2019-05-07T22:26:37Z")

</div>

Camilo, @dhl is indeed correct that the steps I mentioned are not a solution but merely a way to isolate the issue.

@dhl, I tried with `vtkFixedPointVolumeRayCastMapper` instead of the default `vtkGPUVolumeRayCastMapper` but it too has the same issue.

@martink, do you have any insight into how much effort it would be to update these mappers to respect the off axes projection? That seems to be the issue, as far as I can tell.

---

<div class="post-metadata">

### Author: ![martink](https://discourse.paraview.org/user_avatar/discourse.paraview.org/martink/32/2082_2.png) [@martink](https://discourse.paraview.org/u/martink)
#### Post date: [May 8, 2019, 12:45pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/30 "2019-05-08T12:45:01Z")

</div>

Shouldn’t be too hard given a test case we can run locally (e.g. a single window that uses the off axis projections) so that we can make sure it is fixed.

I would think the issue is in code like vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::RenderVolumeGeometry that makes assumptions about the view plane being orthogonal to the cam\_pos -\> focal\_point direction.

---

<div class="post-metadata">

### Author: ![Aashish\_Chaudhary](https://discourse.paraview.org/user_avatar/discourse.paraview.org/aashish_chaudhary/32/300_2.png) [@Aashish\_Chaudhary](https://discourse.paraview.org/u/Aashish_Chaudhary)
#### Post date: [May 8, 2019, 6:05pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/31 "2019-05-08T18:05:53Z")

</div>

@martink @utkarsh.ayachit that very well the case might be. We have not tested the code on the CAVE, although it does work (volume rendering) in the HMD (which uses a different code path). Off axis projection changes the camera matrix, is it possible that volume mapper might not be getting the correct matrix?

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [May 8, 2019, 6:13pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/32 "2019-05-08T18:13:01Z")

</div>

> [@Aashish\_Chaudhary](#):
>
> Off axis projection changes the camera matrix, is it possible that volume mapper might not be getting the correct matrix?

The reason why I believe that’s not the case is that `vtkOpenGLProjectedTetrahedraMapper` uses `vtkOpenGLCamera::GetKeyMatrices` too and doesn’t have the same issue.

---

<div class="post-metadata">

### Author: ![dhl](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@dhl](https://discourse.paraview.org/u/dhl)
#### Post date: [June 7, 2019, 12:50pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/33 "2019-06-07T12:50:14Z")

</div>

Hi Ken – Any luck with this issue in off-axis volume rendering? Thanks!

---

<div class="post-metadata">

### Author: ![dhl](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@dhl](https://discourse.paraview.org/u/dhl)
#### Post date: [June 20, 2019, 5:08pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/34 "2019-06-20T17:08:48Z")

</div>

@martink, any update? @utkarsh.ayachit, any further thoughts? Thanks!

@kmilo9999 @Benjamin_Knorlein @amchevannes

---

<div class="post-metadata">

### Author: ![martink](https://discourse.paraview.org/user_avatar/discourse.paraview.org/martink/32/2082_2.png) [@martink](https://discourse.paraview.org/u/martink)
#### Post date: [June 20, 2019, 6:39pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/35 "2019-06-20T18:39:23Z")

</div>

I’m adding support for oriented images in the image mappers right now. After that I’ll be looking to add oriented image support to the volume mappers. If no one has hopped onto this issue by then, I’ll try fixing it up as I add the oriented image support as it is the same basic area of code.

---

<div class="post-metadata">

### Author: ![dhl](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@dhl](https://discourse.paraview.org/u/dhl)
#### Post date: [June 20, 2019, 6:55pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/36 "2019-06-20T18:55:08Z")

</div>

Awesome! Thanks!

---

<div class="post-metadata">

### Author: ![dhl](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@dhl](https://discourse.paraview.org/u/dhl)
#### Post date: [July 11, 2019, 8:55pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/37 "2019-07-11T20:55:13Z")

</div>

Any progress? Have @martink, have you finished your oriented-images support? I haven’t seen any news on this off-axis volume rendering bug since your post 3 weeks ago. Thanks!

---

<div class="post-metadata">

### Author: ![martink](https://discourse.paraview.org/user_avatar/discourse.paraview.org/martink/32/2082_2.png) [@martink](https://discourse.paraview.org/u/martink)
#### Post date: [July 16, 2019, 3:00pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/38 "2019-07-16T15:00:14Z")

</div>

The MR is here but needs to be rebased and retested. [https://gitlab.kitware.com/vtk/vtk/merge\_requests/5664](https://gitlab.kitware.com/vtk/vtk/merge_requests/5664) I had a critical customer issue pop up that pulled me off for a week or so but hope to get that MR finished up soon and then hit the volume mapper in between some other ongoing work. Maybe next week I’ll get a chance to start up on it.

---

<div class="post-metadata">

### Author: ![martink](https://discourse.paraview.org/user_avatar/discourse.paraview.org/martink/32/2082_2.png) [@martink](https://discourse.paraview.org/u/martink)
#### Post date: [July 22, 2019, 3:39pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/39 "2019-07-22T15:39:03Z")

</div>

This MR [https://gitlab.kitware.com/vtk/vtk/merge\_requests/5770](https://gitlab.kitware.com/vtk/vtk/merge_requests/5770) might fix your issue. Please give it a try.

---

<div class="post-metadata">

### Author: ![dhl](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@dhl](https://discourse.paraview.org/u/dhl)
#### Post date: [July 22, 2019, 3:49pm UTC](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249/40 "2019-07-22T15:49:02Z")

</div>

Awesome! We will try it out! Thanks!

[Previous page](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249.md?page=1)

[Next page](https://discourse.paraview.org/t/paraview-5-6-0-distribute-volume-rendering/1249.md?page=3)
