CesiumGS / cesium-unreal

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

Playback sequence very stuck #910

Closed kak0na closed 2 years ago

kak0na commented 2 years ago

Why is the playback sequence very stuck when using Cesium to load the map? Only the map without 3dtiles will be stuck. If there are 3dtiles will be more card. Hope it can be fixed, thanks

kring commented 2 years ago

When under the control of a Sequencer, Cesium for Unreal switches to a different mode where it waits for all required tiles to load in each render frame before proceeding to the next one. This ensures that recorded videos look good by having all required content loaded. Are you using the sequencer for something other than recording videos?

kak0na commented 2 years ago

When under the control of a Sequencer, Cesium for Unreal switches to a different mode where it waits for all required tiles to load in each render frame before proceeding to the next one. This ensures that recorded videos look good by having all required content loaded. Are you using the sequencer for something other than recording videos?

I don't need to record video. Just do a walkthrough animation under Runtime. I don't need to wait for all Tiles to load, can I switch modes? Too stuck, UE is too stuck in Play Sequence at Runtime. Thank you

kring commented 2 years ago

I think you should be able to call PauseMovieSequencer on the Cesium3DTileset instance, just after starting the sequencer run. You can do this from Blueprints. If you're using UE4, you should also turn off the "Keep World Origin Near Camera" option in the CesiumGeoreference. Let me know how this works for you.

kak0na commented 2 years ago

I think you should be able to call PauseMovieSequencer on the Cesium3DTileset instance, just after starting the sequencer run. You can do this from Blueprints. If you're using UE4, you should also turn off the "Keep World Origin Near Camera" option in the CesiumGeoreference. Let me know how this works for you.

Thank you very much, the effect is much better after calling PauseMovieSequencer, but sometimes it still drops to 10FPS, it seems to be loading the model. I sometimes get stuck when moving the camera in the scene, my 3dtiles are 200G, and the "Keep World Origin Near Camera" feature has been turned off

kring commented 2 years ago

You can find some tips for improving performance here: https://cesium.com/learn/unreal/unreal-faq/#how-can-i-optimize-my-scenes-performance

Tile loads are mostly asynchronous, but sometimes (especially if less-than-perfect tilesets) a lot of tiles need to be loaded at once, which requires a lot of data to be sent to the Unreal renderer thread and the GPU, and that can cause frame rate hitches. We're working on some improvements in this area in the form of better throttling resource creation; see https://github.com/CesiumGS/cesium-native/issues/507.

But usually it's not too bad, 10 FPS sounds very low. Make sure you're using a Development or Shipping build of your application (not Debug). What tool was used to create its tileset? Are you confident it's doing a good job? The quality of tiling can have a major impact on performance, especially with a large tileset like yours.

I'm going to close this because I don't think there's anything directly actionable here. Please post to the Community Forum if you would like to discuss further.

kak0na commented 2 years ago

Thank you, great problem has been solved.