CesiumGS / cesium-unreal

Bringing the 3D geospatial ecosystem to Unreal Engine
https://cesium.com/platform/cesium-for-unreal/
Apache License 2.0
948 stars 296 forks source link

A LevelSequence tanks the frame rate even when it's not being used to render a video #1193

Open kring opened 1 year ago

kring commented 1 year ago

Cesium for Unreal detects when a sequence is active and it switches into an alternate mode where each render frame waits for all data to load before proceeding. This will definitely cause the frame rate to be lower, but the intention is that sequences are usually used to record videos, and it's more important to get a high quality recording than it is to record the video quickly.

But a Level Sequence can also be used for general changes over time in a level, not just for recording videos. And in that scenario, this "wait for all the data each frame" logic is highly undesirable.

I'm not sure if there's a way to programmatically distinguish the video case versus the normal play case. If not, the next best thing is probably to add a user-configurable option on the Cesium3DTileset.

kring commented 1 year ago

lidingxing on the community forum found a workaround. You can call Pause Movie Sequencer on the Cesium3DTileset to switch it out of the "wait for all data" mode.

image

https://community.cesium.com/t/play-sequencer-in-game-low-fps/26173/7