Hi!
I have some IFC-models I would like to integrate into Cesium. Unfortunately this is not possible to do directly. The strategy I have used so far, is to:
- Import the IFC-model into blender with the help of the addon BlenderBim (see https://blenderbim.org/)
- Export the model as a glb/gltf file
- Upload it to Cesium ION, and let Cesium ION convert it to 3D-tiles
- Use Cesium ION’s GUI to georeference the model, or “Adjust Tileset Location” as it says
I have also tried to use the Cesium ION blender add-on (Blender – Cesium), but this I think is equivalent to the strategy I have outlined.
To my problem:
If I use a premade 3D-tiles dataset such as OSM-buildings (which is already tiled and available from Cesium ION), and I click on buildings within the Cesium client, an infobox opens up, with information about the properties of the building.
With my 3D-tiles made from IFC-files however, nothing happens.
To try to find out what is going on, I started console.log-ing a few things.
It seems like Cesium represents my 3D-tiles differently than OSM-buildings:
I tried to print out the selected entity, using the “selecteEntityChanged” event:
viewer.selectedEntityChanged.addEventListener((e) => {
console.log('entity changed');
console.log(e);
});
When I click on one of the buildings from OSM-buildings, the result in chrome development tools is like this:
When I click on my building however, the result is like this:
I have also tried to use a direct leftClickEvent to find out what is going on:
const originalLeftClickHandler = viewer.screenSpaceEventHandler.getInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(
movement
) {
originalLeftClickHandler(movement);
var pickedFeature = viewer.scene.pick(movement.position);
console.log('pickedFeatured', pickedFeature);
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
This is the result for OSM-buildings in chrome development tools:
And this is the result clicking on my 3d-tiles:
Thanks alot for any help figuring out what the problem is!