Hello, I’m a Cesium beginner. I added a cone entity to the scene, but when my viewpoint gets close to the cone, parts of it disappear. How can I avoid this issue?
Hi @Keei, thanks for the question. I’m sorry that you’re bumping into this issue.
I have confirmed I see the problem too but I’m not sure what is causing it. It seems related to the sheer size of the cone (cylinder) that you’re trying to render. Reducing the size/height seems to make it happen less or not at all, is that a possibility for your use case?
I do think this is a bug and have opened this issue to track it. Feel free to follow or add any additional thoughts/use cases in Github.
That (somewhat surprisingly) seems to depend on the environment (OS or Graphics card). I could not reproduce this on Windows 10, NVIDIA GeForce RTX 2070, neither in Chrome nor in Firefox.
Just as a data point: On Win 11, with some (unspecified, mobile) AMD Radeon card, I can also observe the effect. Maybe we can quickly confirm whether this is an “NVIDIA-vs-AMD” issue…?
@Keei Do you know what graphics card you have?
My graphics card is AMD Radeon™ Graphics, which is an integrated GPU. I also asked this question on Stack Overflow, and according to the answers, the NVIDIA RTX can render cones correctly.
I see, @emackey (wiping the dust off that account ) already added a comment at cesiumjs - How to Properly Render a Cone Entity in Cesium - Stack Overflow .
So the plot thickens that this is ~“an AMD issue”. But it might be worth investigating this a bit further, because … after all, it is nothing that should require some latest-and-greatest, hyper-vendor-specific functionality. It’s just a cone…
OK, I was a bit courious about this one. So I started removing … “things” from that Sandcastle, until “nothing” was left: No globe. No SkyBox. No transparency. No outline rendering. No clamping. No excessive size. And this still exposed that behavior. Then I noticed that this is really only happening when the tip of the cylinder is far behind the camera.
Setting
viewer.scene.logarithmicDepthBuffer = false;
should fix it.
Thank you for your reply. By setting this line of code, this rendering issue has been resolved