Already achieve to export to obj file; however, the material file serialization function OBJExport.MTL(scene.meshes) throw following error when used:
Uncaught TypeError: Cannot read properties of undefined (reading ‘specularPower’)
at Function.e.MTL (babylon.serializers.min.js:1)
Oh. Excuse me. Now I understand. Documentation shows that the Mat function do not let more than a mesh at te same time. My mistake. So sorry to be a PIA
Well no really. Documentation shows that massive material export cannot be done, at least with that function. So, have no solution to export more than 1 mesh with different types of material
Can you not just iterate through your the meshes and then just export each separately?
The functions returns a string, so in theory you can take that string each iteration and build on it in whatever format you’d like. I would assume some sort of json.