Blender to Sandbox workflow and Lightmaps Export in .glTF

I’m working with Blender and the Sandbox to create a scene, and I need to export the final file in .glTF format. The first problem is with the Lightmaps; usually I place them manually in the Sandbox using the Lightmap Channel, is there a way to set up the material il blender and export in .glTF to preserve the Lightmaps when i import in the Sandbox?

Same thing with the final export, even if I place all the Lightmaps in the Sandbox when i export in .glTF the Lightmaps are missing. Is the .babylon format the only way to preserve Lightmaps?

Second problem: is there a way to create materials directly in the sandbox? If not, how can i create in Blender a standard material and not a PBRMaterial?

And for last, can I enable fly mode in the Sandbox (wasd+mouse)? The current view navigation mode is not very optimal for large scenes.

Pinging @PirateJC

Hey @Alec

Thanks for all of the questions!

For clarification, when you say you’re using lightmaps, you’re talking about your scene lighting baked into textures correct? And your lighting information is separate from the base color of your object?

I’m not sure this is as advanced as you’re looking for, but I typically do 1 of two things:

1 - Bake my lighting with color information into the base color texture. I then use ambient occlusion for finer lighting detail in the scene.

2 - I understand you’re using the Sandbox, which is limited in capabilities by design. It will read cameras from gltf files, but you cannot add dynamic cameras to the sandbox easily. This is where you might benefit from checking out the playground. The playground can function very similarly to the sandbox with little effort, but also adds the full capabilities of Babylon into the mix. So you can easily add the Universal Camera to your scene which will allow you to navigate around the scene as you’ve described. The other advantage to using the Playground is that you can unlock the Node Material Editor capabilities. This tool essentially functions as the shader graph in Blender. You can add your own textures, including baked light maps, and combine them to create the exact material that you want.

I understand this is a little more work than what you’re looking for, but hopefully would get you to the end result.

One other thing:

Looking at the Blender documentation of gltf export support, they do not list separate light map textures as supported in their exporter.

https://docs.blender.org/manual/en/2.80/addons/io_scene_gltf2.html

This is why option 1 above is the fastest Blender -> path that I personally use.

I was about to also tell you to check the CornellBox/cornellBox.glb lightmapped in this page but my code has to be updated.

So waiting that I fix this in Github, here the update example loading a gltf file and assigning lightmaps (with a simplified code by the way): https://playground.babylonjs.com/#ADPQFC#9

It is based from these sources.