How to retrieve the geometry of shadows, which are cast on building facades?

1. A concise explanation of the problem you’re experiencing.

I tried to retrieve a shadow polygon (the geometry), which is cast on a building facade by other buildings in a city model. My understanding is that the shadow is not stored as a geometrical object. I wonder if it is possible to compute it using functions from the CesiumJS engine, or there is a clever trick?

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

As far as I know (and anybody please correct me if I am wrong!) there is not really a decent way to find the geometry of a cast shadow in its final projected form. You could theoretically calculate the shadow volume using functions in CesiumJS and the underlying WebGL abstraction layer. However this will not give you the geometry of the final projected shadow (for instance you can’t get the “verts” of the spider shadow on the ground in the wiki article, since the shadow itself has no verts).

If your desire is to query and see if an object or building resides in the shadow of another object or building you could do that with a technique similar to shadow volumes or shadow mapping and using look-ups in the stencil or depth buffers respectively. I believe the Cesium Analytics SDK also provides a way to do this but it would be best to check with the sales team before purchasing.