Babylon Editor - Light settings change on export

Hello! I really like how intuitive using the Editor versus the Playground can be because I know very little code.

One of the main issues I keep running into is exporting lights. I first set up the lights in the Editor, and then export a glb to view in either the Sandbox or Playground. When I import the glb, however, some lights are inverted, and the shadows/ambient occlusion which were looking good in the Editor are now gone or disabled.

Is there a way to include light, shadow, and rendering settings in the export while working between the different Babylon environments?

In Editor prior to export:

In Playground after export:

2 Likes

Pinging @julien-moreau

Hey @sguerrero !
Unfortunately, GLTF doesn’t support shadows at the moment. That means you’ll not have shadows available when exporting to GLTF: you’ll have to manually add shadows using code in your project :frowning:

For SSAO and post-processes they are also not supported by GLTF and you’ll have to manually add them :frowning:

Today, the Editor is optimized for a Babylon.JS workflow using the .babylon format. This format allows to store shadow genrators, metadatas of post-processes etc. so

I’m thinking about adding a better support of GLTF with the Editor but this requires to develop and use some custom extensions that can support of shadows and post-processes.
That means you’ll have to use these extensions in your project and what I’m afraid is that an official GLTF extension could be released in the future and be completely different from the one we would think about.

Maybe @Deltakosh would help us ? Or has ideas ? :slight_smile:

1 Like

Yeah going with gltf will be complicated for these features and even if the editor supports them you will not be in a better shape than with Babylon.js unless the industry decides to validate and support these extensions (which will take time)

1 Like

@julien-moreau I am trying to test the .babylon format, but the only options to export out of the Editor that I see are GLTF and GLB.

I do see within the project a scene.babylon file exists, but when I try dropping that into the Sandbox it does not load and I get a “Not allowed to load local resource:” error. Am I missing a step?

@sguerrero,

The sandbox shows you errors because it is missing the texture files. Please drag’n’drop the “files” folder with the .babylon file and everything will work :slight_smile:

You are right, the .babylon format is the default format used by the Editor, each time you click the button “Generate Scene” it’ll update the .babylon file you found in the project:
image

Also in the workspace preferences, if you enable the “Generate scene when saving project”, the final .babylon scene file will be generated automatically each time you save your project (using CTRL+S for example):

2 Likes

@sguerrero I forgot to talk about post-processes, unfortunately they are not yet supported in the .babylon format but we can try to work on it.

What is exactly your use of the Editor? Are you using the editor to edit your scene and then export the scene that will be used in another project? Or are you starting from an empty project?

For the second case (empty project) the workspace you created is itself a project that can produce production builds etc. for you and embeds automatically some tools used to typically manage post-processes. When you click on “Play” in the toolbar, it just runs your project and as you can see all post-processes are applied.

I am using the Editor to edit lights and shadows in my scene, to then export into a repository.

The pipeline right now is take assets created in Maya > export to Blender to add lights and additional texture maps > export to the Editor to tweak the lights and shadows (get it looking good), then export to Sandbox to check final results before being added to a repository.

When I click “Play” my scene doesn’t load in either the Editor or browser.