I’m seeing redundant materials being output into GLTF files. To reproduce:
-create a scene
-create a single material with a simple color, give it a name
-create 10 nodes, each with a single mesh, and each node using that same material instance you created above
-save the scene to GLTF
-open the GLTF in a json editor
-You’ll see in the “materials” section 10 identical materials, all with the name you supplied above
-Each mesh will have a “material” json propery pointing to its own copy of the material, i.e. 0, 1, 2, …
My application has to create a large number of small meshes, but all using the same material. I tried adding that material instance to the Scene.Library but that did not prevent de-duping.
Is there some other way to register the materials with the scene to make sure they don’t get duplicated? These dupes are really blowing up my gltf file size.