CesiumGS / cesium-unreal

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

Tilesets sometimes flickering, for unknown reasons #914

Open argallegos opened 2 years ago

argallegos commented 2 years ago

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.

Other notes from the user:

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

kring commented 2 years ago

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 commented 2 years ago

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.

argallegos commented 2 years ago

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.

j9liu commented 1 year ago

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.

ftrx commented 7 months ago

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

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.

kring commented 7 months ago

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.

metsaml commented 7 months ago

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.