Hi
I created simple GTLF model test with blender and substance painter: cube_test.zip (2.5 MB)
It works correctly here:
https://gltf-viewer.donmccurdy.com/
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.)
https://sandbox.babylonjs.com/
Any idea what could be wrong?
Kind regards,
Tommi
Hi @tlaukkan
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)

Edit;
Here it is with 4.2.0-Alpha / Preview cdn

1 Like
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:
material.occlusionTexture
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):
2 Likes
Thank you, that did it. Added ambient occlusion channel to substance painter and baked it.