Closed kt7456 closed 1 year ago
Do you mean in general? Or in WebGL? If you want to just see a slice you could use ParaView: https://forgeanalytics.io/blog/creating-slices-in-paraview/ .
If you want to do it in WebGL, you can create a plane geometry that you render inside the volume coordinates and then in the fragment shader you can look up the 3D texture value to color it by. That will let you efficiently compute arbitrarily oriented slice planes, since the plane values are computed on the fly by sampling the 3D texture.
in WebGL ,but i dont know how to do
So then you would do as I described above w/ the plane geometry. The points on the plane exist in the volume coordinate space (or are transformed into it from the world space), these are your 3D texture coordinates to sample from the volume texture to get values for the cutting plane
How to slice the model?