-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LightmapGI ignores ambient light when using the Scene environment mode #83485
Comments
I can confirm and reproduce this bug. |
From what I can gather from the code, this is intentional. The lightmapper doesn't use the ambient light from the To enable dynamic ambient light again, all you have to do is remove this I did a quick Google search and it seems that both UE5 and Unity behaves in the same way for baked light. For realistic lighting this makes sense to me, but you don't always want realism. Maybe there is some other consideration that I'm not aware of. It's worth mentioning that with both SDFGI and VoxelGI, ambient light is still used. I've found that I can kind of fake ambient light in a room with an OmniLight3D with high range, zero attenuation, very low energy, very low indirect multiplier and no shadows. |
I get a feeling this issue doesn't have anything to do with #56138, and is actually requesting what was known as Min Light in 3.x. There's a PR reimplementing it for 4.x, but it didn't get much community support: #50572 @permelin The issue here is that the custom ambient light color should be baked. It shouldn't be applied in real-time, otherwise your lightmap will look washed out and you'll be applying two ambient light sources at once (sky baked onto lightmap + your custom color). Also, if you are baking lightmaps, it's because you want ambient light to behave correctly. In real life, ambient light doesn't apply uniformly on all surfaces – this would make things glow in the dark 🙂 If you want "minimum lighting" to be applied everywhere, something like #50572 is more suited. I really don't recommend using it though, as using any kind of minimum lighting will result in the impossibility of having truly black light levels anywhere in your game world (leading to reduced contrast). Most of the time, it's preferable to increase your lights' range or add more lights instead (known as "unmotivated light sources").
Actually, SDFGI doesn't take custom ambient light colors into account. VoxelGI has significant light leaking issues too, even in indoor scenes. @tbillington The link has expired, can you upload the reproduction project again? |
Mine is probably a slightly different issue, then, because I expect custom ambient color to replace sky contributions. |
This is only the case if sky contribution is exactly |
That should definitely be documented or changed. Also, setting ambient source to Color does not behave as expected. It seems to only use sky as source in that mode. |
Godot version
v4.1.1.stable.mono.official [bd6af8e]
System information
Godot v4.1.1.stable.mono - macOS 14.0.0 - Vulkan (Forward+) - integrated Apple M1 Pro - Apple M1 Pro (10 Threads)
Issue description
The
LightmapGI
node does not seem to pick up on ambient light set in the environment.As a result, when using
LightmapGI
for baked lighting the scene is extra dark compared to dynamic, non-baked lighting.LightmapGI Hidden (Ambient light is showing)
LightmapGI Shown (Clicked
Bake lightmaps
, Environment=Scene
, Ambient light not present)The issue seems possible related to this previous issue #56138.
Steps to reproduce
main.tscn
WorldEnvironment
nodeLightmapGI
nodeLightmapGI
node to make sure it's up to dateVisual difference also observable in play mode.
Minimal reproduction project
I couldn't upload the repro here because the environment file I'm using pushed the filesize over 25MB allowed by github.
I uploaded it to the open source send.vis.ee service instead, please let me know if there is a better option. The only downside is the file will only be available for 10 downloads or 3 days, so if someone needs access I will need to re-upload it.
https://send.vis.ee/download/2925d81f52da8f12/#V6Ibyn2eYMGJDelxWsIneQ
The text was updated successfully, but these errors were encountered: