Tileset from Context Capture failed to add

After using context capture to generate a tileset. Tileset can be displayed in the browser by using the Apps generate from Context Capture as a web service.

But I failed to add as a tileset while try to code a new cesium app. The modelMatrx is re-computed and the viewer's globe is switch off. Still not works.

The tileset includes lots of other tiles. When I check the 'network' from chrome developer mode. I find out all json file are loaded, but none of the b3dm files are get from server.

console has no error, and the render not create any image.

Context Capture 4.4.9
Cesium 1.49

Many thanks!

Hi, would you be able to upload the tileset somewhere for us to check out? Does the tileset work in previous versions of Cesium?

Hi Sean, many thanks for your reply! This is the first bite for me to use cesium, so I haven't check it before.

Tileset is here:
http://120.26.46.56:9000/Scene.zip

and Apps generated from Bentley is correctly rendered here:
http://120.26.46.56:9000

Many thanks!

Cool, I’m downloading the tileset now and will let you know what I find.

The tileset looks fine. There are a couple of bugs on our end, one introduced the last release and not present in the ContextCapture viewer (#7035), and another only present if trying to edit the tileset’s model matrix to make it easier to see in Cesium (#7306).

With all the fixes described at the bottom of #7306 I eventually got a good view of the tileset using this code:

var viewer = new Cesium.Viewer(‘cesiumContainer’);

var tileset = new Cesium.Cesium3DTileset({
url: ‘http://localhost:8003/localTilesets/Scene-upgraded/Production_1.json’,
maximumScreenSpaceError : 2
});

viewer.scene.primitives.add(tileset);

tileset.readyPromise.then(function() {
var origin = Cesium.Cartesian3.fromRadians(0,0,50);
tileset.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
viewer.zoomTo(tileset);
});

``

We’ll update this thread as we fix those issues.

Thanks Sean, that helps.

I finally see my tileset in my browser, although it looks like a space ladder.
If I upgrade the 3d-tiles-tool, the tileset could move to a flat surface?

So the reason context capture can render correctly is because they using an old stable version? If it is true, which version I can use to avoid current errors?

You can try upgrading with 3d-tiles-tools and then use the two branches mentioned at the end #7035. But it might be easier to wait until #7035 and #7306 are fixed first.

Yes Context Capture is using an old stable version. To avoid the error in #7035 you can use Cesium 1.48 or below, or wait until Cesium 1.50 is out. The error in #7306 seems to have always existed, but if you comment out the line that sets modelMatrix the tileset should load ok, it will just be at the center of the Earth and possibly upside down to start:

Anyways try this code in Cesium 1.48:

var viewer = new Cesium.Viewer(‘cesiumContainer’, {

globe : false

});

var tileset = new Cesium.Cesium3DTileset({

url: 'http://localhost:8003/localTilesets/Scene/Production_1.json',

maximumScreenSpaceError : 2

});

viewer.scene.primitives.add(tileset);

tileset.readyPromise.then(function() {

var origin = Cesium.Cartesian3.fromRadians(0,0,50);

viewer.zoomTo(tileset);

});

``

Cesium.Transforms.headingPitchRollQuaternion is for entity, not for tileset.
Any method to rotate the tileset?
Many Thanks!

Notice the line in Sean’s second to last example:

tileset.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);

``

So all you need to do is construct the right matrix and you can rotate/translate the tileset. So if you want to use headingPitchRoll you just need to use the method that returns it as a matrix, see: https://cesiumjs.org/Cesium/Build/Documentation/Transforms.html?classFilter=Transforms#.headingPitchRollToFixedFrame

Hi, just an update here- We’ve merged #7035, and the fix should be included in the next Cesium release.

Thanks!

Gabby