How to save the dynamic lighting of mesh as PNG?

Hi guy
I need a lot of lighting in my scene. To save performance, I can’t use dynamic lighting. I know I can use blender to get a fake lightmap, but this is too tedious and I need to adjust a lot of uv work. Is there a way to save the dynamic light source of the mesh as PNG so that I can bind these saved PNG to lightTexrure? :slightly_smiling_face:

1 Like

It will be the same in Babylon and your UVs will also need to get correct for that. Maybe @CraigFeldspar can share his plans on baking ? :slight_smile:

Well… :slight_smile: blender’s auto UVWrap is currently being implemented in order to achieve exactly that : baking lights onto textures in BJS.
However, as @sebavan mentionned, you will get the same UV layout as you would have gotten into Blender. What part is actually painful about your UV layout ?

Thanks, in fact, is mainly reflected in the huge workload. When there are a lot of lights in the scene, I have to bake the lightmap in blender, then bind to the material one by one and adjust the uv channel. Also, when the mesh in the scene is adjusted, I have to do the same process all at once. As you can see, it’s not easy to maintain adjustments to the scenario.

That’s why I wanted to implement the automatic lightmap feature. :grinning:

1 Like

#1 thing I need now. Anyone know of a quicker way to accomplish this in 2022 with Babylon JS and Blender? I’m now looking at another solution instead of BabylonJS, testing shortly. The time component is really painful. Binding to the material one-by-one and adjusting to prep for a lightmap bake is a very time-consuming process. It’s too much for my workflow.

I’m reviewing another option that involves Unity’s lightmap baking, and yet I can still tap into TS scripts, Three JS samples, etc. I hope I don’t get stopped by this point. I’ve looked high and low for a solid working solution. With no luck so far.

Why not using the great @MackeyK24 unity exporter for Babylon ? it does all this automagically

1 Like

Introduction to the Unity Toolkit | Babylon.js Documentation same thing?

1 Like

image
I see his name listed in this path. :handshake: That confirms it. Thanks for sharing.

Thank you @sebavan!

I worked through the setup process and what not to get a rotating cube. Interesting how the backing class works with the .ts script.

My first test based on the author’s appreciated tutorial video
http://www.babylontoolkit.com/videos/GettingStarted.mp4

Thanks again!

2 Likes