why i donot load .b3dm file?

dear everyone, i have spent a lot of time to convert "LODTreeeExport.xml" to cesium3dtiles . when i load this 3dtiles,the web can not load b3dm file,the url is "http://localhost:8080/apps/Learn/tilesets/TilesetWithDiscreteLOD/dragon_medium.b3dm?v=0.0",but the "http://localhost:8080/apps/Learn/tilesets/TilesetWithDiscreteLOD/dragon_medium.b3dm?v=0.0" is ok.

so how i solve this problem? thank you !

Can you post your full loading code? If you follow the sample code in https://github.com/AnalyticalGraphicsInc/3d-tiles-samples it should be pretty smooth.

在 2016年11月14日星期一 UTC+8下午11:09:28,Sean Lilley写道:

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.

{

“asset”: {

“version”: “0.0”

},

“geometricError”: 100,

“root”: {

“boundingVolume”: {

“region”: [

1.791628438775456,

0.43636019940414406,

1.7916428419884687,

0.43637323794669985,

1877.1792471749675,

1884.2476457060009

]

},

“geometricError”: 16,

“content”: {

“url”: “Tile_1320320231311111231\Tile_1320320231311111231.b3dm”

},

“refine”: “add”,

“children”: [

{

“boundingVolume”: {

“region”: [

1.7916284387753736,

0.4363602025550738,

1.7916425045992321,

0.43637303947379535,

1877.1792475360458,

1894.247680962341

]

},

“geometricError”: 8,

“content”: {

“url”: “Tile_1320320231311111231\Tile_1320320231311111231_L16_0.b3dm”

}

}

]

}

}

35FCFE12@476F6930.27F52B58.png

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

scene3DOnly : true

});

var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({

url : ‘http://localhost:8080/gltf2b3dm/output/

}));

tileset.readyPromise.then(function(tileset) {

viewer.camera.viewBoundingSphere(tileset.boundingSphere, new Cesium.HeadingPitchRange(0, -0.5, 0));

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

});

the data leave the ground is very high. if add terrainprovide, the data will disappear very soon.

var localterrainprovider = new Cesium.CesiumTerrainProvider({

url:‘https://assets.agi.com/stk-terrain/world’,

requestVetexNormals:true,

requestWaterMask:true

});

viewer.terrainProvider = localterrainprovider;

35FCFE12@476F6930.27F52B58.png

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({

url : 'https://assets.agi.com/stk-terrain/world',

requestWaterMask : true,

requestVertexNormals : true

});

viewer.terrainProvider = cesiumTerrainProviderMeshes;

var scene = viewer.scene;

var heightOffset = 23.0;

var url = ‘tileset.json’;

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);

});

``

thank you very much, this problem has solved.