We are using VTK for 3D rendering in our image analysis software and lately we are trying to migrate to VTK 8.2 as the version we are using (VTK 6.3) isn’t anymore compatible on newer OSX system (because of the used JOGL library version).
As every time we migrate to a new VTK version we need to address some problems to get everything working properly… I think the difficulties comes from the fact that we have a Java application (so we are using the java wrapper) and we also need to use the OpenGL window component for display (again because of issues with OSX when trying to use native window component) with OpenGL2 backend.
Anyway, that said i was able to sort almost of all the issues i had and only one remains but having spent several days on it, i was not able to sort it yet:
When using the vtkFixedPointVolumeRayCastMapper for 3D volume rendering (we cannot just stick to the GPU accelerated one, again because of OSX systems which doesn’t always handle them correctly) it looks like there is a rendering bug when we try to mix volume with polydata. As soon we have polydata visible then the volume disappears. The bug only occurs with the vtkFixedPointVolumeRayCastMapper mapper (GPU is ok) and only when polydata is visible.
An animation probably explains better than words (on the animation we can see some residues of the volume sometime but almost of time it just completely disappears):
If i disable the IntermixIntersectingGeometry flag by using IntermixIntersectingGeometryOff() the bug disappears but obviously the rendering is wrong then (bad mixing between the polydata object and the volume).
Investigating some time in the code, it looks like the bug come from the way the ZBuffer is captured (CaptureZBuffer() method) but i couldn’t find a workaround to avoid the problem unfortunately.
Is it a known issue ? Is there a solution to overcome it ? I tried to use different version of Paraview (i’m not sure which version use VTK 8.2 internally) but i wasn’t not able to reproduce the problem in it, still i think it doesn’t use the OGL component so that may explains the difference.
I tried to use VTK 8.0.1 and VTK 8.1.2, and it’s working correctly on VTK 8.0.1 but 8.1.2 is affected by the same issue… i will continue to investigate to see where the bug appeared. I cannot use recent VTK 9.0 as i saw that M1 target is not yet supported for these versions and we want to support them.
If you’re compiling for Windows, VTK is targeting Windows. VTK has no idea what VM (if any) is in use or what platform is running the VM. Forwarding hardware into VMs is always a hairy question for “what is supported” as there can be different interactions at the VM boundary.