Rendering error with clip planes on ray cast volumes and depth peeling

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Rendering error with clip planes on ray cast volumes and depth peeling

gohlinchia
This post was updated on .
Hi,

I'm using VTK 8.1.0. I'm trying the new volume depth peeling with clip
planes when I noticed a problem.

When the clip planes are active (set via vtkBoxWidget) on a volume in a
scene with polygonal meshes, the rendered volume is displayed incorrectly
when the depth peeling is ACTIVE. When I interactively move the camera, the
clipped volume is rendered wrongly. However, when I disable depth peeling
the clipped volume is displayed correctly but the meshes are displayed
wrongly. The volume is rendered using the GPU ray casting mapper and the
meshes are rendered using the normal polydata mapper.

The clipped volume rendering is wrong if the scene has any polygonal meshes and when depth peeling is activated. If the scene does not have any polygonal data, then the clipped volume rendering is correct, regardless of whether depth peeling is activated or not.

The first image shows correct clipping without depth peeling:
<http://vtk.1045678.n5.nabble.com/file/t342340/Clip_planes_without_depth_peeling.png

The next image shows the incorrect clipping with depth peeling:
<http://vtk.1045678.n5.nabble.com/file/t342340/Clip_planes_with_depth_peeling.png

Anyone else encountered this problem? Is this a known bug?
-----
Chris
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
Chris
Reply | Threaded
Open this post in threaded view
|

Re: Rendering error with clip planes on ray cast volumes and depth peeling

Aashish Chaudhary-2
I think this seems to be a new bug. We will file a bug and look into it. Can you post a sample code? 

- aashish

On Wed, Feb 21, 2018 at 10:04 PM gohlinchia <[hidden email]> wrote:
Hi,

I'm using VTK 8.1.0. I'm trying the new volume depth peeling with clip
planes when I noticed a problem.

When the clip planes are active (set via vtkBoxWidget) on a volume in a
scene with polygonal meshes, the rendered volume is displayed incorrectly
when the depth peeling is ACTIVE. When I interactively move the camera, the
clipped volume is rendered wrongly. However, when I disable depth peeling
the clipped volume is displayed correctly but the meshes are displayed
wrongly. The volume is rendered using the GPU ray casting mapper and the
meshes are rendered using the normal polydata mapper.

The first image shows correct clipping without depth peeling:
<http://vtk.1045678.n5.nabble.com/file/t342340/Clip_planes_without_depth_peeling.png>

The next image shows the incorrect clipping with depth peeling:
<http://vtk.1045678.n5.nabble.com/file/t342340/Clip_planes_with_depth_peeling.png>

Anyone else encountered this problem? Is this a known bug?



-----
Chris
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Rendering error with clip planes on ray cast volumes and depth peeling

gohlinchia
Hi Aashish,

I based my codes on the existing example, GPURenderDemo.cxx. I added the
following to activate depth peeling:

renWin->SetAlphaBitPlanes(1);
renWin->SetMultiSamples(0);

renderer->SetMaximumNumberOfPeels(20);
renderer->SetOcclusionRatio(0.0);
renderer->SetUseDepthPeeling(1);
renderer->SetUseDepthPeelingForVolumes(true);

Thanks for raising the bug issue.



-----
Chris
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Chris
Reply | Threaded
Open this post in threaded view
|

Re: Rendering error with clip planes on ray cast volumes and depth peeling

Allie Vacanti
In reply to this post by gohlinchia
Hi Chris,

Thanks for the bug report. This merge request should fix the issue you reported:

https://gitlab.kitware.com/vtk/vtk/merge_requests/4071

We'll get it merge into master soon.

Best,
Allie

On Wed, Feb 21, 2018 at 10:04 PM, gohlinchia <[hidden email]> wrote:
Hi,

I'm using VTK 8.1.0. I'm trying the new volume depth peeling with clip
planes when I noticed a problem.

When the clip planes are active (set via vtkBoxWidget) on a volume in a
scene with polygonal meshes, the rendered volume is displayed incorrectly
when the depth peeling is ACTIVE. When I interactively move the camera, the
clipped volume is rendered wrongly. However, when I disable depth peeling
the clipped volume is displayed correctly but the meshes are displayed
wrongly. The volume is rendered using the GPU ray casting mapper and the
meshes are rendered using the normal polydata mapper.

The first image shows correct clipping without depth peeling:
<http://vtk.1045678.n5.nabble.com/file/t342340/Clip_planes_without_depth_peeling.png>

The next image shows the incorrect clipping with depth peeling:
<http://vtk.1045678.n5.nabble.com/file/t342340/Clip_planes_with_depth_peeling.png>

Anyone else encountered this problem? Is this a known bug?



-----
Chris
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers