cesium icon indicating copy to clipboard operation
cesium copied to clipboard

When the camera gets closer to the terrain, some terrain shadows disappear

Open JiaoJianing opened this issue 2 years ago • 3 comments

Sandcastle example: Link

Browser:Google Chrome Version 105.0.5195.102 (Official Build) (64-bit)

Operating System: Windows 10

When the camera moves closer to the terrain, some shadows disappear. shadow-not correct

JiaoJianing avatar Sep 15 '22 08:09 JiaoJianing

Hi @JiaoJianing. I believe this is due to higher resolution terrain tiles loading in as you zoom closer. To see this demonstrated, this sandcastle enables wireframe debug mode and shows more geometry loading in as the camera gets closer.

ggetz avatar Sep 16 '22 13:09 ggetz

Hi @ggetz Thanks for your response! I understand your meaning, I prepared a new gif: WPS动图制作(2) When I change the camera's angle slightly, terrain's geometry barely change, but some shadows disappear.

JiaoJianing avatar Sep 19 '22 02:09 JiaoJianing

@JiaoJianing I think this may be due to culled terrain tiles. We don't render terrain tiles which are out of view of the camera. If they are not rendered, then there is no object in the scene to cast a shadow.

To see this, here's your sandcastle example with the Cesium Inspector Widget added. Zoom into the point where the shadows disappear. Then, in the inspector, check "Suspend LOD Update" under the "Terrain" section. When you zoom out, you can see the culled area, and the shadows remain the same.

ggetz avatar Sep 19 '22 19:09 ggetz

Interesting! We're also running into this as we are seeking to provide our users with as accurate terrain shadows as possible. Is there any way to relax the aggressiveness of the culling?

malaretv avatar Oct 21 '22 12:10 malaretv

Not through the public API, I believe.

You could experiment with seting globe._surface._debug.suspendLodUpdate to stop any new culling from happening.

ggetz avatar Apr 12 '23 18:04 ggetz