EXT_mesh_gpu_instancing not working as thought?

I am trying to load a gltf that uses the extension “EXT_mesh_gpu_instancing” but I am not seeing multiple instances of my model, only one instance of the mesh spawns, when I should have 490. I have inlcuded the tileset.json text and the gltf file.

tileset.json

{
  "asset": {
    "version": "2.0"
  },
  "extensionsUsed": [ "3DTILES_content_gltf" ],
  "extensionsRequired" : [ "3DTILES_content_gltf" ],
  "extensions": {
        "3DTILES_content_gltf": {
            "extensionsUsed": ["EXT_mesh_gpu_instancing"]
        }
    },
    
  "geometricError": 1,
  "root": {
    "transform": [ ... ],
    "boundingVolume": {
      "region": [ ... ]
    },
    "geometricError": 1,
    "refine": "ADD",
    "content": {
      "uri": "linked_cubed_inst.gltf"
    }
  }

linked_cubed_inst.gltf (31.3 KB)

I am not sure where I am going wrong.

Any help would be greatly appreciated!

Thanks
Taylor

Hi @taymiser,

Cesium for Unreal does not yet support instancing, whether through EXT_mesh_gpu_instancing or i3dm. Keep an eye on these issues:

Kevin

Update for any future visitors: support for EXT_mesh_gpu_instancing and I3DM is now available in Cesium for Unreal v2.6.0. Feel free to try it out and let us know how it goes!

1 Like

Good job, everything works fine.
My working test GLTF2.0 example:
EXT_mesh_gpu_instancing.zip (1.9 KB)

I created 1 cube and add 3 instance positon with scale and rotation.

my model is Lat: 54,360352 Lng: 18,94043

This example view:

My local transform table:
Cube1
LogTemp: Warning: Location: 0.000000, 0.000000, 0.000000
LogTemp: Warning: Scaled: 1.000000, 1.000000, 1.000000
LogTemp: Warning: Rotated: 1.000000, 0.000000, 0.000000, 0.000000

Cube2
LogTemp: Warning: Location: 50000.000000, 0.000000, 0.000000
LogTemp: Warning: Scaled: 2.005295, 2.000000, 2.005295
LogTemp: Warning: Rotated: 0.981003, 0.000000, 0.193990, 0.000000

Cube3
LogTemp: Warning: Location: 100000.000000, 0.000000, 0.000000
LogTemp: Warning: Scaled: 3.000000, 3.000000, 3.000000
LogTemp: Warning: Rotated: 0.923880, 0.000000, 0.382683, 0.000000

I separated binary transform to testTrans.bin .

My question is?
Are you planning to expand this module?

  1. e.g. Replacing gltf model with another model from Unreal Engine?
  2. assigning metadata to instances.

OSM Test Forest in Cesium:




Hi @m.kwiatkowski,

I apologize for missing this.

Are you planning to expand this module?

  1. e.g. Replacing gltf model with another model from Unreal Engine?
  2. assigning metadata to instances.

We are working on supporting instanced metadata (#2) by first implementing EXT_instance_features. But this will only expose metadata that is already included in the instanced model. We don’t include capabilities to modify the metadata itself.

Unfortunately #1 is not a feature that’s on our roadmap. But it would help to know what your use case is so we have that context :smile:

My context :wink: .

  1. I would like to create only points (instant table point, scale ,rotation) Then assign an ID to each point.
    For example LAT: 54,360352 LON: 18,94043 :
    tree.zip (1.6 MB)

    In this example you can find baza_L12X2263Y1642_instanceTable.gltf and baza_L12X2263Y1642_instanceTable.bin.
    File baza_L12X2263Y1642_instanceTable.gltf does not have any model. This file have only instance coordinate point and ID.
  2. Now I can connect any model to this table. For example File baza_L12X2263Y1642_tree.gltf have model tree.gltf and baza_L12X2263Y1642_instanceTable.gltf.

But It would be good to create an array of models in Unreal Engine. Then assign a point ID to this array in UE! In this case we wouldn’t need to connect the model to the points. We would only use his ID.

Final tree system with LOD, looks great!


Now change BLEND mode to MASK mode, and add shadow.
I am sharing an example. Main json is in 0/L0X0Y0.json
tree.zip (1.6 MB)

Hi @m.kwiatkowski,

Sorry for the delay after you shared your context. Your screenshots look great! :star_struck:

I can see the value in reusing instance positions for different models. It isn’t something we’ve considered before, so I’m not sure what the UX for that would look like in the plugin. But we’ll definitely keep it in mind. Either way, I’m glad you were able to get something working for your use case! :smile: