Flatten the ground surface or Terrain inside a polygon

Hi,
I really appreciate and enjoy the use of the new “CesiumCartographicPolygon” feature :smiling_face_with_three_hearts:.
Similarly, do we have any tool available to flatten certain areas inside a polygon similar to the feature available in Autodesk Infraworks ?!!
(224) InfraWorks Flatten Terrain - YouTube

Hi @shefypattambi,

Glad to hear you’re making use of the Cartographic Polygon!

The short answer is no, we don’t currently have a tool to flatten areas inside a polygon. If this is something you’d like to see added to the plugin, I encourage you to submit an issue on the github repository for it, along with information about potential use cases for such a tool.

That being said, I was curious, so I took a look to see how you could achieve something similar in Unreal. It turns out it’s possible to visually flatten areas of terrain with a material, though it’s not a perfect solution since it doesn’t account for collision.

Before:


After:

Here’s the material layer blend:

For vertices inside the polygon, it offsets the absolute world Z position by its inverse, which puts the vertex at world zero, so it will be the same as the Georeference Origin height. If you want to offset the height at which terrain is flattened to, you’ll have to add your offset right after the OneMinus node.
You’ll also notice that the mesh normals are not flattened. There may be a way to fix this in the material.

As noted above, this method does not account for collision at all, since it’s all in the material. Actors will still collide with the original shape of the terrain.

Also, it still uses the original shape of the terrain for culling. Depending on how much you flatten, tiles might get culled while they’re still on screen. Prepare for various unexpected rendering behaviors if you try this.

If you decide you want to try out this material method, let me know how it goes! I’m sure there are a bunch of ways to improve on this.

-Alex

1 Like

Seriously, I urgently need this function in cesium.js, such as flat land for urban planning. Similar questions have been raised many times. I hope officials can consider an example! Thank you.

Hi @agallegos ,
Thank you for the detailed reply. Appreciate that. But unfortunately, I don’t know how to proceed with that method; since I am quite a newbie in Unreal. Also, collision is very important in my use case. So; I will export the flattened area from Autodesk Infraworks to unreal along with the ground textures and by using the “CesiumCartographicPolygon” I will remove the area coming under this flattened area. Once again thank you for the Cartographic polygon.It is very useful :smiling_face_with_three_hearts: