Cesium Cartographic Polygon

Hi @shefypattambi,

Thanks for asking! The Cesium Cartographic Polygon actor, released in Cesium for Unreal 1.6.0, can be used to mask out or apply material effects to areas of terrain. We’re currently working on creating tutorials for this feature. In the meantime, the basic process is:

  1. Add a Cesium Cartographic Polygon actor to the level. You can find the actor by searching in the Place Actors panel.
  2. The actor looks like a square spline with four corners. Drag out these corners to your desired shape. You can add new points to the spline by holding the alt key down while dragging a point.
  3. Once you have the shape you want, click on Cesium World Terrain in your World Outliner and add a CesiumPolygonRasterOverlay component.
  4. Select the new component. In the details panel, you’ll see an array called Polygons. Add an element to that array and set the CesiumCartographicPolygon you previously added. The tileset should automatically update with that area masked out. If it doesn’t, select the tileset again and refresh it.

By default, the Polygon Raster Overlay is set to mask out terrain. You can also use it to apply material effects. That process is a little more complicated. I recommend you start by duplicating the “MI_CesiumThreeOverlaysAndClipping” material instance included in CesiumForUnreal Content/Materials/Instances.

If you open that, you can see the material is made of several Material Layers. To customize, you can create new Material Layers and Material Layer Blends and set them here.

Just make sure to set the Material Layer Key of the CesiumPolygonRasterOverlay to the name of your new material layer, and you’ll probably want to uncheck the “Exclude Tiles Inside” parameter, or else tiles might appear missing.

After you’ve made your material, you should set the “Material” parameter under Cesium | Rendering on the terrain tileset to your new material.

I hope this helps! Let me know if you have any further questions. This will be covered more comprehensively in an upcoming clipping tutorial, and after that a material editing tutorial.

6 Likes