Question

Cesium 3D Tiles Clamp to Terrain

  • 28 September 2022
  • 3 replies
  • 52 views

Hi everybody,

I was wondering if anyone can help me with clamping 3D Building Tiles to the Cesium World Terrain.

We are developing a 3D web application with Cesium JS and we need to have our 3D buildings sit flush with the Cesium World Terrain. Our input into the application are 3DTiles. I know you can clamp citygml files to the terrain with the in-built clamp to ground tool in Cesium ion but is there any way to get 3DTiles clamped to the ground in cesium JS or with the help of FME?

We use FME to create our 3D Tiles but we have not found a way to get the buildings to line up with the terrain.

 

Is anyone here aware of anything I can do in FME to get my 3D Tiles output lined up with the Cesium Terrain?

 

I would really appreciate some help on this!

 

Thank you,

Jan


3 replies

Hello, here is roughly how I do this:

1. BoundsExtractor to extract the 3d bounding box of each building

2. 2DForcer to get the building footprint

3. Clipper to extract the elevations under the building

4. RasterBandMinMaxExtractor to get the minimum elevation

5. 3DForcer with _band{0}.min as elevation

Thank you very much for your response and your workflow for this.

We will try this out and I might come back to you if I have any more questions.

 

 

I appreciate the help

Userlevel 1
Badge +11

Hi @j.jeuschede​ and @0x974​ ,

I'm pleased to share that a recent enhancement to FME 2023.1 has added support for a clamp function in the arithmetic editor. You can access the function either through transformers that make use of the arithmetic editor, or when using an ExpressionEvaluator. There's more information on the actual function here: Math Functions documentation.

 

And you can give this a go in our FME 2023.1 betas download here: https://engage.safe.com/support/downloads/#beta Let me know if you have any thoughts or feedback on it. Happy FME'ing!

Reply