thank you Sean Lilley, i have solved the problem. and now i have another problem. when i create tileset.json, i dot not know how to caculate the value of every tile’s GeometryError. i have use b3dmConvertor.js to convert LODTreeeExport.xml(lots of .dae files). and i use the tileset.json which is created by myself, when load this tile ,it is below the scene , it will not see.,i 'https://assets.agi.com/stk-terrain/world as terrainprovider, just like this ,what is the problem. this is the height problem of the data.
how can i put the data on the plane and use wold terrainprovider.
thank you very much.
if donot use terrainprovider ,the data is very high.
Tilesets do not conform to terrain, so in this case your tileset hovers over the globe when terrain is off and is below the globe when terrain is on. It seems like you may need to do some tweaking to the position of your tileset to have it placed where you like. This sample code may help out my setting the tileset’s modelMatrix:
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
scene3DOnly : true
});
var cesiumTerrainProviderMeshes = new Cesium.CesiumTerrainProvider({
var tileset = scene.primitives.add(new Cesium.Cesium3DTileset({
url : url
}));
tileset.readyPromise.then(function(tileset) {
var boundingSphere = tileset.boundingSphere;
viewer.camera.viewBoundingSphere(boundingSphere, new Cesium.HeadingPitchRange(0, -2.0, 0));
viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
// Position tileset
var cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center);
var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, heightOffset);
var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
var matrix = Cesium.Matrix4.fromTranslation(translation);
tileset.modelMatrix = matrix;
var transform = Cesium.Matrix4.pack(matrix, new Array(16));
console.log(transform);