How to modify the textures of different models within 3D Tiles separately in UE5?

Current situation:

Five models were created in 3ds Max, each using a different texture (a total of five images).

Merge and export these 5 models into one FBX and convert it to GLB format.

3D tiles (including tileset.json and related tile data) were generated using tools such as 3d files tools or Cesium ion.

Successfully loaded the 3D Tile data using the Cesium plugin in Unreal Engine 5.

Core issue:
How to modify the textures of these 5 models separately in UE5? (That is, each model still maintains independent texture replacement capability, rather than global replacement.)

I checked the documentation and found that CesiumEncodedMetadata component can read 3dtiles parameters, but I am not very good at using it and do not have detailed tutorials. I want to modify the texture. There are 3 textures on the model, how can I modify them separately?

Hi @songhua,

Sorry for the delay on this response. Unfortunately, this can be tricky. When tiling models into 3D Tiles, multiple models may end up getting batched together into a single tile, so they must be distinguished from each other using Feature IDs. That would allow you to have more control over each model’s textures using the CesiumFeaturesMetadataComponent (explained in this tutorial).

The good news is that Cesium’s Design Tiler can assign feature IDs to separate glTF meshes in a way that keeps them distinguished from each other. The slightly less favorable news is that there are certain conditions:

  • If a glTF node has a set name, then the Design Tiler will assign all its meshes / primitives the same feature ID… meaning that the Unreal material could act upon it as a single distinct model.
  • If a glTF has multiple nodes, though, they will treat them as separate meshes, even if they have the same name.
  • However, you can circumvent the above by assigning EXT_structural_metadata to each node (see Assigning Metadata to glTF objects in the spec). Although the feature IDs will still be separate for each node, you can assign all the nodes in a single model the same metadata property. Then, you could retrieve this property in the shader to distinguish between the models. For example:
"nodes": [
    ...
    {
      "name": "A node with metadata",
      "extensions": {
        "EXT_structural_metadata": {
          "class": "model",
          "properties": {
            "id": 1
          }
        }
      }
    }
  ]
}

I hope those pointers help! Let us know if you have any additional questions.


image

Thank you for your reply. When I was checking the Cesium website, I saw that the gltf format can be added with metadata to enable Unreal for Cesium to recognize it. I am stuck on how to write metadata in gltf. My models exported to gltf in cityengine, 3dmax, or blender do not have metadata. Do you know how to write metadata into these models? Thank you, my English is not good, please forgive me.