3d-Tiles shadows

244 views
Skip to first unread message

jbo023

unread,
Jun 27, 2016, 9:22:57 AM6/27/16
to cesium-dev

Hello,

 

we are really happy that you implemented shadows in the last cesium version and also merged it into the 3d-tiles branch.

 

But we notices some problems with the shadow rendering. Maybe we are doing something wrong, and missed some settings.

 

1. When we played with your building data we found some artifacts when a surface is in the same direction as the sun, you can see in the following screenshot. http://hosting.virtualcitysystems.de/demos/cesiumShadow/artifacts.png

 

2. When we use our own data, we often see aliasing effects in the shadows, although the shadow casting edges are straight.

Is there some way to avoid these problems ?  http://hosting.virtualcitysystems.de/demos/cesiumShadow/artifacts2.png

 

3. Sometimes the surfaces which are not directly in sun, are shadowed wrong. The surface should be completely shadowed, but there seems to be a small shift in the shadow. The effect changes depending on your camera distance. If the camera is near almost the whole surface is shadowed, but if the camera is further away, the shadowed area gets smaller and then disappears completely.

 

http://hosting.virtualcitysystems.de/demos/cesiumShadow/shadowsite1.png (camera near, building surface should be completely dark) http://hosting.virtualcitysystems.de/demos/cesiumShadow/shadowsite2.png (camera a bit further away, dark area gets smaller) http://hosting.virtualcitysystems.de/demos/cesiumShadow/shadowsite3.png (camera further away, surface is not shadowed)

 

We did use the unaltered current version of the 3d-Tiles branch. http://hosting.virtualcitysystems.de/demos/cesiumShadow/Apps/Sandcastle/gallery/3d Tiles.html

We only added two Berlin 3d-tiles datasets to the 3d-Tiles Sandcastle App.

 

If you have any Ideas what we can do to avoid or fix these problems we would be really happy.



Thanks, 


Jannes

Hannah Pinkos

unread,
Jun 27, 2016, 10:48:16 AM6/27/16
to cesium-dev
Thanks for including all of the screenshots Jannes!  I've forwarded your post to Sean, who did most of the shadows work.  He'll be able to answer your questions.

Best,

Hannah

Sean Lilley

unread,
Jun 28, 2016, 1:33:24 PM6/28/16
to cesium-dev
Hi Jannes,

Thanks for the screenshots. A lot of these artifacts are things I have also noticed. I believe #1 is caused by recent browser issues with the WebGL polygonOffset command which is designed to reduce aliasing in areas that are parallel to the light source. It seemed to work in Chrome 49 but has since changed, which led to me trying another technique which unfortunately leads to the aliasing issues you see in #3. I need to investigate this some more and possibly file a bug report for the ANGLE team to look at.

For issue #2, the blocky shadows are a result of not having enough resolution in the shadow map. There are basically three reasons for this: the estimated near and far plane for the light source are not as tight as they could be, which is a common problem for city rendering since I usually try to clamp the near plane to the closest object's bounding volume, but in the case of 3D Tiles the camera is often inside the tileset's bounding volume so clamping isn't effective. The second reason is the pixel resolution of the shadow map isn't big enough, but the default is 2048x2048 pixels which ought to be enough for most cases. And the third reason is the shadow map's maximum distance is just too big, so the shadow maps need to cover large regions. This can be controlled by setting `viewer.shadowMap.maximumDistance` to a smaller value (the default is 5000 meters).

I'll keep you updated!

Patrick Cozzi

unread,
Jun 28, 2016, 8:02:03 PM6/28/16
to cesium-dev
Thanks for the detailed response, Sean.  Please update the shadows roadmap / submit issues linking to this thread as appropriate.

Jannes - we are super excited that you are already using this new feature!

Thanks!
Patrick
Reply all
Reply to author
Forward
0 new messages