This tutorial walks you through a Blueprints technique for quickly working with Cesium’s Cartographic Polygon Actor to clip out sections of their streaming tiles. But what do you do with the empty hole? Procedurally fill it with Geometry Script!
https://dev.epicgames.com/community/learning/tutorials/1GYl/unreal-engine-using-geometry-script-and-blueprints-to-quickly-replace-cesium-tiles
Fantastic. Incredible!
Incredible tutorial !
So what is the type that variable called “Current Dynamic Mesh” in final touch
I “Promoted to Variable” the TargetMesh output from the previous Geometry Script functions. You can see where I Set it in the BP event.
It’s really great tutorial and exactly what I’ve been looking for but I’m stuck and I think one of the steps needs more explaination.
" Back in the “Spawn Cartographic Polygon” event, we need to find this overlay component and insert our polygon into it. We do this by using Get Components By Class to search for every Cesium Polygon Raster Overlay in our tileset, then getting the first one in the list, and then adding our spawned Cartographic Polygon into that overlay’s “Polygons” array. It looks like this:"
I have no idea what the node with the input “Target” and Output “Polygons” is or how to set it up. Any help would be greatly appreciated.
If you start from left to right in that section, the right nodes should appear when you drag out different pins. In the GetComponentsByClass node I chose CesiumPolygonRasterOverlay as the class. So then when I drag off the Return Value and use Get[0], that node now references the Raster Overlay Class. And dragging out from that pin means that with Context Sensitive we can directly reference the “Polygons” variable of the Overlay. That variable is built into that class.
Fantastic tutorial. I stumbled on this while looking up how to use geometry script to draw polygons for pretty much this exact use case. Woot! This will save me a ton of time!
I may not be using the BP properly - but I seem to have a problem when using this with the Bing Imagery tile set - but only when running as a “standalone game”. It seems that there’s a z-height issue?
But when run in PIE things seem fine:
Any ideas?
News Flash: Big green hill magically appears in Ann Arbor, MI …
I think I’m doing something wrong!
But, hey, I’m actually quite happy that my first attempt at adapting your code to my use case got this close…
There should be a checkbox in the details panel named something like “Flat Plot Mesh Only” which will safely assume that the terrain is flat, and your resulting mesh should exactly match up with the cartographic spline.
What I believe it happening is that on BeginPlay (construction event), the Blueprint is doing the line trace to find the height of the terrain at each point. But the terrain has not fully loaded yet, so whatever Cesium’s LOD is like in that first split second of the game is where the verts end up. You might be able to use a delay to wait for everything to load, but it’s still not safe. In the tutorial I recommend saving it to a Static Mesh Asset using the Modeling tools so it is always the same shape.
Seems either I’m doing something wrong, or there is some bug of sorts.
Cant for the life of me figure out why my mesh doesnt line up with my polygon. Any bright ideas anyone?
Cheers!
I don’t have it open right now but will try to take a look later. I had a similar issue during development but I thought I fixed it. It’s something to do with actor scale vs component scale. Try to make sure the plot tool and the cartographic actor are at a scale of 1. And make sure their components are also a scale of 1. Then the point-by-point recreation of the cartographic polygon into geo should be in the same relative scale.
hello, I noticed that you have developed a BP for Custom Cesium Cartographic Polygon from Spline, could you please share it? thank you.
The whole tool is downloadable at the bottom. There is a link called “Blueprint File”.