The yellow part is from the volume source, the black axes actor are AxesActor set with transparent to 0.01, still, it completely blocks the volume part.
Also you can see the white line within the black axes so the transparence works for surface rendering objects, but didn’t work well with volume objects.
Also, normally the white line is blocked by volume object, which is correct. But it is not blocked anymore when another surface object overlaps, as you can see the white line within the black axes.
Haven’t looked at the translucency support in vtk-js but its possible that the mapper doesn’t support translucent polygonal data with volumes. The idea is to mix the two actors in the translucent pass based on the volume fragment’s final opacity value.
I’m not seeing this. Can you replace the AxisActor with a simple sphere or cone and see if you have the same problem? I tried a sphere both in the renderer and in a layer above and in both cases it blended. It will not intermix them, but it should blend them one in front of the other based on how you set it up.
I tried with a cone and its the same issue. Do you have an example showing the correct rendering? you need to have a volume data and a surface data in a scene and set transparency on the surface data. Thanks.
I borrowed from another one’s sandbox setup for ‘volume-rendering-bounds’ and put your code in with slight modification on the imports (using @kit) and the BASE_PATH variable.
As you can see from the sandbox rendering, in your case the volume always show but the ball gets clipped instead, so it is still wrong.
in this picture the ball is actually placed in front of the volume so it should show. instead it was blocked by the volume. If transparency is removed it renders fine.
That is expected. Volumes get drawn on top of transparent objects, not intermixed with them. The odd black rendering was suspect but what you see above is expected.
Sorry, let me clarify, the behavior described above matches what I would expect from the current implementation in vtk.js. The black rendering did not.
VTK C++ does have a very nice DualDepthPeeling class that can be enabled/added and can be set to intermix with volumes.
Could this issue be fixed as soon as possible? It is extremely useful to allow the transparency of surface rendering objects when both volume rendering and surface rendering objects are in the same scene. Thanks!