First, it’s surprising that clone.makeGeometryUnique() is mandatory
Second, when clone.makeGeometryUnique() is not called, the mesh will actually render transparent, but will still be pickable ! (Move the mouse and see the hover on the Not Working PG )
Regarding the first one, it is the expected behavior.
When cloning meshes, the geometry object is shared between the clones. Because the thin instance vertex buffers are part of the geometry object, all clones see the same buffers.
So, if you change them for one mesh, it’s changed for all of them. In your PG, you only see the thin instances corresponding to the blue mesh because their data is copied to the vertex buffers last.
Picking still works because it’s based on bounding boxes calculated on the CPU when you set the buffers, and they are not stored in the geometry object but in the mesh itself. So, even if visually you only see the blue instances, picking continues to work.
Thanks @Evgeni_Popov for your fix and explanations !
Ok. Maybe adding a warning would make sense ? For example when calling Mesh.thinInstanceSetBuffer, checking if the Mesh has shared geometry (used by another Thin Instance) and warn that Thin Instance must run on unique geometry ?
Well, it’s not an error per-see, it could be a valid use-case to use the same thin instances for multiple meshes (for eg, displaying the same set of thin instances but at different locations, by just updating the postion/rotation of the meshes that share the thin instances).