Classify terrain by type

Hey all,

We are working in the Unreal plugin and are looking to create terrain masks that classify the underlying terrain by type, i.e. road, dirt, forest, water. We want these classifications to be accessible at runtime. We found a Cesium demo based in Yemen where this is done: CDB Yemen. You can see it in action by choosing the top left drop down (see image).

How is this done? The promotional materials seem to state it’s possible to add metadata to any terrain vertex.


Thanks in advance! Keep up the fantastic work.

I should mention we don’t care about having this classification be done automatically for the moment. We simply want to know how to manually inject metadata into terrain.

One more note :smiley: : our use case is to do pathfinding on the mesh. In the simplest form, you can think of this as preventing a boat from moving onto land.

Are you using Cesium World Terrain, or are you trying to create your own surface tileset?

If you’re creating your own tileset, then you can do what that CDB Yemen demo does and embed feature data in tilesets by using the EXT_Feature_Metadata. Just to be clear, this means you’re responsible for the terrain shape too, not just the classification.

But if you want to use Cesium World Terrain or another existing terrain tileset and then augment it with terrain classification data, the best way to do that in Cesium for Unreal currently is by using the raster overlay system. You would expose your classification data as a tiled, multi-resolution image served via a Web Map Service (WMS) or Tile Map Service (TMS). Or upload a GeoTIFF you Cesium ion and it will tile it for you and serve it in the right format automatically.

The classification data can be accessed from Unreal Materials to do shading based on the material. I’m not sure how to feed this into the pathfinding system, though. In general, Unreal’s pathfinding system doesn’t cope well with these large-scale, real-world datasets. If your area is small enough that that’s not a problem, you may be better off using the UE navigation system directly rather than trying to feed in navigation data via a Cesium3DTileset.