# Volume disappears when mixing with polydata \[VTK 8.2 - bug\]

**URL:** <https://discourse.vtk.org/t/volume-disappears-when-mixing-with-polydata-vtk-8-2-bug/5873>\
**Category:** Development\
**Created:** [May 27, 2021, 10:58am UTC](https://discourse.vtk.org/t/volume-disappears-when-mixing-with-polydata-vtk-8-2-bug/5873 "2021-05-27T10:58:18Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![stavbodik](https://discourse.vtk.org/user_avatar/discourse.vtk.org/stavbodik/32/7081_2.png) [@stavbodik](https://discourse.vtk.org/u/stavbodik)\
**Post date:** [May 17, 2023, 12:42pm UTC](https://discourse.vtk.org/t/volume-disappears-when-mixing-with-polydata-vtk-8-2-bug/5873/4 "2023-05-17T12:42:28Z")

</div>

So here is some work around that working :

> [@Surface and volume rendering in the same render](https://discourse.vtk.org/t/surface-and-volume-rendering-in-the-same-render/2717):
>
> I create a vtkpolydata and a vtkImagedata ,add a vtkActor and vtkVolume to the same render,the vtkpolydata is a closed surface, and intersect with the volume . when I set the vtkActor opacity to 1, actor-\>GetProperty()-\>SetOpacity(1); it looks all right,but when i set the opacity to 0.5, actor-\>GetProperty()-\>SetOpacity(0.5); it looks strange , like the volume covers the suface , I don’t know what caused this problem, Can you give me some advice? thanks

Actually I see that

vtkUnstructuredGridVolumeRayCastMapper.cxx

and

vtkFixedPointVolumeRayCastMapper.cxx

Both doing Capture the zbuffer but slightly different code , will go compare to see if its the same.

---

_[View the full topic](https://discourse.vtk.org/t/volume-disappears-when-mixing-with-polydata-vtk-8-2-bug/5873)._
