In the Sandacastle example of the clipping planes (https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=3D%20Tiles%20Clipping%20Planes.html&label=3D%20Tiles) there is the option to enable the edge styling (per checkbox).
Is it also possible to calculate the interior area (intersection) of the clipped model object (a glTF / 3D Tile Object) and turn it into another color compared to the clipping plane entity itself or add another entity onto the clipping plane?
The goal is to make the object not empty but filled.
I actually worked on exactly this problem for my thesis in undergrad. The best way I’ve found was to do this CPU-side. Take every triangle in the model, and compute the intersection of that triangle with the clipping plane. This gives you a line.
The set of all lines of intersection for all the triangles of the model describes the perimeter of the area to fill. You can then triangulate that and fill it in. (It’s described in section 4.2 here). It might be a bit slow in real time for very complex models.
There’s nothing built-in to the clipping plane system in CesiumJS right now to fill it in like that, but I think this would be a useful contribution in a lot of applications.
Hello, I found this resource, which is implemented by Threejs. Do you think it is possible to use the same method to achieve planing and filling effect? Thank you very much. It seems very difficult for me to achieve this goal by calculating intersection, but there will be serious performance problems, what do you think? Thank you very much
Did you solve this problem?