I created simple GTLF model test with blender and substance painter: cube_test.zip (2.5 MB)
It works correctly here:
BabylonJS sandbox shows it black: (PBR_Spheres.glb works correctly in sandbox so the sandbox is operational for me but my model fails to show correctly for some reason.)
Any idea what could be wrong?
Looks related to either the sandbox itself or the bjs 4.2.0-Alpha build.
Here is what i get on 4.1 at least. (note, slight difference from gltf-viewer is because of lighting)
Here it is with 4.2.0-Alpha / Preview cdn
The problem is your occlusion (ambient) map: the value is read from the r channel, but your r channel is all 0.
The GLTF spec explicitely states this:
The occlusion map texture. The occlusion values are sampled from the R channel.
So I think Babylonjs is right in this regard and displays everything black.
[…] The threejs viewer adds a direct light, that’s why it’s not all black. Just disable the light and everything will become black (see the “Add lights” setting):
Thank you, that did it. Added ambient occlusion channel to substance painter and baked it.