Open OmarShehata opened 5 years ago
A simple short-term fix would be to move the depth plane execution after the 3D Tiles pass. The drawback to this is 3D Tiles may show through the globe when depthTestAgainstTerrain=false
, but this would only happen for tilesets with a huge geometric error. It wouldn't fix that Sandcastle either. It's probably a worthwhile tradeoff to make.
The better fix is to compute the depth plane differently. I don't know what that would look like yet.
https://github.com/AnalyticalGraphicsInc/cesium/issues/7859 looks like the same issue
That short-term fix sounds reasonable enough.
The other option is to replace the depth plane with a depth cone - so instead of having a plane, use a cone with the vertex on the other side of the globe so it is like an ice cream cone with the ice cream being the front half of the globe facing the user and the cone inscribed in the back half of globe.
If this can be done fast, maybe just do this right away instead of the short-term fix.
https://github.com/AnalyticalGraphicsInc/cesium/pull/8398 had a workaround that pushed the depth plane ellipsoid inward based on the the Mariana Trench's depth. A better approach will involving finding the min/max heights based on the loaded terrain tiles / 3D Tiles kind of like https://github.com/AnalyticalGraphicsInc/cesium/pull/8398. Or try out the depth cone.
Hi, is this being actively worked on? Is there any reason #9200 hasn't been merged? This is causing us quite a few issues for clients with assets located in the middle east region. Thanks, Tom
Hi, also curious if this clipping issue being worked on. I'v posted a similar issue on the Cesium forum https://community.cesium.com/t/czml-data-source-gtlf-model-disappears-a-certain-camera-angles/11214/5
Hi, is there a fix for this bug? I have checked all around the net on this but still nothing that works.
@mDeligalabov You should be able to use the depthPlaneEllipsoidOffset
option added in https://github.com/CesiumGS/cesium/pull/9200
Thank you @lilleyse this information leaded me to more information. One thing that I still find strange is that with camera movements the ellipsoid value is also moving up and down. Shouldn't this be considered as a bug since the for example the Cartographic instance height is relying on this?
Also reported in https://github.com/CesiumGS/cesium/issues/11658.
depthPlaneEllipsoidOffset
doesn't appear to work correctly with clustering. With clustering on, the clipping still happens, while with clustering off, depthPlaneEllipsoidOffset
fixes the issue.
I've run into this with various 3D Tilesets, but this is a good minimal example produced by Adam Twite in this forum thread:
Sandcastle. Just try tilting the camera up a bit.
Here, the 3D model is actually underneath terrain, but depth testing is turned off, so it should show through. It clips because the depth plane (which is used to write depth on the ellipsoid when the globe tiles don't, so that things on the opposite side of the globe don't show through). You can verify this by commenting out the
depthPlane.execute
line here in Scene.js:https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Scene.js#L2307