Blender Exporter: Material duplicates

Hello,

I have a scene with 5 materials that I exported with the Blender Exporter 6.2.
It turns out that when I opened the babylon scene in the Sandbox, there are 6 duplicates of each materials.

All duplicates except one is actually linked to the mesh (i.e. if I change the color of the material, the color of the related mesh change in the Sandbox viewport).

Here is a screenshot of the Blender scene on the left, and the BabylonJS scene on the right:

And here is the log of the export:

I think that it might be a bug?

As a quick fix, to change the material type in Blender to Principled BSDF will work.

Pinging @JCPalmer

Basically, these materials ended up being baked. Since materials are baked at the mesh level, they cannot be shared as one mesh may just use it alone, another might use it on part of the mesh. Also, the UV might not be the same.

Looking at your material, it has a ShaderNodeAddShader node. This really has no mapping into a PBR material.

Conclusion: not a bug.

1 Like