Is it possible to have the skybox working properly in an exported GLTF / GLB?

Hi,

Sorry if this question has been already asked… didn’t find an answer.

Consider this playground with the skyMaterial as a skybox: https://playground.babylonjs.com/#E6OZX#221

I export it as a GLB file and import it into https://sandbox.babylonjs.com/

I get this, the camera is outside the skybox, and can’t really get inside

Is there a way to have the same skybox experience in the GLB file or is it something not doable?

Thanks,

Thibault

Typically, glTF/GLB files should not include the skybox in the file itself, at least not with the core spec. If you are using IBL for the sky, you can use this glTF extension to achieve it. I’m not aware of an extension that handles skyboxes the way you have it set up.

The Export to GLB button in the inspector automatically excludes certain types of skyboxes from the export already, but apparently it doesn’t cover SkyMaterial. Maybe we should add that to the exclusion code.

1 Like

Okay ! thanks for the explanation !

1 Like