3D-Tiles 1.1 voxel

I am currently working with 3D-Tiles 1.1, specifically using 3DTILES_content_voxels and implicit tiles to handle voxel data. I have encountered an issue and would like to ask for some guidance: how can I control the rendering process to hide content that does not contain any voxels?

Specifically, when loading voxel data, some tiles are empty (i.e., they do not contain any voxel data). However, these empty tiles still appear as placeholders during rendering. This results in unnecessary content being displayed, which affects the final visualization.

I have correctly set the tile availability and content availability, which has been verified to work correctly with glb models. However, when switching to voxels, the content availability I set indicates no content at position 0/0/0/0. Despite this, the console reports a 404 error requesting 0.0.0.0.json, which should not be requested. After manually adding this file, only the voxels at position 0/0/0/0 are displayed.

Is there a way to prevent these unnecessary file requests and ensure that tiles without voxel data are not displayed during the loading or rendering stage? Any suggestions or solutions would be greatly appreciated. Thank you!

Looking forward to your responses.



implicit tile voxel-error
test-dataset.zip (5.2 KB)

Hi @cjhdsg, I’m glad to see people are testing the new voxels rendering. I don’t quite understand the problem yet. I’ll download your dataset to look at the tileset.json sometime this week.

Small pointers:

When opening the “Voxels” Sandcastle at Cesium Sandcastle and selecting “Box - 3D Tiles”, then it also spills out a whole bunch of errors saying

https://sandcastle.cesium.com/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tiles/1/0/0/0.json 404 (Not Found)

so this is almost certainly a CesiumJS issue (and not a data issue).

(@jjhembd : If desired, I can open an issue in CesiumJS for that, with a pointer to this thread, but maybe you want to triage that further first…)


I could reproduce the error with the given test dataset (served via localhost) and this minimal sandcastle:


const viewer = new Cesium.Viewer("cesiumContainer");

const provider = await Cesium.Cesium3DTilesVoxelProvider.fromUrl(
  "http://localhost:8003/tileset-voxel.json"
);
const transform = Cesium.Transforms.eastNorthUpToFixedFrame(
  Cesium.Cartesian3.fromDegrees(-75.152408, 39.946975, 20)
);
const scale = 15.0;
const modelMatrix = Cesium.Matrix4.multiplyByUniformScale(
  transform,
  scale,
  new Cesium.Matrix4()
);
const voxelPrimitive = viewer.scene.primitives.add(
  new Cesium.VoxelPrimitive({
    provider: provider,
    modelMatrix: modelMatrix
  })
);
viewer.camera.flyToBoundingSphere(voxelPrimitive.boundingSphere, {
  duration: 0.0,
});

I’m reasonably sure that one root cause for the issue is that it checks for the tile availablility at cesium/packages/engine/Source/Scene/Cesium3DTilesVoxelProvider.js at 6c462b7c02ed81bbc5475b03b03fec9884ab3530 · CesiumGS/cesium · GitHub and the tries to create voxel content for that.

A wild guess is that this check should use contentIsAvailableAtCoordinates, as in

      const available = isSubtreeRoot
        ? subtree.childSubtreeIsAvailableAtCoordinates(tileCoordinates)
        : subtree.contentIsAvailableAtCoordinates(tileCoordinates);

With this, it does not cause the error, but it also doesn’t seem to display voxels, but I haven’t investigated this further.

Just a small update: I’m reasonably sure that this an issue in CesiumJS (and the fact that these 404s also show up in the official Sandcastle example is strong evidence for that). So I opened Invalid requests sent out for voxel content · Issue #12001 · CesiumGS/cesium · GitHub to keep track of this.