0
\$\begingroup\$

I have an interior scene with some windows. The light is from an OmniLight near the ceiling, default environmental light from outside, and a desk lamp with emission. Without baking light, the scene looks like this:

no baking in Godot 3.2.3

Consistent with the documentation for emission, the desk lamp is not affecting the surrounding objects. I want to bake the light to see the lamp's effect and to support low end hardware.

I followed the baked lightmaps tutorial and set the BakedLightmap's extents to encompass the entire room. After baking, the scene looks like this:

baking with all lights on in Godot 3.2.3

I can see the lamp's light, as expected, but now everything is too dark. It is unclear to me from Godot's documentation if scenes include indirect light without baking. I have tried this with the OmniLight set to bake "all" and only indirect light.

What am I missing here?


UPDATE 10 April 2021:

The problem seems to be that baking environmental light isn't working as expected. I was using Godot 3.2.3; now I'm using 3.3rc8. That gives the BakedLightmap options for environmental light, but the problem remains.

I began troubleshooting by shuttering all the light sources as follows:

  • Hid the OmniLight, and set its "Bake Model" property to "disabled"
  • Unchecked "use in baked light" for the desk lamp
  • Set the default environment's background and ambient energy to 0
  • Set the BakedLightmap's "environment mode" to "Disabled", verified "Min Light" is set to pure black, and cleared the "Light Data"

When I run the game, I get exactly what I expect--a black screen. If I bake light under these conditions, I continue to get a black screen, as expected.

Here's where things get screwy. When I set the BakedLightmap's "environment mode" to "Scene"--with the environment still without any light--I get dim illumination.

Scene light in Godot 3.3rc8

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Is env light blocked by the walls on 1st screenshot? Check it by disabling the env light. \$\endgroup\$ Apr 10, 2021 at 4:18
  • \$\begingroup\$ As long as I don't bake lighting, env light seems to work as expected. I varied the energy value and observed the effects inside the room. \$\endgroup\$ Apr 10, 2021 at 23:01

2 Answers 2

1
\$\begingroup\$

I believe your first picture has a lot of environmental light (that blue hue is sky light). Also I believe either your light or your meshes are not set to cast shadows (which, by the way, I would give you problems with light being so close to the ceiling).

Baking the lights is giving you shadows/occlusion. That makes it darker.

Also the BakedLightmap has a recently added (Godot 3.2.4 beta 6) environment_mode set by default to Disabled. Meaning it takes no environmental light. Set it to Scene.


The BakedLightmap seems to ignore ambient light, and also ignore background energy. To get the black screen, with environment mode set to Scene, you need to either make Sky, Sun and Ground black, or set their respective energies to 0. I do not know if this is intentional.


Godot 3.3.1 released including fix for this issue. See Maintenance release: Godot 3.3.1.

\$\endgroup\$
2
  • \$\begingroup\$ Thank you for responding. Shadows are enabled on all the objects, including the OmniLight. I moved the OmniLight down, downloaded v3.3rc8, and set environmental_mode=Scene. I was using 3.2.3. There's definitely something unexpected going on when I try baking environmental light, but I haven't been able to fix it yet. I'm updating my question with what I've learned so far. \$\endgroup\$ Apr 10, 2021 at 23:05
  • \$\begingroup\$ I opened an issue on Github: github.com/godotengine/godot/issues/47785 \$\endgroup\$ Apr 11, 2021 at 2:36
1
\$\begingroup\$

At least in Godot Engine . . .

Real time environmental light affects all geometry equally without regard for occlusion. However, light baking does consider occlusion. Therefore, an interior scene will not receive as much light from the environment.

My source is the discussion for this issue. I could not find this distinction discussed in Godot's documentation.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .