UE 5.1 rendering with movie render queue, tiles not loading in time

Hello,

I’m currently using cesium in UE5.1 with google earth’s photogrametry 3d tiles but I’m having an issue rendering out a sequence.

My issue is that when I hit render using movie render queue inside sequencer the render comes out with either tiles popping in and out or some not loading at all, I saw in this post (Unable to reliably render sequence to file - #5 by BryceKaufmanTPS) that supposedly unreal should wait for the tiles to fully load but that’s not currently the case.

If I’m just in the editor or in Play in Editor mode and I keep the camera still until everything fully loads it’s looking fine so I don’t believe it’s an issue with lack of memory in the computer or something like that, it just takes a little while to load everything up and when rendering Unreal doesn’t wait for everything to be fully ready before saving the image so every frame just ends up half-loaded.

Is there some obvious setting that I’m missing?

Hopefully someone can help out with this issue, thanks in advance!

We’ve periodically had reports like this, but so far haven’t been able to reproduce the problem. See here:

If you can give us step-by-step instructions for reproducing the problem - preferably by starting with the Cesium for Unreal Samples project - we can investigate.

The most likely cause is that Cesium is using the “wrong” camera to select tiles to render your movie. But it’s not clear when and why that happens.

Hey Kevin, thanks for the quick reply.

I downloaded the Cesium for Unreal Samples project and was able to recreate the issue there, here’s how:

I opened the project, enabled the Movie Render Queue plugin and restarted the editor.
I opened it again and went to the 02_CesiumMelbourne map.
I created a new Level Sequence actor and created a Cine Camera Actor which I animated moving from up in the sky to closer to the city.
Then I rendered through movie render queue with the following settings:



In the first couple of frames you can already notice the issue, the render didn’t wait for the tiles to fully load before capturing the image.

Frame 1:

Frame 4, here it seems to have loaded pretty much everything as far as I can notice from this distance:

The issue is not as noticeable as in the renders from my other project, I’m guessing because there are fewer things in this project so it’s able to load faster but you can see that the engine is not waiting for everything to be fully loaded before saving the frame.

Here are some screenshots from my project where the issue is more obvious.

Frame 40 of my project, you can’t really notice much here but it’s because I added 800 warmup frames before the render starts so everything that’s visible at the start has as much time to load as possible:

Frame 96, the camera moved closer to the ground so the tiles in the back that were out of frame at the start are only now visible and they don’t have enough time to load so they come out with low resolution. If I’m in play-in-editor and keep the camera in this frame for a while everything eventually loads and looks nice:

And here’s some more frames later in the sequence where you can notice that the city in the back is loading as the animation progresses:



I also tried setting up the camera following the steps here Blueprint API for Registering Custom Cameras by nithinp7 · Pull Request #734 · CesiumGS/cesium-unreal · GitHub, using the cesium camera manager. After settting that up when I’m in play in editor I can see that the tiles are being loaded from the correct camera even while looking through a different one but the issue remains the same.

Hope this helps!

I tried to follow your steps, but my videos still look ok. And I can tell by the way the video renders much slower than real-time (and in a stop-and-go fashion) that it’s waiting for tile loads before each frame. I also confirmed with a debug build and some breakpoints that it’s doing what it’s supposed to do.

One problem I did notice is that it doesn’t wait for the initial tileset.json load. So in my first frame, the tileset was missing completely. But once the tileset was available at all, it correctly waited for all tiles before snapping each frame. A warmup should work around that no problem, though.

So, I’m probably doing something a little bit different from you. Would you mind walking me through it in more detail? For example, you say you “created a Cine Camera Actor”, but how did you do it? With the button on the Sequencer panel? That’s what I did. How did you set up the camera flight?

Maybe the easiest thing would be to send me a copy of your Samples project and tell me exactly what buttons to push to reproduce the problem after opening it?

Hey Kevin,

Of course, here’s the sample project so you can have a look: WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free
Let me know if there’s another way you’d prefer for me to send the files, I couldn’t upload them straight to here because of the file size.

I screen recorded the steps to reproduce the problem and the rendered output is also inside the project folder, in Saved>MovieRenders.

I used spatial samples for this render just to make the issue more noticeable in the render without the additional motion blurring from the temporal samples, the problem is there regardless of what samples are used though.

1 Like

Thanks for the video. I see the problem, now. It comes down to a difference in how we created the Level Sequence. I did it like this:

add-level-sequence

But you did it by right-clicking in the Content Browser and adding it there. The critical difference between these two is that my approach added the level sequence to the level, whereas yours just added it as an asset. So then this code in Cesium for Unreal’s Cesium3DTileset.cpp couldn’t find your level sequence:

And so doesn’t know it’s recording a video, and so it doesn’t switch into the “wait for tile loads before snapping the frame” mode.

Easy solution: drag your level sequence from the Content Browser into the viewport, which will add it to the level. Then the recording should behave as intended.

I’m not quite sure what we can do to fix this so that the workaround isn’t needed, but at least the workaround is fairly easy. I wrote an issue to see if we can find a proper fix:

Thanks for your help and patience tracking this down!

Kevin

1 Like

Hey Kevin,
After adding the sequence actor to the level everything started working fine!
Thanks a lot for your help,
José

Hi,

I am having a similar problem.

I have set up the level sequence from the dropdown menu as described above.
Then I added my camera.

Then I tried to render it using the Movie Scene Capture (legacy)). A window opens with the camera view. But no tiles are loaded yet. Then it hangs here for a minute or so before it actually starts capturing frames.

The first 1-5 frames or so are completely black. Why is that? After that I can see that the tiles are loaded for the next frames.

If I use the (new) Movie Render Queue I have a simular situation. It says “Cut State: Warming Up” for a minute or so. Then it starts rendering the frames the first 1-5 frames just show the sky and black bottom. The frames after that seem to have the tiles.
If I lower the max screen space error then even more frames will be black.

Is it possible to avoid this problem? It should wait for all tiles in the view to finish loading before capturing frames.

Did you try the solution above? Adding your Sequence to the Level?

Yep I added it from the Movie clip icon at the top. Then add Level sequence as described in your previous reply.

I also tried the other method to drag the level sequence into the viewport.

It might be related to my tile settings:
Maximum Screen Space Error: 15
Preload Ancestors: OFF
Preload Siblings: OFF
Forbid Holes: OFF
Maximum Simulatneous Tile Loads: 100
Loading Descendant Limit: 1000
Enable Frustum Culling: ON
Enable Fog Culling: ON
Enforce Culled Screen Space Error: ON
Culled Screen Space Error: 16

I just want to capture single frames so longer waiting times for a better quality is fine.

Right now the first frame is just black.
Then the next 10 or so frames show the horizon but a black landscape.
A bunch of frames later it will start showing the tiles.

Once it starts showing tiles, does it show all the tiles? Or are there still some missing or an incorrect LOD? There is a problem, as I mentioned above, where the video capture doesn’t wait for the initial load of the tileset’s metadata. Just adding a few seconds of warmup should solve that, though.

Beyond that, please see if you can reproduce this problem in the Cesium for Unreal Samples project, or if it only happens in your own project. Can you give me detailed instructions (or maybe a video showing the steps) to reproduce it?

When I use Movie Scene Capture (legacy)

  • 1000x1000 px

  • first 3 or so images frames are completely black

  • then it renders the frames just fine with all the tiles

  • sometimes there is a frame that is only partly rendered. Sometimes the top or bottom is black or just a blue color - looks very glitchy

  • sometimes one of the following frames is just black

  • if I increase the resolution to let’s say 4000x4000 px it shows more frames black, some tiles only loaded in very low res, some glitchy half rendered frames, missing tiles



When I use the Movie Render Queue (new)

  • 1000x1000 px

  • first frame shows the horizon but the ground is completely black

  • Then all frames are showing the tiles but the tiles at the bottom/top of the image are missing (it is showing the grid below though) - so this is related to culling not working on different aspect ratio in the new MRQ. In the legacy Movie Scene Capture it does not have the culling problem.

  • The MRQ has no glitches like the legacy one has

  • if I increase the resolution to 4000x4000 px it shows more frames with just the horizon and black flor. After a few frames it renders fine except for the culling issue.
    I don’t have any glitches in MRQ.


So in summary I think the Movie Scene Capture (legacy) is not usable for high res images? Always weird glitching happening.

And the Movie Render Queue (new) has the problem with the first few frames and culling.

The only way I got sort-of-ok results was when I use the MRQ + 5000 warm up frames + culling disabled.
But this results in very long render times and memory usage so some big views I cannot render at all.

And you’re certain that the level sequence you’re using to render has been added to the level? Can you show us with a screenshot?

Yep - fairly certain it was all set up correctly.

However - I downloaded the Cesium example maps again. This time using the newest UE 5.2.1 version.

I used Map12, added LevelSequencer and a Camera.
I manually set the Camera FOV to 90 and Aspect Ratio to 1 in the Camera properties.

Then I rendered the sequence with the MRQ => culling problem appeared again.

Then I added the CameraManager blueprint setup which for now “seems” to work sometimes.
Some views / camera rotations I have no culling issues but in some cases I do have culling issues.

CameraActor => Get Actor Location => Make Cesium Camera (location)
CameraActor => Get Actor Rotation => Make Cesium Camera (rotation)
FieldOfView => 90
AspectRatio => 1,0

[For some reason I cannot do set field of view or set aspect ratio in the blueprint. If I do it doesn’t update the CesiumCamera settings]

For the Tile level of detail set to 16, loading descendant limit to 20 and render resolution at 1000x1000 px it seems to render fine.

HOWEVER - if I set the tile resolution to for example 4, loading descendant limit to 1000 and the render resolution to 4000x4000 px - I get only horizon frames with black bottom.

I guess I can set the warmup frames to 5000-10000 or more but that seems to be very time consuming?

Here is the project file

Also I checked with the blueprint to get a notification when the tiles are loaded.

I noticed that it sends the notification multiple times. Even when the tiles are just showing up as grids or only the surface.
I assume the MRQ thinks that the first loaded notification means it should start the render already.

When I click on simulate in the editor and look at the console I can see that it shows something like this:

LogCesium: Display: Cesium3DTileset_0: 3366 ms, Visited 307, Culled Visited 0, Rendered 1, Culled 80, Occluded 0, Waiting For Occlusion Results 0, Max Depth Visited: 17, Loading-Worker 3, Loading-Main 0, Loaded tiles 28%

Once it hits 100% it is done loading. Is there a way to use this “Loaded Tiles 100%” as an Event to trigger the render to start?

Im having a similar issue where the cesium tiles in the background of my shot arent being rendered to a high enough LOD for my movie sequence. im rendering at 8k and the low poly look is very noticeable. I have my level sequence in my unreal engine scene, and render warm up set to 800 frames, any ideas on what I can try to fix this?

It’s not obvious from your screenshot what the problem is. But in general, if you want more detail, reduce the Maximum Screen Space Error property. That’s assuming that the movie is capturing the “final” level-of-detail, and the problem is just that that level-of-detail isn’t good enough.

If you think the final LOD isn’t being captured, then decreasing the Max SSE won’t help, and we’ll have to dig into why that’s happening. The most common cause is that the Level Sequence is not in the level (it’s just an asset).

Hey @Kevin_Ring thanks for the message. Ive got Maximum screen space error set to 2, and the level sequence is in the scene too. Im wondering if theirs a way I can increase or make cesium take as much time as it needs to load before it renders a frame?

That should happen automatically, just by using a Level Sequence that is embedded in the level. If you don’t think it’s happening your case, please give us more information. Your screenshot above looks “fully loaded” to me.

Hey @Kevin_Ring it does look fully loaded in that shot. but what happens is along the camera animation sequence in the render, the lods in the distance still “pop” in as the camera moves to them. is this to do with our cesium ion license not being applied to our account?