Problem with loading gltf file

I have a problem with loading a gltf file.
If I upload it to https://sandbox.babylonjs.com/ I see both albedo and ao textures.

But when I load the same file into my project. I do not see ao texture. I tried various types of loading BABYLON.SceneLoader.Load, BABYLON.SceneLoader.Append, BABYLON.AssetsManager. In the debug console, I see that the mesh connected by a material that has two albedo and ambient textures.

Can someone tell me where to look?

Can you post a demo on the playground? Did you check the network panel of the browser to see if the maps are being loaded correctly?

Please find the uploaded model in to playground
https://www.babylonjs-playground.com/#KIAV9H#1

As you can see there is no ambient occlusion here, however when I upload the model into sandbox everything is ok

1 Like

If it works as expected on the playground, comment parts of your code until you find the culprit. Are you sure you’re not running into a CORS issue? Check the network tab of your browser.

brunobg, thanks for helping me.
Please see two screenshots from playground and sandbox.
I don’t have problems with CORS.

As you can see, on playground the AO layer is not visible.

Hey & welcome!

You have to add an environmentTexture, just this.Sandbox is doing this for you
https://www.babylonjs-playground.com/#KIAV9H#3
Closer to sandbox behaviour
https://www.babylonjs-playground.com/#KIAV9H#2
Cheers!:beers:

2 Likes

Hey MarianG,
Thanks a lot! It really helped.