Multiple Simultaneous Camera Rendering

Hi Cesium team and community!

Our team is working on an application that utilizes the Unreal engine (5.4) to view satellites around the Earth, using a real-scaled Earth model. We have successfully implemented Cesium into our application and being able to move around the Earth and load in the Cesium tiles according to the player’s viewport has been relatively issue-free.

However, satellites in orbit may have cameras looking down or in the direction of the Earth. If the observer (or player pawn) is on the other side of the Earth, the camera view (which may be saved to disk or shown in a separate window), has tiles that are not streamed or have a low LOD.

It is my understanding that Cesium selects the first player controller to register the ‘Cesium Camera’, but I have not been able to find online an example or document explaining how to have simultaneous camera views looking at the Earth (all in potentially different locations). To confirm, I don’t just want multiple cameras looking at the same tile set; I want each camera to appear to have a fully loaded tileset within its frustum.

If anyone has any suggestions, that would be much appreciated.

Thanks,
Harrison

Hi @harrison, welcome to the community!

Cesium for Unreal discovers the cameras for tile selection with this code:

So, by default, it will use the cameras attached to player controllers and ASceneCapture actors. If you need additional cameras, you can use the Blueprint or C++ API provided by the CesiumCameraManager Actor to do so.

1 Like

Hi Kevin,

Thank you for the reply - this was the exact bit of code I needed to see!

For anyone else stuck, I did the following:

  1. Created my own Camera Manager instance (or use the one spawned)
  2. Connected the camera manager to my Cesium Tileset
  3. Used the AddCamera function on the Camera Manager to add a camera for each of my camera objects
  4. Updated the camera struct (Location, Rotation, FOV, etc) in each frame on a Tick using the UpdateCamera function on the Camera Manager

Thanks again for your help :slight_smile: