cesium-unreal icon indicating copy to clipboard operation
cesium-unreal copied to clipboard

Tilesets sometimes flickering, for unknown reasons

Open argallegos opened this issue 2 years ago • 7 comments

From https://community.cesium.com/t/strange-ue5-earth-issue/19584

User noticed an issue in their scene where Cesium World Terrain will flicker when not selected in the World Outliner. The project is using Unreal Engine 5 and Lumen.

  • Issue occurs with a manually-compiled plugin at commit 7e4d66bc382988da7c1b2f51ca42b3a87589c27b. It does not occur with the version of the plugin from the marketplace.
  • It may be related to the cache, as the user noted that clearing the sqlite cache resolved the issue using the packaged plugin (but did not resolve the issue using the manually-compiled version.
  • Issue does not occur when only CWT is present in the scene.
  • Issue did not occur in UE4.

Other notes from the user:

  • Flickering seems to be triggered by complexity/number of other tilesets
  • Deleting other tilesets after they are loaded does not stop the flickering. Neither does refreshing the CWT tileset.
  • CWT's cache size in the user's project is set to 20gb

Something may have gone awry in the sqlite cache, but why it is only happening in the manually-compiled version should be investigated further.

argallegos avatar Jul 19 '22 21:07 argallegos

My first thought when I see flickering like that is that there is a problem with tile bounding volumes, causing erroneous occlusion culling. We had a bug like that awhile back, but it was fixed in this PR: https://github.com/CesiumGS/cesium-unreal/pull/841

The referenced commit should definitely include that PR. So assuming Cesium for Unreal has been compiled correctly and is actually the version the user thinks it is, that shouldn't be the problem.

The only other thing that jumps out at me is the 20GB cache size. That's absolutely insanely huge, and is likely to mean the GPU (if not the CPU) is going to run out of memory after a little browsing around. I'd expect that to result in something more like a crash than a flicker, but who knows. Best to leave that at the default (512MB? 256MB?).

Other than that, we'll just have to see if we can reproduce the problem so that we can debug it.

kring avatar Jul 20 '22 02:07 kring

Another thing to mention is that if the flickering happens with small camera movement, it's probably not cache related. A video of the problem might help might it clearer.

kring avatar Jul 20 '22 02:07 kring

The user noted that enabling "Render custom depth pass" solved the issue. Perhaps this points to an issue in post processing, or some UE5 rendering bug.

argallegos avatar Aug 02 '22 18:08 argallegos

This bug came up again on the forum, with a user's own tileset in 5.2: https://community.cesium.com/t/flickering-tileset/25123

The flickering does seem positionally based, but not movement based. In other words, once you find a position where the flickering happens, you can leave the camera there and the visual bug will persist. The tileset doesn't flicker when selected, and when "Render CustomDepth Pass" is enabled, the flickering stops.

j9liu avatar Jul 03 '23 18:07 j9liu

Hi i was wondering if there is any news to this issue? We have the same issue (using Google Tiles, ue5.3 and the newest cesium plugin). As mentioned above enabling the Render Custom Depth Pass solves the problem but adds some additional render-time (minor but still noticeable in VR and high resolutions) I've attached some screen cast that shows the issue

  • I noticed that it usually happens more often on flat (water) surface tiles, than tiles that have more geometry.
  • Its also happening more often when close/zoomed-in to the tiles
  • it does not happen when the Cesium Tiles Actor is selected (same as Custom Render pass)
  • the example in the video is Mont-Saint-Michelle (48.633203,-1.507454), which shows the issue quite noticeable.

It should be reproducible with the standard Cesium Examples (use the CesiumGoogleMapTiles example map and change the coordinates to the mentioned above)

https://github.com/CesiumGS/cesium-unreal/assets/1744939/8591a2d2-ca3d-4d95-9abb-0284f709b0ae

hope that helps a bit.

ftrx avatar Feb 12 '24 09:02 ftrx

We don't have any update on this, but expect to dig into it soon. In the meantime, please continue to post videos and instructions for reproducing it reliably.

kring avatar Feb 15 '24 05:02 kring

We started noticing this tile flickering on flat terrain or ocean with both Cesium tiles and Google tiles since mid-January. It didn't happen before then. We discovered the flickering is worse when TSR is not enabled, as TSR somehow reduces and masks the effect to some degree. Enabling "Render Custom Depth Pass" stops the flickering though.

metsaml avatar Feb 15 '24 20:02 metsaml