Skip to content
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

Background energy changes not only the intensity of light, but also the brightness of the background itself #71813

Closed
mishkarch opened this issue Jan 21, 2023 · 3 comments

Comments

@mishkarch
Copy link

mishkarch commented Jan 21, 2023

Godot version

3.5.1, 3.5.2rc2

System information

Windows (I think it's not matter)

Issue description

Background energy in Environment changes not only the intensity of light, as stated in the description, but also the brightness of the background itself, in particular, the procedural or panoramic sky.

This was noted in passing in the original post #47785, but was not taken into account as the discussion progressed.

This is a problem, because if I want to completely get rid of the sky light and completely control the color of the ambient light, there is no way to do it without getting a completely black sky panorama.

For example, I want to suppress the cold skylight and end up with a completely black panorama.
Sprite-0001

Sprite-0002

The minimum reproduction project shows that even with the ambient light turned off completely, we do not get a completely black shadow if we do not reduce background energy.

Sprite-0003
Sprite-0004

Interestingly, even in 4.0, despite the ability to select ambient_light_source, no combination of settings can still completely suppress the lighting from the sky, without using the background energy multiplayer slider, which, again, changes the brightness of the sky itself.

Steps to reproduce

Open the representation project, change the background energy in the inspector.

Minimal reproduction project

background_energy.zip

@Calinou
Copy link
Member

Calinou commented Jan 22, 2023

This is done by design. Background energy is exactly that – it multiplies the intensity (brightness) of the background. This in turn affects its ambient and specular light.

To decrease ambient light generated by the sky only, decrease Sky Contribution and nothing else. This works in both 3.x and 4.0.

If you're seeing too many specular reflections on your materials, this hints at their roughness property not being set high enough. (You could also set Metallic > Specular to 0.0 on them.)

The minimum reproduction project shows that even with the ambient light turned off completely, we do not get a completely black shadow if we do not reduce background energy.

This is because there's still some reflected light visible. Godot 3.x doesn't offer separate control for ambient light and reflected light, but 4.0 does. 4.0 allows you to disable reflected light from the sky without disabling ambient light from the sky.

@clayjohn
Copy link
Member

As Calinou says, part of the improvements made in 4.0 were to improve the control you have over background lighting. In Godot 3.x you are limited to controlling ambient light (AKA indirect diffuse) and the brightness of the sky (background_energy). You do not have a multiplier to control the brightness of indirect specular reflections. In 4.0 you now have that control you just have to set the reflection source to disabled as well.

@mishkarch
Copy link
Author

Thanks for the clarification, I seem to understand how it works and the difference between 3.x and 4.0. Due to an absurd oversight, the roughness was indeed set to less than 1, after increasing to 1 the desired effect was achieved. I think after finishing the documentation everything will be in order.

@akien-mga akien-mga modified the milestones: 3.x, 3.6 Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants