Loading .babylon file created in Blender

I have a .babylon file created in Blender. I loads fine in the babylon sandbox.
I can load the meshes using BABYLON.SceneLoader.ImportMeshAsync() but when I try to load the scene using BABYLON.SceneLoader.LoadAsync(), it doesn’t load and I get this error:
“Not a babylon environment map”
Any suggestions?

Pinging @JCPalmer, feel free to share a source scene and .babylon that produces this issue, I’m guessing you’re using a .hdr or similar format environment map in your Blender scene, however Babylon uses its own format internally, and may not be converting the .hdr when deserializing the .babylon scene.

However I’d need a repro to make sure that’s the case :stuck_out_tongue:

I do have a feature to copy one of a few stock .env files in the exporter (I am currently in the middle of rethinking that,btw), but nothing is put into the .babylon file. If it runs in sandbox, then it is a good file, & I would look more at the code you have doing the loading.

I personally do not like importMesh. I see people using it, then loading everything in the file. If that is the case, the first thing I would try is to change to SceneLoader.Append., & plot your next move, based on what happens with it.

1 Like