Problem with instanced tilesets

A recent update to the Cesium plugin for Unreal (5.3) seems to have introduced a problem with instanced tilesets.

Included are two screenshots of the logs for when I tried to load the Rotterdam tree set, but similar sets that used to work fine in UE show the same problem.

You can also see they’re still working fine in our Cesium viewer. These are many tilesets that include trees, light posts, benches, bicycle storage, waste bins, etc, that we can no longer access in UE.

https://www.3drotterdam.nl/datasource-data/b9294d5b-79e0-4744-ac88-b61e3e90d5bc/tileset.json


Only some results of a quick investigation, as (hopefully helpful) pointers for those who might investigate this in detail:

The message is emitted at cesium-native/Cesium3DTilesContent/src/BatchTableToGltfStructuralMetadata.cpp at 688904b3e2f9b459759cf4fab7f3d5b84b4829bc · CesiumGS/cesium-native · GitHub

It is emitted because it cannot create a BatchIdSemantic object that is properly initialized (with a valid byteLength). The reason for that seems to be (from skimming over it) that it tries to access the componentType property in the feature table, and bails out if it doesn’t find it.

Indeed, the feature table of one if the I3DMs that is contained in that CMPT is shown here:

{
  "INSTANCES_LENGTH" : 22,
  "QUANTIZED_VOLUME_OFFSET" : [
    3925159.0,
    312556.0,
    5000477.0
  ],
  "QUANTIZED_VOLUME_SCALE" : [
    347.0,
    667.0,
    236.0
  ],
  "POSITION_QUANTIZED" : {
    "byteOffset" : 0
  },
  "SCALE_NON_UNIFORM" : {
    "byteOffset" : 132
  },
  "NORMAL_UP" : {
    "byteOffset" : 396
  },
  "NORMAL_RIGHT" : {
    "byteOffset" : 660
  },
  "BATCH_ID" : {
    "byteOffset" : 924
  }
}

The BATCH_ID does not have a componentType. Based on the I3DM specification, the componentType is optional and should default to uint16.


So I think that this is indeed a bug (but it’s not exactly clear where and when this was introduced)

1 Like

Thanks for looking into it, if it turns out we need to change something in our tiles I’d love to hear that as well of course.

From my current understanding, the tiles should be valid, and I suspect that this is a bug.

(Not sure who is familiar enough with the code to confirm that - maybe @Timothy_Moore ?)

In doubt, I’ll open an issue with a link to this thread, just to keep track of it.

@Marco13 thanks for the diagnosis; I will take a further look.

@Marco13 I want to confirm that the default BATCH_ID componentType is uint16? That’s how I interpret Table 2 at 3d-tiles/specification/TileFormats/Instanced3DModel/README.adoc at main · CesiumGS/3d-tiles · GitHub

You’re right, that should have been uint16 (I’ll fix it in the post as well)