Hello,
I am trying to make a model that shows different buildings highlighted by different properties that they have in common. So for example, all buildings with the same postal code would light up red when a checkbox is clicked. Then when another postal code is selected and both checkboxes are checked, all buildings with those two postal codes will be red. I have figured out how to do this using the Cesium OSM Building file but now I want to load in my own buildings formatted as an .fbx file. Each building is a separate .fbx file so I realized while loading these in I could not just utilize:
osmBuildingsTileset.style = new Cesium.Cesium3DTileStyle({
color: {
conditions: [
["${feature[‘addr:postcode’]} === ‘60611’", “color(‘purple’)”],
],
},
});
Since these are all loaded separately, they are not all on one variable such as osmBuildingsTileset. Here is how I have loaded them in.
var building1 = viewer.scene.primitives.add(
new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(######)
})
);
var building2 = viewer.scene.primitives.add(
new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(######)
})
);
var building3 = viewer.scene.primitives.add(
new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(######)
})
);
Is there a way to import them in as separate assets on Cesium Ion so that I can adjust their individual tile location and then load them in as one variable with Cesium JS? Or would the best case to be to link each location to the file and then upload them all as one asset on Cesium Ion? Also if this was the case, how could I assign metadata for properties to each individual building if they are all in the same asset? And could I go back into Cesium Ion and add new .fbx files to the existing asset if I model more buildings?
Any advice would be greatly appreciated! Please ask me any clarifying questions as well as I know this is a long post.
Thank you,
Claire