3d tiles boundingvolume box definition

Hi,

I'm having problems with defining a boundingVolume with a box in the tileset.json for 3d tiles. I'm trying to visualize a cube that has a size/bbox of [0,0,0,1,1,1] which is [minX, minY, minZ, maxX, maxY, maxZ].

My understanding of the specification ( https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification#box ) is that in case of this cube, the OBB should be defined as below.

[
0.5, 0.5, 0.5,
0.5, 0.0, 0.0,
0.0, 0.5, 0.0,
0.0, 0.0, 0.5
]

However, with this definition the boundingVolume is offset from the content (cube). See the attached screenshot, where blue is the boundingVolume, purple is the cube.

I tried all sort of variations on defining the axis for the boundingVolume, but couldn't manage to align it with the content.

I didn't define any transformation in the 3d tiles, just in the Cesium viewer, see below.

var viewer = new Cesium.Viewer('cesiumContainer', {
    globe : false
});

var modelMatrix2 = Cesium.Transforms.eastNorthUpToFixedFrame(
         Cesium.Cartesian3.fromDegrees(4.367145, 52.011503, 0.0));

var tileset = new Cesium.Cesium3DTileset({ 
    url: 'tileset.json',
    modelMatrix : modelMatrix2,
    debugShowContentBoundingVolume : true,
    debugShowBoundingVolume : false,
    debugWireframe: true
});
viewer.scene.primitives.add(tileset);

tileset.readyPromise.then(function(){
    viewer.zoomTo(tileset);
});

Could you help in figuring out what goes wrong?

Can you share this sample tileset? Uploading it somewhere is fine, or putting it in a Glitch app works to (see this Cesium template https://glitch.com/edit/#!/cesium-template?path=README.md:1:0)

I think the bounding volume is correctly defined, but there might be something else going on with the actual tile content. Is it a b3dm tile?

Thanks for your response.

I put the thing in Glitch, however I didn't manage to get the assets to show up in the Cesium viewer... Nevertheless, I pasted the code that are use for Cesium and also uploaded the tileset. https://glitch.com/edit/#!/join/09e77d94-06e4-4b38-b7e8-be4dfb68bb28

Yes, the tile content is b3dm. I wrote the converter to glb and b3dm myself, so chances are that something could be wrong there :slight_smile: . However, the glb converter seems to be working fine, as the cube or more complex models (eg city models) are visualised correctly.

I used the validator from the validator branch from 3d-tiles-tools (https://github.com/AnalyticalGraphicsInc/3d-tiles-tools/tree/validator) and it returns valid for the b3dm. Is there any other way to verify the b3dm?