GLB loading without normal or AO textures

Hey guys, this is probably pretty simple stuff but just can’t seem to find an answer in the documentation. We’re trying to import a test .glb file which you can grab here:

Dropping that into the sandbox shows up a model pretty much as we’d expect, namely with normal and AO textures included. However, loading it using the usual sceneloader code or asset manager seems to completely ignore those textures:
https://playground.babylonjs.com/#CU2WRV

Are those textures not included by default when 3D files are exported? I’ve checked and materials assigned to the mesh don’t seem to have anything plugged into their bump or AO slots. Is there some step we’re missing on load? Any help would be super appreciated.

Welcome aboard!

You need to setup an environment texture for a PBR scene to look good:

https://playground.babylonjs.com/#CU2WRV#3

2 Likes

Awesome, thanks! That’s definitely helped with the normals. The ambient occlusion map still hasn’t come through though.

Is the AO that’s shown in the sandbox being generated through Babylon somehow or is that coming from the AO textures in the glb file? I noticed you can switch the AO on and off in the sandbox settings.

This should display like in the sandbox, as I think I’m using the same environment map.

Nothing is created by the sandbox, everything is coming from the file, as in the PG. Could you show a difference between the PG and the sandbox?

My mistake, it looks like the environment texture did solve that as well. Thanks for the help Evgeni!