I am using Cesium to view data that is is presented as voxels. Now I know there is no “true” voxel support in Cesium and that I must work with a triangle-mesh presentation of my volumes.
My ultimate goal:
I need to visualize a cross-section of my “voxel” based volumes. The cross-section would be similar in behavior to the clipping plane demos in the Cesium code samples.
What I’ve tried:
- I’ve tried using clipping planes, but they only show the clipping of the triangle-mesh polygons (which is expected considering that everything in the scene is represented as polygon-based geometries)
- Can I achieve the desired result with Cesium.js, which is to show a cross section much like one would cut a slice of a “layer cake”?
- If not, can I compute the cross-section of my voxels into an image, which could then be projected onto the clipping plane’s surface? (i.e., can we project images onto a clipping plane’s surface?)
- Since clipping planes can highlight clipping edges; is there a way to get information on these clipped edges? This could help me project the cross section onto an image
Thank you for reaching out with your questions and information about your project.
It is still unclear to me how you are viewing Voxels in CesiumJS, given that CesiumJS currently does not support voxels. Can you provide some information about the specific data format that you are viewing in your application? In the examples we showcase on Sandcastle, clipping planes are used to clip both 3D Tiles and Terrain data. At a high level, I do think that there is a way to achieve your desired functionality in CesiumJS.
The data is formatted as instanced (i3dm/gLTF) 3D cubes. Not true voxels. Probably something very similar to Cesium’s clipping plane code sample when selecting the “instanced” asset option.
Right now, the clipping plane shows highlighted edges for the objects that it clips,
I’d like to be able to “fake” - or give the impression of - plane-voxel intersection.
I know this is not supported.
Do you know of a way (at a low level) to get access to the clipped edges’ vertices (where the clipping plane cuts the cubes)?
Here is my whiteboard scribble explaining what I’m trying to see:
Current clipping shows the inside of the box because it clips the polygon edges. I’m trying to obtain the clipping surface (the hashed triangle polygon on the right).