polygon in 3d mode vs terrain

Hello!
I am trying to draw polygon , when using terrain data from Cesium

but my polygons are under the landscape

add images from Sandcastle (before using terrain and after)

should I get triangulation from terrain and build my polygons relying on it?

Thanks in advance!

cesium doesn’t have, at the moment, the clamp to ground effect implemented like google earth has.

it is on the todo list.

Just out of curiosity, is the clamp to ground going to clamp down into every ‘nook and cranny’ like the blue line in the image, or just enough so that it isn’t buried anywhere like the green line in the image? First option might be more accurate, but the 2nd might be a good option for faster processing when high accuracy just isn’t important.

is the clamp to ground going to clamp down into every ‘nook and cranny’

For polygons, yes. We are working on screen-space techniques that will make this efficient. The work-in-progress is in the ground-primitive branch.

For polylines, we still need to determine the best approach.

Patrick

Cool, thanks for the info and the link.

Hi, I am trying to draw an extruded polygon on terrain which is a ground primitive.

Any help to implement a ground primitive with Polygon Geometry instance along with extruded height for the polygon is appreciated.

Sorry, but that functionality is not supported at this time. A ground primitive cannot also have an extruded height.

Best,

Hannah

Thanks for the reply Hannah.

Is there any way how we can get the height of the terrain elevation and then draw a polygon vertices at that elevation either for a ground primitive or a regular primitive

Hi Hannah,

Re. "A ground primitive cannot also have an extruded height" - do you know whether there's already a Github issue for this? Otherwise I can submit one, but it might already be on the roadmap (or part of 3d tiles - to my understanding the goal is everything in 3d tiles should eventually work with terrain)

Thanks!

Hello,

I’ve submitted an issue here so we can keep track of the number of users requesting this: https://github.com/AnalyticalGraphicsInc/cesium/issues/4743

I know that having 3D geometry conform to terrain will require a completely different rendering technique than we are using for GroundPrimitives to accomplish this. We need to research to come up with a good way to accomplish this that will render efficiently, and it is not likely that we will have a chance to add this any time soon. With 3D tiles, we may be able to accomplish this by preprocessing the geometry offline first.

Best,

Hannah