2 cesium maps instances in the same game

Hi,

In my game, I would like to create 2 maps.

  1. Main map - to play inside an emmersive 3D environment
    1. WMTS with terrain
    2. 3Dtiles
  2. Orientation map - 2D approach
    1. An icon to show my location
    2. Zoom in/out
    3. Can be a different WMTS map (e.g., OSM)

What is the best approach to address this use case?

  1. Create 2 separate prefabs?
  2. Share the Same Cesium Object?
  3. Can I create the orientation map in 2D mode as in CesiumJS?
  4. How Best to disable all user interactions with the orientation map?

Thanks

Hi @asaf.masa,

There’s a level in the Cesium for Unreal Samples that prototypes something similar to your use case. In 07_CesiumMultiView:

Unfortunately we don’t have a Unity equivalent of this sample, but the approach is:

  1. Place one instance of the Cesium3DTileset (not multiple).
  2. In the object where your main camera is located, attach a second camera and have it point at the ground.
  3. Output the camera view as a Render Texture that you draw on the screen.

As for user interaction with that map, that really would depend on the UI you implement. But it’s just another camera view, not like a separate copy of the tileset.

Let us know if that helps!

1 Like

@janine Thanks for the reply.
In my use case, I need 2 different tilesets, for different WMTS layers (for example, OSM for Minimap and orthophoto for the real world)

I added both to the CesiumGeoReference and used 2 cameras, one for each.

When activating both cameras on WMTS and DEM sources, the application RAM usage is climbing till the app crashes. Any input you can give me on this?