Add properties to 3DTiles

Hi, I’m new using Cesium and I would like to know if there’s a possibility to add some information to the models I upload (3D Tiles), so I could see it in the same way when click to OSM buildings.

Hello @FallenOz Welcome !,
You need to enable infoBox of viewer and use entity description property to display whatever information you want to display on click. Check this sandcastle link.

Regards,

Thanks for sharing the sandcastle. I’ve been editing somethings to edit visibility, but I’m not able to replace the plane for my own building, not sure how I could get the url, because when I upload my model to CesiumIon it appears like url: Cesium.IonResource.fromAssetId(xxxxxx), not “…/SampleData/models/CesiumAir/Cesium_Air.glb”…
I tried to use de entity code in my own sandbox (which has the building I want) but I can’t make it work clicking on it.

Not sure if you can see the code sharing this:https://sandcastle.cesium.com/index.html#c=rVgLc9q4Fv4rGnZnAjNe8wwJpPReQtKUTIAGSHfT0tkKW2AF2eJacijp8N/v0cPGJNnd3JmbzIAtHZ3ndx7iEcfokZINiVEHRWSDekTQJHQ/67XirODp9x6PJKYRiWcFB/2cRQjRaMHP+Y82knFCHLUiCCOepDzqRz71sORxfjPAPt+IgxWeML8b0RBLkluXJI5B1KeYP1KfAA+rkRcTIPydx8yfGpJiCQ7sSmezSJ1D5TK6IhJteRIjyVckQouYhyiQci3a5bJn2fCwDDqWNYXQB62APo9cnyxwwmTXA2ox1Uw6aFYg2+tgfuXREb3u3z31q0PaF/1ofOz1+s3+av3H5951ywWi//hXK0VE78Pxw5erQXXQq66GD0F4M719Gk5v5f3vw9X9pPI0ePLZYPolHE0DOnzq05ve9foLMBs+3G5GF7eiH7LAh/fB9H47uvAao+mqNvpYcU9vV/fBg6TBw+S2QR7uP7SS817ywAbk7s9bP/jjc+si2JycbKbDu1kh55jJ9PITqqHe6OIS/Yb6EZUUM/pEkAxIGv8NlYH1BdJuRtbPCEc+8iG6kqT7d33N2Zx0sQ4ieBW8a3HiCrllxH2kgs4po3ILfkRHAfV9Eh2d5Q9LGhIGR956FqH86QWPPTIGpZ5IMY+Eru+nuo4mA3SeUObTaClcTQCihETzdHFKGREAnU7KVXgEFFrHNARHPRLhYt8vH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HtWtv/6zguuUJXGEZUffcsg6ZKJuE6NLYPv0Jj+6SzTNh6q9aqWReOjswFD6/6UyYwA3cA3QwopA/hZFpjuMBiZKiNc4kjPovOIV3euJ7nzL9Nw0BmFIhpghaSgJaggmiPE/Ac9L1hEjlvivnj76DuxOifueV3zORvjXCziJhGnKzwvt3ZaB/cVTd9cG9I2gsDG8VWVB9f2MWXdd9V4bX109KY2bK2Wybz/8C

I’m not clearly getting you. You can use Cesium Ion Asset by passing it on model’s url like:

model: {
      uri: Cesium.IonResource.fromAssetId(766369),
      minimumPixelSize: 128,
      maximumScale: 20000,
      silhouetteColor: getColor(
        viewModel.silhouetteColor,
        viewModel.silhouetteAlpha
      ),
      silhouetteSize: parseFloat(viewModel.silhouetteSize),
    },

Check this link I’ve modified.

If you have model you can covert it to .glb OR .gltf online or by this application and then use it directly without uploading on cesium Ion.

I hope it helps you!

  • Regards,

Hi, thank you so much for trying to help me.

I’ve tried that too, the problem is that the info box is still refered to the plane, I’m not able to make it work in my model, if you try to click the building nothing happens. This is the part of the code I would like to show in my building:

 entity = viewer.entities.add({
    name: "ARROYO DE LA ENMIENDA",
    position: position,
    orientation: orientation,
    description: "Edificio resindencial formado por un conjunto de x viviendas. Cuentan con piscina exterior, trasteros, et

I haven’t worked with Cesium Ion. But it seems like you need to set details during upload your model in Cesium Ion. Check this link where OSM buildings features are embed inside the asset itself.

  • Regards

Thank you!! You were right, it was a file problem, I tried uploading them like .gltf and now I can access to it and change data.

1 Like