3D Tileset disappears when tilting the view

The problem:

I have created a tileset.json model and successfully added it to cesium, but when I tilt the view past a certain angle, the model disappears.

The same problem was addressed in this post https://cesiumjs.org/forum/#!msg/cesium-dev/60YxuDWN5X8/YNz6XzRwDQAJ, but the suggested fix is not working for me.

I tried making the boundingVolume region bigger, and setting the debugShowBoundingVolume and debugShowContentBoundingVolume properties of the tileset to ‘true’, but I still can’t see the bounding box.

After I made the boundingVolume region bigger in the tileset.json, I can’t zoom in all the way to the model. The view stops at a certain altitude and only allows very slow zoom and no panning at all.

Here is my code for creating the tileset, the tileset.json itself, and a link to my b3dm model:

Javascript

var tileset = new Cesium.Cesium3DTileset({

url: ‘./Source/SampleData/Models/tileset.json’,

debugShowBoundingVolume: true,

debugShowContentBoundingVolume: true

});

tileset.readyPromise.then(function(tileset) {

tileset.modelMatrix = Cesium.Transforms.headingPitchRollToFixedFrame(Cesium.Cartesian3.fromDegrees(-105.235874, 39.782394, 1774.5), new Cesium.HeadingPitchRoll());

//viewer.camera.viewBoundingVolume(tileset.boundingVolume, new Cesium.HeadingPitchRange(0, -90, 0));

//viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);

});

viewer.scene.primitives.add(tileset);

//viewer.zoomTo(tileset);

``

Tileset.json
{

“asset”: {

“version”: “1.0”

},

“geometricError”: 500,

“root”: {

“boundingVolume”: {

“region”: [

-1.837822,

0.694543,

-1.835602,

0.694123,

0,

1000

]

},

“geometricError”: 100,

“refine”: “REPLACE”,

“content”: {

“url”: “./scene.b3dm”

}

}

}

``

Link to b3dm on google drive: https://drive.google.com/file/d/1p_dxA_2LgmtwY-gUnu0Ztw-aEnHO1t2N/view?usp=sharing

Context:

Just prototyping 3D tiles

Specs:

Cesium Version 1.43

OSX High Sierra 10.13.1

Chrome 66

Any help is much appreciated!

Thanks

Working link to the previous post about the issue https://groups.google.com/forum/embed/?place=forum/cesium-dev&showsearch=true&showpopout=true&hideforumtitle=true&fragments=true&parenturl=https%3A%2F%2Fcesiumjs.org%2Fforum%2F#!searchin/cesium-dev/tileset/cesium-dev/60YxuDWN5X8/YNz6XzRwDQAJ

I’m also getting a ton of warnings in the console like [.Offscreen-For-WebGL-0x7f7fa7a84200]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to access out of range vertices in attribute 2

Alright I figured it out, right after I post of course.

Had my north and south values switched for the boundingVolume region.

this is my tileset.json now, that works:

{

“asset”: {

“version”: “1.0”

},

“geometricError”: 500,

“root”: {

“boundingVolume”: {

“region”: [

-1.838022,

0.693203,

-1.835402,

0.695463,

0,

1500

]

},

“geometricError”: 100,

“refine”: “REPLACE”,

“content”: {

“url”: “./scene.b3dm”

}

}

}

``

Console errors are gone, but I still can’t see the bounding box.

Hi there,

Glad you figured out the errors! However, the non-visible bounding volume is probably on account of this bug in Cesium, #5984, where the boundingVolumes described by regions are not transformed when applying a transform to the tileset. I’ll bump that issue with this report, and in the meantime you can modify the boundingRegions in the tileset file itself.

Thanks,

Gabby

Hey all,

The issue at #5984 has just been closed and may resolve your issue. Look for the change in the Cesium 1.48 release on August 1st, or get it now in the master branch on GitHub https://github.com/AnalyticalGraphicsInc/cesium.

Thanks!

Gabby