Blender Exported GLTF rendered some materials partly black in scene

142 Views Asked by At

Lighting: (The 2nd picture is using ambient light at 0.8 intesity. )

I tried ambient, Directional and Evironment lights, but no result.

Here is the Armature with all the materials in blender:

enter image description here

Here is how the model renders using GLTFjsx or GLTFLoader:

enter image description here

2

There are 2 best solutions below

0
Ibra On BEST ANSWER

Thanks to @DonMcCurdy.

Solution

I had to convert my charcter's material type from spec/gloss to metal/rough.

Convert from spec/gloss to metal/rough before editing in Blender, requires Node.js:

npm install --global @gltf-transform/cli
gltf-transform metalRough yourModel.glb yourModel.glb
1
Don McCurdy On

I can't see much of the material's configuration in Blender, but it doesn't appear to be a Principled BSDF node as required for export. Most of Blender's materials — and certainly any complex node graph — cannot be exported to any format. For whichever format you're exporting to, you'll need to consult the docs, and in the case of glTF those options are covered at:

https://docs.blender.org/manual/en/latest/addons/import_export/scene_gltf2.html

I would also strongly recommend testing the model first in a viewer like https://gltf.report/. Display bugs can very easily be related to your code or lighting.