Hi All,
I’m struggling to change from a modelMatrix tileset to a per-tile transform tileset.json in 3D Tiles. My tileset comprises a large area and the curvature of the earth makes the model hang over the terrain in areas that are far from the center. I’d like to use a transform for every individual tile to make them stick to the globe better.
My original 3D Tile tileset shows fine in Cesium using this modelTransform:
var center = new Cesium.Cartesian3.fromDegrees(-4.8728231291920547, 36.5093837495992);
var posMat = Cesium.Transforms.eastNorthUpToFixedFrame(center);
this.tileset = this.scene.primitives.add(new Cesium.Cesium3DTileset({
url: this.options.tileset.url,
modelMatrix: posMat
}));
Then I’ve reencoded the models to change the coordinates’ origin to the tile center. Finally I tried to generate a tileset.json transform property for each tile with
var cartesian = new Cesium.Cartesian3.fromDegrees(tileCenter.X, tileCenter.Y);
var transform = Cesium.Transforms.eastNorthUpToFixedFrame(cartesian);
but when I load the cesium viewer page the models are nowere to be found. The tileset have only one level and root have no transform property (please see attached tileset.json).
Any Insights of how to craft a per-tile transform for tileset.json that is similar to eastNorthUpToFixedFrame
?
Thanks in advance
Alvaro
tileset.json (967 KB)