How to use multiple terrain?


I have a small piece of high-precision terrain + imagery and a global low-precision terrain + imagery. How can I mix them together?
This is the high resolution one.

And this is the global one with out the small piece of high-precision terrain.

If I just put two 3DTileset in the world, it looks weird like this.

Hi @ColeMan,

I’d recommend using Cesium Cartographic Polygon to clip out the global imagery in the area where the high resolution tileset is. For instructions on that, check out this post - Cesium Cartographic Polygon - #2 by agallegos

I’m working on an official tutorial for this feature that should be out in the next few weeks.

1 Like

Hi Alex,
If I want to clip out the high resolution outside and just reserve where inside the circle.

Cause it will cause the situation with the world terrain like what I showed earlier.

Is there any possible that I can use Cesium Cartographic Polygon to clip out the area outside?

I tried to change the bounds from [-180,-90,180,90] to the area only, it did some work, but also makes the terrain looks weird.

Just like it has lost some light

Hi @ColeMan,

I think your problem can be solved by inverting the material effect. This is making me realize that we should probably expose a parameter on the tileset to allow users to invert polygons without having to modify the material, so I created an issue for it here - Add a parameter for inverting Cartographic Polygon · Issue #721 · CesiumGS/cesium-unreal · GitHub

I’m not sure what the timeline would be on adding that, so in the meantime here’s how you can do it in the material:

  1. In the Content Browser of UE, find the material MI_CesiumThreeOverlaysAndClipping in the Cesium plugin folder/Materials/Instances. Right click on it and duplicate it.
  2. Open your duplicated material and find the blend asset MLB_CesiumClipping. Click on the magnifying glass to navigate to it in your Content Browser. (You can also find it in CesiumForUnreal Content/Materials/Blends.)

    Duplicate MLB_CesiumClipping and name your new duplicate something easy to find. This is what you’ll need to modify. If you modified the original it would mean that all tilesets that use clipping would now be inverted, which you may not want.
  3. Open your new MLB. It should look like this.

    The nodes at the bottom are the nodes that access the clipping mask. The “1-x” node inverts the mask. Under the hood, it already behaves as you need, but the material inverts it for standard use. All you need to do is bypass the 1-x node. Connect the R pin of BreakOutFloat3Components to the B pin of the Multiply node.
  4. Save your MLB. Go back to your duplicated Material Instance and replace MLB_CesiumClipping with your new MLB.
  5. Apply the new material to your tileset by changing the Material parameter in the Details Panel. It should clip everything outside.

Your high precision terrain should use this inverted material. Your global low-res terrain should use the original, non-inverted material, but they can both share a Cartographic Polygon and the Polygon Raster Overlay settings can remain the same. If that works as intended, there should be a hole cut out of the low res terrain in the exact area that the high precision terrain is, and the high precision terrain should only render in that area.

Let me know if this works.


Hi Alex,
Thanks for your help, it worked!
There was a little problem because of that I forgot to cancel the toggle “Exclude Tiles Inside”.
But now it works really well!

Thanks for your help again!

1 Like