I’ve read some forum posts stating that you don’t have to turn off the globe when you load Google’s Photorealistic 3D Tiles. However, if we leave the globe on we get really bad and strange rendering of black areas all over the globe (see screen captures below).
We have a ton of code that draws various entities and primitives. But if we turn the globe off many of these objects aren’t rendered (not sure if they are not drawn at all or just not visible). If we turn the globe on while displaying Google’s 3D Tiles, however, we get the really bad rendering effects.
I’ve tried to reproduce the issue in Sandcastle, but so far I haven’t been able to do so.
Wondering if anyone has any idea what would be causing this to occur and how we could correct it?
@sean_lilley sorry to bug you, but wondering if you had a chance to take a look at how we’re creating the globe and Google 3D Tiles… and if any suggestions come to mind?
It’s difficult to analyze this without a reproducible test case. (One can “manually” try to reproduce it, but that often involves the same (if not more) guesses as trying to find a workaround/solution for the issue itself).
But to clarify: When you talk about the globe being “on” or “off”, what exactly does this refer to? There’s a crucial difference of whether you try to run everything without a globe at all by saying
const viewer = new Cesium.Viewer("cesiumContainer", {
globe: false,
...
});
or whether you simply hide the globe, by omitting that globe: false part, and doing a viewer.scene.globe.show = false;
instead.
The viewer is being constructed without any special reference to the globe (no “globe: false”). When we want to display the Google 3D Tiles we hide the globe using “viewer.scene.globe.show = false;”. And when we turn off the Google 3D Tiles (or display a different map source) we show the globe using “viewer.scene.globe.show = true;”.
However, when we hide the globe in this fashion we are unable to draw various objects (lines, polygons, etc.). But if we leave the globe visible so that we can draw these objects we get the appearance as seen in the screenshot above.
Thanks for the reply. We’re trying to figure out how to work through a process to determine the source of the issue. Unfortunately, we have been writing our app for quite a few years and there are a lot of features that have been implemented. The simplest Cesium example doesn’t produce the problem. So, it’s going to take some time to add features one-by-one.
We were just hoping someone else had experienced this and already knew what might be causing the issue.
I’m not sure whether I can provide really profound help right now (because I cannot imagine what might cause the issue that you described). But I’m curious about this part:
However, when we hide the globe in this fashion we are unable to draw various objects (lines, polygons, etc.). But if we leave the globe visible so that we can draw these objects we get the appearance as seen in the screenshot above.
When you say that you have to keep the globe visible to show certain objects, then I wonder why this might be the case. Usually, you can draw polygons and other things both when the globe is not shown, and when it is completely omitted from the viewer.
So to put it that way: What happens when you remove the globe and try to draw such an object? Does it simply not appear, or does it cause a crash…?
It didn’t cause a crash (or report an error of any kind)… objects just didn’t appear. But if we switched the globe back on the objects would appear.
However, something must have changed in the latest build. I hadn’t tried many of the objects since we upgraded Cesium (we upgraded to 1.120 a few days ago). It looks like most of the objects are now appearing correctly even when the Google 3D Tiles are displayed and the globe is hidden… which is great!
The only issue I’ve noticed so far that when we attempt to draw a custom material with a custom gradient shader to display basically heatmap polygons on the ground they don’t show up at first. But if I switch to another map source (turning the globe’s visibility on) and then switch back to the Google 3D Tiles (turning the globe’s visibility back off) the heatmaps appear.