Asset missing from BabylonJS CDN breaks scene.createDefaultEnvironment()

The asset https://assets.babylonjs.com/core/environments/backgroundGround.png appears to be unavailable (down since approximately yesterday evening).
This causes severe visual issues in any project that relies on scene.createDefaultEnvironment(), since that helper function references this asset by default for the ground texture.

When initializing a scene with the default environment, the ground material fails to load properly, resulting in a broken or visually corrupted ground surface.

1 Like

Apologies if I go a bit rogue here but the actual bug should be that there are calls to a remote server from within the Babylon lib. :open_mouth:

I have just checked quickly: there is several hits for “assets.babylon” in Babylon.min.js as well as calls to at least typekit and twitter (if I remember correctly) according to the network tab.

2 Likes

Seems to be fixed at the moment, but I agree with you (@Joe_Kerr) - the real issue is that the Babylon library makes remote calls in the first place.

FYI for Electron users: Phew, crisis averted :slight_smile: You can intercept requests easily. I have just quickly used this: const isAllowed = test_url.startsWith("file:") || test_url.startsWith("devtools:"); Works! Gives a 404 for undesirable requests. N.B. It seems you have to use the filter object. Null disabled it for me.

We always provide a solution so the user does not have to provide them if they do not want to. That being each call is UP to the user.

For instance it is up to you to not call createDefaultEnvironment without a texture for the ground. If you do not want the default one, simply provide your own:
IEnvironmentHelperOptions | Babylon.js Documentation

It is all for user convenience.

2 Likes

@Deltakosh
This issue appears to have resurfaced.
Assets from the Babylon asset storage are once again inaccessible.

Unfortunately, were unable to update all our projects immediately to use custom textures.

Apparently azure is having a bad day
All our sites are down

cc @docEdub to confirm

Yes, Azure is having issues that are affecting us.

Would anyone happen to have the built version of babylon.ktx2Decoder.js so we can try including in our build and not rely on the CDN?

As a stopgap, you can consume babylon.ktx2Decoder.js from here: https://cdn.jsdelivr.net/npm/babylonjs-ktx2decoder@8.33.4/babylon.ktx2Decoder.js

1 Like

You might also need to locally serve the codecs used by the ktx2decoder. You should check out this doc page:

Ok azure is back online folks. We should be good

2 Likes