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.
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.
I am trying to follow your steps and advice in other threads on the topic. I have a blueprint, Cesium Camera Manager, Camera, and Camera Manager added to Google Photorealistic 3D Tiles. But this scheme doesn’t work for me, errors constantly pop up in the log saying that Anreal can’t see (can’t find the camera object). Maybe I don’t quite understand how it should work and I have errors in the blueprint or in what I’m doing. Could you help me?
1. Ideally, the “Custom Event” should be replaced with “Event BeginPlay”. It is also recommended to add a “Delay” node before “Get Default Camera Manager” to ensure that the reference is properly obtained.
2. Right after the “Set Camera ID” node, set a Boolean variable,for example, named “Cameras Added”, to True (it should be initialized as False). It will be used within the “Event Tick”.
3. “Event Tick” executes the “Update Camera” only when Cameras Added is True; otherwise, take no action.
I changed the blueprint that was used to pre-render the scene, and everything seemed to be fine, but now the pre-render has stopped working. I would also like to ask how I can add several pre-render cameras to this script, because, from what I understand, it turns out that there is nowhere to add the camera in the middle of the script, and several “custom event” nodes will not work either?