How do I parse Lights.json?

Hey, everyone!

As I mentioned a while back, the Babylonjs editor generated a large amount of files that I’d rather not have to deal with, but I think it works great as a visual editor for placing 3d objects!

Downloading the entire scene as a GLB file is extremely convenient when most of the objects in the scene are just static objects that won’t need any individual code. My only problem is the “GLTF Lights” checkbox.

The workflow seems to work great aside from the lights not loading!

Is there a way to parse the resulting Lights.json easily right out of the box or should I write a function that copies the properties from the “Lights” object in the json over to actual Babylonjs objects?

Thanks in advance!

1 Like

So far the glTF exporter does not export lights but I guess we could add it

Pinging @kcoley and @bghgary

1 Like

Hi @SometimesIMakeThings. It’s something on the backlog, but I can bump up the priority on this: glTF Serializer: Add support for KHR_Lights · Issue #4387 · BabylonJS/Babylon.js · GitHub

2 Likes

Thank you very much, I appreciate it! It’s one of the only things I’ve been typing out for static meshes in the onSuccess since GLB seems to handle the material properties and all that really well. It doesn’t bother me too much though, it’s a fantastic pipeline either way.

Thanks again!

2 Likes