How to adjust height of 3D PointCloud Tiles

Hi,

I would like to adjust height of 3D PointCloud Tiles.
I tried it as follows:

    var cartographic = Cesium.Cartographic.fromCartesian(tileset.boundingSphere.center);
    var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
    var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height);
    var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
    tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation);

I could adjust height of point cloud, but I could not do bounding volume.
And Tile culling is not performed normally.

How to adjust height of 3D PointCloud Tiles?

All of the sample code is below.
It is a partial modification of following Cesium code examples:
    https://cesiumjs.org/Cesium/Apps/Sandcastle/?src=3D%20Tiles%20Adjust%20Height.html&label=3D%20Tiles
    https://cesiumjs.org/Cesium/Apps/Sandcastle/?src=3D%20Tiles%20Point%20Cloud.html&label=3D%20Tiles

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

viewer.scene.globe.depthTestAgainstTerrain = true;

var viewModel = {
    height: 0
};

Cesium.knockout.track(viewModel);

var toolbar = document.getElementById('toolbar');
Cesium.knockout.applyBindings(viewModel, toolbar);

var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
    url : ‘https://beta.cesium.com/api/assets/1460?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMzk2YzJiOS1jZGFmLTRlZmYtYmQ4MS00NTA3NjEwMzViZTkiLCJpZCI6NDQsImFzc2V0cyI6WzE0NjBdLCJpYXQiOjE0OTkyNjQ3NTV9.oWjvN52CRQ-dk3xtvD4e8ZnOHZhoWSpJLlw115mbQJM’,
    debugShowBoundingVolume: true
}))

tileset.readyPromise.then(function() {
    var boundingSphere = tileset.boundingSphere;
    viewer.camera.viewBoundingSphere(boundingSphere, new Cesium.HeadingPitchRange(0.0, -0.5, boundingSphere.radius * 2));
    viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
}).otherwise(function(error) {
    throw(error);
});

Cesium.knockout.getObservable(viewModel, 'height').subscribe(function(height) {
    height = Number(height);
    if (isNaN(height)) {
        return;
    }

    var cartographic = Cesium.Cartographic.fromCartesian(tileset.boundingSphere.center);
    var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
    var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height);
    var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
    tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
});

(Cesium version is 1.39)

You’ve encountered the same thing as this issue: https://github.com/AnalyticalGraphicsInc/cesium/issues/5984

The problem is the tileset uses region bounding volumes which can’t be transformed. Eventually that tileset may be updated to use oriented bounding boxes instead which can be transformed.

thanks for the reply!

I solved it by using BOX bounding volumes instead of REGION bounding volumes.

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

Can you share your solution with me please. I am facing a similar problem with the orientation of my tileset. Thanks

2019年3月14日木曜日 20時13分12秒 UTC+9 slpk...@gmail.com: