Closed PlumCantaloupe closed 6 years ago
Is it this model from sketchfab? It may be that the specular glossiness PBR materials don’t support shadows yet.
Yes, from Sketchfab. That is a good point. I'll test by exporting an object myself later today in Blender, and report back.
Yeah looks like that was it thanks. Using the MetalRoughness node in export lead to no issues in rendering.
Hm, yeah here's a live demo showing the lack of received shadows pretty clearly: https://bug-gltf-specgloss-shadows-lbxbxojcha.now.sh/
/cc @takahirox any idea if this is something we can patch in the spec/gloss ShaderMaterial?
Oops just saw your comment above. I'll open a new issue on three.js for the spec/gloss issue then.
Thanks!
Some brief research into the gltf export shows specGloss is not part of the GLTF 2.0 core anyhow which may explain some things (ext. 'KHR_materials_pbrSpecularGlossiness' required).
Yeah, metal/rough is the core default but all the Sketchfab exports use spec/gloss so we do try to support it. It's just harder to implement in three.js so there are some edge cases like this.
I can't seem to get self-shadowing working on GLTF models. I can on the same model, using the .obj format instead though.