Serialize Scene Environment Map Issues

I’m testing out various ways to save a scene that I can then load later on. I was able to save a scene and load it, but when I use an environment texture I end up getting an error stating:

[11:05:25]: Not a babylon environment map

I’ve encountered this issue before when using environment maps. It was happening intermittently and I could never figure out the issue. The map works fine in the scene. Is there something else I need to modify to get this to work?

For reference this is how I’m loading the Babylon file:

const res = await SceneLoader.LoadAsync(




     this.scene = res;


If there’s a better way to load this I’d like to know as well. So far this seems to work fine outside of the environment map.

Hello! Can you provide us with a playground repro so we can help you further? :slight_smile:

Yes, I should’ve included that from the start. Here is a sample of the scene I’m testing for saving:

That includes the environment map used for the skybox and lighting. The “prototype level” is the meshes.

This is the playground for loading a file I saved from the playground up above:

I know the playground is using Babylon 5.0 and it seems to work fine. Everything shows up. Oddly enough if I switch to 4.2 half the meshes appear offset and a lot smaller. I experienced something similar to that when using the AssetManager.

I suppose I could update to Babylon 5.0 in my own project to see if that resolves the issue but if the way I’m approaching the load/saving of the scene is incorrect I’d like to know. Thanks.

So I tried the same Babylon file I have hosted (the saved scene) in my project and I had no issues with the environment map but I still got the issue with the rest of the meshes being offset and stuck in the ground.

edit So I updated to Babylon 5.0 and it’s working just fine. I’ll test it a bit more, but if that’s the fix I’m fine with that. I plan on using Babylon 5.0 anyways so this just moves up the timeline of when I’ll add it.

1 Like

Yup you should rely on 5.0 :slight_smile:

1 Like