Hi there,
The Cartographic Polygon is used to clip a certain area on the world terrain. This has to be set up inside the editor. Is there a way to clip a certain area in Runtime?
Hi there,
The Cartographic Polygon is used to clip a certain area on the world terrain. This has to be set up inside the editor. Is there a way to clip a certain area in Runtime?
Hi @Quinten, welcome to the community!
I’m not sure there’s an easy way to use a Cartographic Polygon at runtime, but it should be possible with C++.
Are you looking to draw out the area to clip dynamically during runtime, or just hide/show a hole you defined beforehand? Hiding and showing predefined areas will likely be easier to implement, you’ll just need to switch the material and refresh the tileset. If you’re looking to set the vertices of the Cartographic Polygon during play, you’ll likely want to modify CesiumCartographicPolygon.
If you’re able, can you share your use case for this? If it’s something that the plugin should support by default, we can look at adding it to the roadmap.
-Alex
Hi @agallegos,
Thanks for your reply.
I have found a good enough solution for cutting the Cesium Terrain at runtime. I am only working with blueprints.
The material layer is customized so that the clipping blend together with a texture will cut out the material. A 2D scene capture and render target profide the texture.
Use case examples: simulate trenches, flat surfaces for buildings, clipping OSM building.
Thats really good. Do you have a more complete example of how you did this please?
Hi there,
I have a somewhat similar/related question:
Can we use other than linear spline type, while creating the include/exclude polygon?
Whenever I try to switch the “type” from Linear to eg. curve, it ignores my selection and uses linear only.
It’s clearly not the end of the world, but it would be way better and more natural-looking with some curves.
Any suggestions?
Hi @Andras_Sule,
The Cartographic Polygon is currently locked to linear-only. Supporting curves would add a lot of complexity to the code, so we decided to stick to linear for now. You have a great point that curves would look more natural and be quicker to create, though.
I made an issue to track this so we can possibly add it to a future release. I can’t promise it will be added soon, but you can track discussion there.
-Alex