Cutting out a Polygon with Global Transparency

Hello,

I am trying to cut out a polygon using global transparency. I have a rectangle cut out at the moment but I want the area cut out to be a more specific polygon shape that I have also coded into the project. The current solution that I have come up with is making a rectangle with the hole of the polygon cut out over the rectangle that has global transparency applied to it. Now I am attempting to try to apply a material to the rectangle with the hole to match the surround map. Could anyone provide me advice on how to add the same Cesium World Terrain as a material to the polygon or how to use global transparency to just cut out a polygon area rather than the rectangle.

Thanks!
Claire

Hi Claire,

Welcome to the CesiumJS community! Is it possible for you to share a Sandcastle example illustrating what you are trying to do?

Thanks,
Eli

the most stupid things is that cesium offer rectangle-cutoff in layer provider setting, but not polygon-cutoff, which is the mose common using scenario in GIS web developing while searching condition is changed or autority limition .

we have to seach all topics in network, but in the end found nothing.

when we finally checkout the cesium code, we find it is impossible to do anything.

we have to write a provider and use canvas to draw.

stupid cesium framework!

what i think about your way said is that you use more layer to implement the effect.

for example:

one layer

turn into

four layers which use rectangle to limit display different part of the whole area

overlay and merge the four layers, then use transparency to dynamic control the whole shape.

but with complex polygon, it is impossible to do using this way.