DepthPeeling support

Hey,

Does vtk.js support DepthPeeling ? I didn’t succed to find anything that say so!
I’m planning to use it on a head volume to isolate the brain.
If it is not supported, is there an alternative way to do so with Javascript?

Thank you!

The latest version of vtk.js supports order-independent transparency for geometry. It’s not depth peeling, but rather a different approach.

Thank you for your answer, what about volumes (.vti) rather than geometry?
Is there any docs or examples for that?

AFAIK the WebGPU implementation has it for volumes, but unsure about the WebGL component. It’s been a while since I paid much attention to that. @ken-martin

I think you are talking about Volumetric Depth peeling maybe? We often talk about the polygonal surface depth peeling algorithm which is used proper rendering of translucent surfaces. For volumes this happens by default. So it is there.

But some people use depth peeling to mean “looking under some other surface” by ignoring voxels before you hit a specific range of values. Sort of like a clipping plane but based on voxel values. Without knowing what you mean by depth peeling I’m not sure how to direct you.

I’m sorry for taking too long to answer

I want to apply the peeling on a VTK head surface, ignore some voxels to have finally a VTK brain surface, I will calculate the voxels to ignore using the VTI volume.

I guess you should be able to do that by playing with the opacity transfer function, no ?

I’m sorry if I didn’t understand very well, if we play with the opacity we suppose that there are already 2 actors on inside the other? isn’t, it isn’t my case, I have a VTK head (just a head there is no VTK brain inside),
I need to peel some parts of the VTK head (I will calculate the parts to remove by using the VTI volume where we can see the head and the brain inside and a value of depth to peel (the user gives it using a silder) ) so when we silde the silder to a point where we arrive to the brain (in the VTI), the VTK head takes the form of the VTI

Have you seen what you describe in some other tool ? would you mind sharing a screenshot ?
By VTK head, do you mean a vtkPolyData (VTP) or vtkImageData (VTI) ?

1 Like

I added images in a new thread,