cesium-unreal
cesium-unreal copied to clipboard
Frustrum culling does not account for different aspect ratios (In Sequencer)
From the forum: https://community.cesium.com/t/rendering-from-sequencer-in-portrait-aspect-ratio/15855
When using Sequencer and Movie Render Queue, frustrum culling does not work correctly for tall aspect ratios.

Not sure if this applies to non-sequencer vertical aspect ratios - we should test further.
This is likely the same as or similar to #667.
Just wanted to confirm that this version of the bug (Sequencer) was not fixed by #667 - tested with last weeks Build.
This is not completely fixed yet, because getting the viewport size from the movie render queue system is really difficult. See https://udn.unrealengine.com/s/question/0D54z00007LQvtdCAD/how-to-get-the-viewport-size-when-using-the-movie-render-queue
Based on the conversation with Epic above, the current best plan I can think of is this:
- Create a new plugin, "Cesium for Unreal Movie Render Queue Support" or somesuch. This will have to be separately published to the Epic Marketplace, and separately installed by the user.
- Create a custom MRQ settings class in the new plugin. Use it to detect when a MRQ render starts, and extract the camera details. Ideally we'd be able to "install" these custom settings automatically, but it may not be possible. In which case the user will have to add our settings class manually when they set up a MRQ render.
- Use Unreal's "module features" system to make the new plugin publish a feature to provide the MRQ camera details. We'll also have built-in implementations of the feature to get camera details from the Editor and from the regular game objects. Basically camera detection in all scenarios will happen through a feature interface.
This will probably take at least a few days to implement, maybe longer.
Ideally we'd convince Epic to update the PlayerController's viewport parameters in MRQ mode, so we wouldn't have to jump through these hoops. But a) this might be totally unrealistic for reasons that aren't obvious to me, and b) even if that's done, it won't work in any already-released versions of Unreal Engine.
- Create a new plugin, "Cesium for Unreal Movie Render Queue Support" or somesuch. This will have to be separately published to the Epic Marketplace, and separately installed by the user.
@kring Does it have to be a separate plugin, since that adds some overhead? It may not be completely aligned with Cesium for Unreal's vision and goals, but it could be nice if we didn't have the maintenance overhead.
Yes it has to be a separate plugin @shehzan10, otherwise the Cesium for Unreal plugin would have a hard dependency on the Movie Render Queue plugin.
@kring Makes sense, thanks.
Is there any update on this issue?
It seems the bug is still present for me. Is there any workaround?
No, because as far as I know Unreal still doesn't provide an API to query the information we need from the Movie Render Queue. However, you can work around it by using Blueprints to manually call AddCamera and UpdateCamera on the CesiumCameraManager Actor with the parameters of your camera. See #734. Alternatively, you can avoid using Movie Render Queue.
So in level blueprint. Event BeginPlay => Default Camera Manager => Add Camera (Make CesiumCamera) => Update Camera
Is that all I need? Or any more nodes?
And how do I get this camera into the sequencer? Since it does not yet exist
You'll need to pass accurate camera parameters into Update Camera, of course.
Here is my current setup. I put random numbers here as a test to see if it updates. It does not change the camera settings at all in the renders.
I then try one of the following:
-
In the level sequence I then drag and drop the CesiumCameraManager. Then hit render in the MRQ. However it will render the position of the DynamicPawn object instead. The bottom of the tiles are missing => it didn't use the camera settings from the blueprint.
-
I copy the settings from another camera that I created into the camera settings in the level blueprint. In the level sequence I drag and drop the Camera that I created previously. In MRQ I hit render. It renders the position of the camera but the tiles at the bottom of the image are not showing.
My aspect ratio is 1:1 Culling enabled
Here is the result
I put random numbers here as a test to see if it updates. It does not change the camera settings at all in the renders.
Sure. Creating a virtual camera with some random location and direction isn't going to affect anything. The Camera Manager doesn't actually change the camera that is used to capture video. It is just a way to tell Cesium about the camera you care about so that it can load the right tiles. You have to feed it accurate information about your camera, or else it will not be helpful at all.
In the level sequence I then drag and drop the CesiumCameraManager.
No need to add the camera manager to your sequence. That won't do anything useful.
I copy the settings from another camera that I created into the camera settings in the level blueprint.
It may help to share your Blueprint. This sounds like the right approach, and it looks close. But maybe the orientation is just a bit off.
It's worth stopping to see if you really need to do any of this, though. What problem are you actually trying to solve? Before you started messing with the camera manager, were you seeing frames like the one in your last screenshot, where part of the screen looks correct, but on one or more edges there are tiles missing? If so, using the camera manager may help.
But if the problem is that the images are missing tiles sporadically (i.e. in the middle, not just at the edges), or if they're a lower than expected level of detail, then the problem may simply be that the movie render isn't waiting for tile loads before snapping frames. You should be able to easily solve this just by making sure your Level Sequence is in your level (not just an asset in the content browser). No need to use the Camera Manager at all. See here: https://community.cesium.com/t/ue-5-1-rendering-with-movie-render-queue-tiles-not-loading-in-time/24954/6