Passing attributes to 3D tiles from Collada/gITF models

I would like to use 3D Tiles as a way to add one or more buildings to my Unreal app. These buildings have metadata like a buildingID and name. Ion will import gITF and Collada (.dae) models to 3D tiles and I would like to be able to read these attributes in the resulting tile in my app. I have noticed a 3d tile has a Tag array (array of strings) which might be a good structure to pass data from the original model to the streamed tile. However I can not figure out how to setup my 3d model so metadata would be read by the Asset importer. Can you provide the details on which attributes are read by the importer that will become part of the 3d tile so that my app can read them too?

Hi,

To better understand your use case and what you are trying to achieve with your asset, could you please explain what kind of metadata you are wanting to store in your asset and how you are planning on using this metadata?

Thanks,
Ankit

Sure, we would like to use a unreal line trace to let a user click on a building (3d tile) and we imagine being able to cast the hit object to a 3d tile (which is our building) and then read an ID from the building. This will be use as a key into a database where we can retrieve data on the building and display it to the user. If we use the Ion assigned ID we need to build a lookup and that complicates an automated pipeline, but if we could save the client’s building ID in some attribute of the 3d model (collada or gitf) such that the cesium importer would recognize it and carry it forward into the 3d tile it creates, then when that 3d tile is accessed in unreal we can read out that attribute. My guess is cesium intended the Tags array of the 3d tile for this, otherwise why does that exist?

Hi,

Thanks for providing the information, it is extremely helpful. This would depend on which tiler you are using for your use case. Currently the 3D Model tiler does not support storing metadata with the assets. However, for your use case if you use the 3D Capture option, that tiling pipeline should be able to preserve the metadata. The building IDs will need to be stored in the KML file.

Thanks,
Ankit

Can you expand on your recommendation? We are uploading a kmz of a collada model in the cesium ion Add Assets panel. It does not offer the option to select a Tiler and uses 3D Model by default. So how can I select the 3D Capture option and where is the spec for the syntax of adding custom fields, e.g. building IDs, to the KMZ file (I assume kmz or kml are both the same as they are related. If I’m wrong let me know)

Hi,

Since since you are uploading a different type of dataset you aren’t seeing the 3D Capture options. Yes you are correct kml and kmz are related. KMZ is one or more KML combined into a single zip file. You could just rename a .kmz file to .zip and unzip it if you wanted to.

KML has a tag called ExtendedMetadata that lets you add metadata. The data is per placemark and you can add that tag to store your attributes. For example I added the following after a placemark tab like so:

<Placemark>
		<ExtendedData>
			<Data name="My custom feature">
			<value>Hello world</value>
			</Data>
		</ExtendedData>

And then once you upload the tileset to ion and load it in stories. You can click on the asset, It should show up like the following:

image

Thanks,
Ankit

I’m not sure that ‘stories’ applies to an unreal integration. We load the 3D tile containing the model using the Cesium Ion Window in unreal to select it and add to level, then we can select it in the Editor viewport and in gameplay. The object details show the Tag array so if the method you describe results in ExtendedData showing in this array then this is the perfect solution.

This worked! But I observed an interesting limitation. I tested a model with ExtendedData exactly as you offered. Then our modeling dept sent me a model where they used a completely different kml tag arrangement and that worked too! I guess the nesting and key naming are ignored?

For completeness, Inside the kmz are 2 things: a folder /models and a file “doc.kml”. Inside the doc.kml is the ExtendedData tag. Here are the 2 variants that ended up behaving the same

<ExtendedData>
   <Data name="Building_Name">
      <value>Manaret</value>
   </Data>
   <Data name="Building_ID"><value>0213474533_SC07_002F_0001</value></Data>
</ExtendedData>
<ExtendedData>
<SchemaData schemaUrl="#kml_schema_ft_Manarat">
<SimpleData name="Building_Name">Manarat</SimpleData>
<SimpleData name="Building_ID">0213474533_SC07_002F_0001</SimpleData>
</SchemaData>
</ExtendedData