I started having a look at this, based on the sample data.
(With one small aside: I moved the JSON into the
utrecht3d directory, to avoid using the absolute paths for content URIs - while this is valid, it will reduce portability, but I assume that this was only done here for tests/debugging).
Everything that I say here should be taken with a grain of salt (I’m not so deeply involved in the inner workings of CesiumJS). But I made a few observations:
I added an obscure hack to show the bounding regions of the tiles, as rectangles, with some “label” that shows the implicit tile coordinates (as
level-x-y).And I extracted the GLBs from the B3DMs, and had a look at these as well. The following is a screenshot showing the tiles
3-7-3 on the left. On the right, I opened the corresponding GLBs in another viewer,
3-7-4 at the top, and
3-7-3 at the bottom:
Obviously, they appear to be “flipped”. Not in the sense of a “scale along the (visual) Y-axis”. Each tile has the right orientation. But they are displayed “in the wrong order”.
So far, so strange. But … this “wrong order” is apparently also used for culling, as it can be seen here:
When dragging the mouse, so that the bottom tiles leave the viewport, then the top tiles start to disappear. When dragging so that the top tiles leave the viewport, then the bottom tiles start to disappear.
Until now, this may not be sooo helpful. It is only an an observation of symptoms. It is not even clear (for me) whether it is some “error” in the data, or a bug in CesiumJS. I considered to create a manual, minimal example (just 4 unit cubes in a quadratic region), just to see whether it can be reproduced with a simpler example as well, but that might take some time. Maybe someone already has an idea where to start looking, based on that description. (I started digging in the code, but no avail…).