Some questions about TMS overlay

Hello, I have some questions:

  1. I just want to load a map without terrain, but in Cesium for Unity, the map must be attached to a 3dtile object. In this context, if I only use the terrain of a small place, but use a global map, will there be any problems? How to get offline terrain data?
  2. Based on the last step, multiple TMS are added to the same 3dtile object,but only one(the last added) is displayed. I want to know how to achieve multiple TMS overlays(My objective is to utilize a low-resolution map for large-scale purposes, while employing a high-resolution map for local areas.)?
    Thank you!


  1. It shouldn’t be a problem if your terrain is smaller than your imagery. The raster overlay will be projected onto whatever terrain you load. I’m not sure what you mean “How to get offline terrain data?”, could you explain in more detail?

  2. The default materials support multiple raster overlays, but they simply stack the overlays on top of each other. You can make a copy of the default material, and modify how the raster overlays are added to each other. I’ll give a high-level explanation of how to do that below.

Go to the Cesium for Unity package in your Project directory. Find the CesiumDefaultTilesetMaterial and CesiumDefaultTilesetShader. Make copies of these assets in your own project. You’ll want to make sure that the new material copy points to the new shader copy.

Then, modify the copy of CesiumDefaultTilesetShader. For your use case, you’ll probably want to change how the results of the CesiumRasterOverlay nodes are added to each other.

Let us know how it goes!