Help with 3D Terrain Cutaway/Clipping Planes

https://www.bluemarblegeo.com/knowledgebase/global-mapper-19/Path_Profile/PathProfile_3DCutaway.htm

I am wanting to create a 3d terrain cutaway using Cesium like the ones above. I have been messing around with the clipping planes feature. How can i get the unselected terrain to not render? Any help would be appreciated.

We actually have a code example doing just that! Check out the “Grand Canyon Isolated” in the drop down of this example:

https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Terrain%20Clipping%20Planes.html

Is this what you’re thinking of?

Yes! thats actually exactly what I am needing except for two things. (I apologize in advanced, I am brand new to Cesium and not that advanced in Java/HTML yet either :slight_smile: )

But I was wondering how I can get the skybox/background to be a sky or something other than black?

Also, in the maps that I used as an example (bluemarble), a profile graph is attached to the edge of the terrain, would I be able to accomplish this with Cesium?

Thanks for any help!

You could either put your own custom skyBox (see https://cesiumjs.org/Cesium/Build/Documentation/SkyBox.html?classFilter=skyBox) or disable it and have a solid color like here: https://github.com/AnalyticalGraphicsInc/cesium/issues/7732

For the terrain profile, there isn’t an easy built-in way to do it, but others in the community have done this sort of thing before. There are several functions available to sample terrain/3D Tiles height that can help you with this. This example will sample various points along the line and draw it:

https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Sample%20Height%20from%203D%20Tiles.html

This shows sampling various points to compute the height on terrain:

https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Terrain.html