I think I found a bug where adding a PBR Material to a mesh and then exporting it to GLB
caused the material to be removed from the exported file. If I switch the material to Standard
it works fine.
It is because PBRSpecGloss materials are not supported for export, you could use either a PBRMaterial or a PBRMaterialRough one to ensure your export works fine (a warning is emitted telling the mat is not supported in the console)
Hi, we are using BabylonJS to render fabrics. Now we want to export our scenes to GLTF/GLB which is working fine so far. There are some effects in fabrics which can be approximated very well using the SPEC/GLOSS workflow. Therefore it is absolutly necessary for us to keep our data in that workflow. So my question is if there is any realistic chance to see the export of GLTF/GLB to support the KHR_materials_pbrSpecularGlossiness extension? And even further. Could the import than support SPEC/GLOSS as well without converting it to METAL/ROUGH?
Thanks so far! Gabriel
Import (e.g. glTF loader) already supports spec/gloss. I’m a bit hesitant to add export support for spec/gloss as this extension is being deprecated by the Khronos 3D formats working group in favor of the KHR_materials_specular extension (which is still in PR).
For fabrics specifically, using spec/gloss is somewhat of a hack. You might consider using KHR_materials_sheen extension, but again it’s not merged yet (but it is very close). You can see an example here.