GLB Export from babylon: Unsupported material type: node

Hi, Im having a problem . Im trying to export a babylon scene to glb using:
GLTF2Export.GLBAsync(scene, “exportedProduct”).then((gltf) => {
gltf.downloadFiles();
});

the exporter is giving me a warning: unsupported material "node"

the materials in the scene is using a custom node material:
https://nodematerial-editor.babylonjs.com/#XKQ1FK#15

using serializers: babylonjs-serializers@4.2.0

according to docs here node materials are supported as well as pbrMetallicRoughness

Please advise. thanks!
-Anupam

Welcome aboard!

Node materials are not supported by the glTF exporter as glTF does not support Babylon node materials.

From the doc:
image

The “Node” hear means scene graph node I think, not node materials.

2 Likes

Hi Evengi, thanks for the note. Ah thats too bad, I got excited. :slight_smile: Im wondering if there is a way to convert a node graph to a GLTF compatible description. EG: just take a snapshot of the PBRMetallicRoughness inputs and format it for GLTF. even if it means omitting certain features such as time varying properties, etc. Or perhaps the only solution is to move away from node materaisl and use non-node based PBRMetallicRoughness .

I’m afraid node materials can’t be exported to glTF, it’s too complicated. If you need that export to work, you will indeed need to use the regular PBRMaterial class for your materials.

1 Like

GLTF do not support custom materials so it would be impossible to make it.