It seems that after using
BABYLON.Mesh.MergeMeshes() the PBR material does not appear in the Inspector’s Scene Explorer, although they still exist in the merge objects (see the left panel):
Also, it can happen that these materials, after using
BABYLON.Mesh.MergeMeshes() are not rendered; the objects using these materials will appear in black on the screen. For instance, I am in a situation where the materials are working on Chrome but not on Firefox:
However, before hand, I was in a situation where I had to merge more objects, and then I had the same “black object” issue in Chrome.
One important thing to note is that if you go in the material properties of one of the black objects in the inspector and change one of its PBR parameter (let’s say “roughness”), then the black objects are updated and rendered as they should be. Hence it seems to me that BabylonJS forgot about these materials and need the user to move a parameter to make BabylonJS aware of that material.
You can find a better history of the issue and details I gather in this thread:
(I thought it was best to open a new thread that focus on the black objects issue).