Bake Lightmaps Without Overriding WorldEnvironment?

Godot Version

4.3

Question

So I’m trying to create a 3D scene with both indoor and outdoor areas. I like the evenly-distributed lighting that the WorldEnvironment provides, and would like to just bake some small lights around other parts of the scene. Specifically in this example it’s a castle type area, and I’d like to only bake the lighting for torches inside the castle. Whenever I bake the lighting however, even if I set it to ignore the WorldEnvironment, it makes all of the interior scenes far darker than they were before.

Here is a before and after example of what I’m having trouble with.

This is before baking the lightmap.

This is after baking the lightmap.

Is there a way to just bake the static OmniLight of the torch there without it removing all the ambient lighting provided by the WorldEnvironment? The only alternative I can think is to just leave the OmniLights as non-baked and dynamic, but I can’t do that because it would ruin performance.

Have you tried messing with the LightmapGI’s Environment Mode? It has a Custom Color option that may serve your use case, though it’s simple.

I have tried that, but that’s not how baking works with the Environment of the scene. The reason it lights everything evenly in that first example image is because when the WorldEnvironment is being applied in real time, it doesn’t account for level geometry. If it did, that would just be too taxing to perform in real time.

When you do a lightmap bake, it applies the WorldEnvironment in a way that does account for level geometry. So even if I take the Custom Color option and turn the energy for it all the way up, it just makes the outdoor areas brighter. Indoor areas are unaffected.

Here is an example of the scene with the Environment setting changed to Custom Color, with the highest possible energy level, and colored red so the affect is as visible as possible. There is artifacting in the bounces because I’m just using the Low setting here to speed up baking time.

What I’m looking for is a way to either make the darker areas of the bake be brighter, or a way to just keep the WorldEnvironment as something rendered in real time, and thus lighting the scene evenly like before. My intention here is to only bake the lighting of the torches, as shown in the first examples.

1 Like