[sandbox] Fails to create default environment for .babylon files?

Hi all :slight_smile:
I’m unsure if this is a bug or intentional.

When loading a (singular mesh with material) .babylon file into https://sandbox.babylonjs.com/
the mesh is all black, no default lighting or environment is created.
sphere.zip (51.0 KB)

When loading a scene file with meshes, materials, lighting and camera, it of course works fine.
SceneFile.zip (52.1 KB)

However, in both cases, the “Select Environment” feature is completely ignored even when manually trying to add/change it.

On the other hand, loading a GLTF file, everything works perfectly like expected :slight_smile: .

Yes the environment button is for gltf IBL

I should hide it when we are not loading a gltf;)

Well no:) it should work for a babylonjs file as long as you are using a PBR material:)

Ahh okay, i’m just using a StandardMaterial in those files.

Would it be possible to add a check post-import if the scene contains a light?
And add a simple Hemi if not? :slight_smile:

It should be done by the exporter (you can always add one manually using right click on the scene in the Scene Explorer)

The goal of the sandbox is to present the data as is in order to help you debug. If we add a light automatically it could fool you :slight_smile:

Right, thanks for the clarification!
I thought it was primarily ment to check if the mesh exported/imported correctly, looked okay, etc :slight_smile:
I’ll manage to find a solution, no problem.
I just can’t have 10-20+ mesh files each import a new light into a scene :smile:

1 Like