1. A concise explanation of the problem you're experiencing.
I am working on my open source project to convert gltf to 3dtiles And here's my unfinished repository:
https://github.com/nxddsnc/gltf-to-3dtiles.
"Tileset.json" and the corresponding glb files(with batchIds) are successfully created. But I can not manage to do the correct picking in cesium.I
I looked into the code in cesium and found this snippet
https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Batched3DModel3DTileContent.js#L416.
My question is:
1. Does that indicate the batchId should start from 0?
2. How the picking works and how can cesium tell that vertices in different lods with same batchId belong to the same "feature"?
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
geocoder: false,
fullscreenButton: false,
sceneModePicker: false,
animation: false,
selectionIndicator: false,
baseLayerPicker: false,
homeButton: false,
infoBox: false,
timeline: false,
navigationHelpButton: false,
navigationInstructionsInitiallyVisible: false,
creditContainer: ‘dummy’,
globe: false
});
var tileset = new Cesium.Cesium3DTileset({
url: ‘http://localhost:8081/tileset.json’
});
tileset.readyPromise.then(function(tileset) {
viewer.zoomTo(tileset, new Cesium.HeadingPitchRange(0.5, -0.2,
tileset.boundingSphere.radius * 2.0));
}).otherwise(function(error) {
console.log(error);
});
viewer.scene.primitives.add(tileset);
viewer.extend(Cesium.viewerCesium3DTilesInspectorMixin);
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
4. The Cesium version you're using, your operating system and browser.
1.52. chrome latest.