Localized ambient light

Godot Version

4.6

Question

So, I am trying to make a 3D level where you can easily move inside and outside, the outside being on the rim of a space station. In order to mimic the lighting in space, I had the environment give no ambient light so I can have completely black shadows. The problem is, I also have the inside area which is now much harder to light up and in general darker. Is there a way I can make ambient light only in a small area?

You can either animate the environment ambient when entering/exiting specific rooms or you can override it per-material in the material shader by writing to IRRADIANCE from the fragment function.

Alright, I’ll try the animating, thank you!

1 Like