Tiles not loading at edge of render area

I’ve never actually tried myself to use the CesiumCameraManager to deal with Movie Render Queue aspect ratio problems (though Nithin did when he first added the feature), so I thought I’d try it. There were some unexpected gotchas, but it worked well enough in the end. Here’s what I did.

First I added a new Level Sequence and added a Cine Camera Actor to it. I set up a simple flight for the camera with two keypoints. Rendering with the Movie Render Queue now works fine, because the default CineCameraActor has a 16:9 aspect ratio.

So let’s break it by changing that. Here I simply reversed the Sensor Width and Sensor Height properties on the Cine Camera Actor, giving it a 9:16 aspect ratio instead:

image

And I also changed the Output Resolution in the Movie Render Queue settings to 1088x1920? Why 1088 instead of 1080? Well, I initially used 1080, but when I did the render, MRQ printed a message to the log every frame complaining that it should be 1088 instead. Presumably based on the aspect ratio of the CineCameraActor.

With those changed, if we now render with the Movie Render Queue, we have problems:

We can use the CesiumCameraManager to fix this. First, drag the CesiumCameraManager from the Outliner into the Sequence.

Then click + Track and choose Event TrackRepeater. Right click on the new “Events” section and go to Edit Section and then, for the Event property, choose Create New Endpoint. The “Director Blueprint” will open and a new SequenceEvent_0 will be added to the canvas. You can rename this to something more meaningful, like UpdateCesiumCamera. This event will be invoked every frame (at least, every frame that the track/section covers, which should be the entire sequence by default), and we’ll use it to update the Cesium camera parameters.

Modify your Director Blueprint to look like this:

You can create the “Get Sequence Binding” nodes by dragging the CineCameraActor and CesiumCameraManager from the Sequence window into the Director Blueprint. You’ll need to add a new variable named CameraID of type Integer.
image

Give the CameraID variable a default value of -1:

The idea here is that every frame we get the current location and orientation of the CineCameraActor. Then we either Add Camera on the CesiumCameraManager (if a camera doesn’t yet exist) and store the ID in the CameraID variable, or we update the existing camera using the previously-set CameraID.

On the Make CesiumCamera node, the Viewport Size should match the Output Resolution you provided to the Movie Render Queue. You can copy the Field Of View Degrees value from the Current Horizontal FOV property on the CineCameraActor:
image

With those changes, we should now be able to successfully render a movie with the custom aspect ratio:

2 Likes