Cartographic Polygons

Within a Cesium 3D Tileset I placed a Cartographic Polygon set to invert to isolate a section of terrain. I then added another Cartographic Polygon within the isolated area to clip out a piece of terrain. When I added the second Cartographic Polygon the effects of the first ceased to function, meaning the terrain was no longer isolated.

I am attempting to isolate multiple sections of terrain to remove existing buildings which will be replaced with my own models. Is this doable, using multiple Cartographic Polygons simultaneously?


With the default Material, you can only using a single CartographicPolygon (but it can have multiple polygons within it, if that’s helpful). If you open the default material instance (called MI_CesiumThreeOverlaysAndClipping), you’ll see that there’s a material layer for clipping. You would need to make a copy of the material instance and then duplicate the clipping layer and give it a unique name. Then your second CesiumPolygonRasterOverlay needs to have a “Material Layer Key” that matches the name you gave the material layer.

In addition to the complexity, this is likely to make for a pretty heavyweight material. So it’s worth considering if you can solve your problem a different way.

I appreciate your responding. The answer is unfortunate. I was so hoping Cesium would fulfill my requirements on this project, but the limitations you described makes that seem to be an impossibility.
Thanks again for the answer. Have a great day!

I’m surprised to hear you say it’s impossible, since I believe I just told you how it can be done. It’s perhaps not as simple as we’d like, but certainly not impossible. Or did you run into a problem with that approach that you haven’t mentioned?

Cesium for Unreal is open source, so you might also consider improving it yourself and contributing your improvements back.

I appreciate your confidence in my abilities, misplaced as it is :slight_smile:. I did experiment with using the material instancing but the shear amount of instances that I need (30+) would make the project unusable. I think you have done a fabulous job making Cesium what it is so far. Thank you for the invitation to try and develop a workaround in the code, unfortunately I do not have the knowledge or the skill to do that sort of thing. Honestly I would not know where to begin.

I did experiment with using the material instancing but the shear amount of instances that I need (30+) would make the project unusable.

I’m not sure why you would need 30 materials. Can you elaborate?

If you’re moving on, that’s fine too, and best of luck with your project.

Perhaps I am misunderstanding the process. I need to be able to remove multiple buildings (cut out) from the area I am working in so that I can replace them with my own models. Are you saying I can do this with a single material instance?
The capture below is just a sample to illustrate (It is not my project). The areas in red represent 3D buildings I need to remove from the Tileset and then insert my 3D models.

I appreciate your patience with my lack of understanding.

Yes, a single CesiumCartographicPolygonRasterOverlay can have multiple polygons. The only time you need two raster overlays (and therefore need the custom material) is when you need one set of polygons to exclude pixels inside them (for example, the buildings), and another to exclude pixels outside them (for example, to exclude all tiles outside of your area of interest).

I feel fairly silly. I had failed to try and add multiple polygons set to normal clipping. I will just do without the additional polygon set to inverted for now. Thanks for your invaluable assistance.