• Godot Help
  • Shadows/Lighting change depending on the location of the player

Godot Version

4.1

Question

An issue has been plaguing my game where the lighting is inconsistent based on where the player moves. Certain shadows only activate when I’m near, and will deactivate after a bit of time.

Almost all lights except the street lights are not baked in, because there is a system for turning off and off light switches, and for you to lose power. Neither of those would be possible if I baked the lighting

I have a World Environment node set up, but removing it does not solve the issue

I am running forward+ and within the light limit

this is what it looks like. it happens everywhere.

I remember similar issues in my project. When I used a lot of point lights shadows behaved very strange. They sometimes appeared and sometimes disappered and sometimes were totally broken (even though I had only some lights, totally below limit). What helped in my case was to mess with shadow atlas settings. Since I used many point lights, but didn't required high shadows quality, I added more subdivisions to allow rendering more shadows (with worse quality, but that wasn't an issue in my case). Maybe you also need to adjust your shadow atlas settings.