id property of materials are not unique. This breaks serialization/deserialization. Please refer to below PG for example of GLB which has multiple different materials but share the same
id property. I have encountered many other glbs where multiple materials have same
This becomes a problem when deserializing meshes and associating the corresponding material. BJS uses the first material with matching material
This seems arbitrary. It means upon deserialization, the associated material can be completely wrong. For example, with the GLB in my case, deserialized meshes are associated with the wrong material and is missing their albeto textures.
I suggest BJS makes sure the material
id after loading a GLB is always unique.