Float the draped polygon in to the air


Hello, I need help with the draped shape area on terrain,
as you can see in the picture, polygon(or something else) is clamp to terrain and also is floating above the ground maintaining all different heights from ground.

draped right on the terrain(yellow one in picture), I can make it, yet I’m struggling to float that one(blue one in picture) with adjusting height, I’ve used heightReference, but it doesn’t maintain various terrain altitude when it’s floating above the ground
How can we achieve this? It will be tremendous help If you enlighten me with sandcastle example!

I don’t think this is currently supported - can you describe your use case a bit more? What’s your goal to visualize here?

Thank you for reply omar,


As shown in above pictures, We want to visualize both surface area and horizontal area so user would simply distinguish what measurement he is looking at
ex) when first picture is showing, show 140m2, second picture is showing then measurement shows 153m2 since it is draped

perhaps we can achieve with using gltf?

Thanks for the explanation. The only way I can think of to do this right now is if you sample the terrain altitude at all those points along the geometry, and put those in as part of your geometry when constructing the floating polygon.

In general when you drape a polygon on the ground in CesiumJS, it adheres to the surface in the shader, without changing the source geometry itself. This is why it’s fast, but it’s not altering the source geometry. You can read more about this here: https://cesium.com/blog/2018/06/26/implementing-materials-on-ground-primitives/

Hi @omar

I know it’s been a while since this post was created but I’m having the same challenge/request as the previous author so I want to re-awaken the thread.

Following up on your suggestion - “sampling the terrain altitude of all the points along the geometry” - Can you please suggest how I can do this?

Perhaps, Cesium now has a better approach to get/interact with the surface geometry of a draped polygon, I’d be really happy to hear about that. Thanks.

Regards,
Tunmise.

@Tunmise

Unfortunately, I am not aware of any Cesium updates that make this functionality more easily achievable. The strategy outlined by @omar is likely your best bet. Perhaps @Minsu_Roh can share some insights that they have learned from implementing this first hand? I think that this would be your best resource for getting started, @Tunmise.

Best,
Sam

1 Like