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?