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

Use Physical Light Units completely break the lighting #68052

Closed
krupitskas opened this issue Oct 30, 2022 · 9 comments
Closed

Use Physical Light Units completely break the lighting #68052

krupitskas opened this issue Oct 30, 2022 · 9 comments

Comments

@krupitskas
Copy link

Godot version

v4.0.beta3.official

System information

Windows 11, Vulkan, Nvidia 3060M, 526.47 driver

Issue description

When I enable "Physical Light Units" in the project settings and adding world environment node, I receive complete white scene and I dont know how to get rid of it
Before node beign added:
image
After addition:
image
After configuring physical based sky for background:
image

Steps to reproduce

Load any object on scene
Enable Physical Light Units in the project settings
Add world environment node

Minimal reproduction project

No response

@Calinou
Copy link
Member

Calinou commented Oct 31, 2022

Related to #67310.

cc @clayjohn

@clayjohn
Copy link
Member

What are your exposure settings? Note that the default DirectionalLight3D brightness matches the sun, so you need to properly expose the scene or it will appear over bright

@krupitskas
Copy link
Author

What are your exposure settings? Note that the default DirectionalLight3D brightness matches the sun, so you need to properly expose the scene or it will appear over bright

So DirectionalLight3D itself works good, I can control lux'es and kelvins and scene looks nice. Problem appear only after WorldEnvironment node addition.
Exposure is Linear and 1
Any tonemap modes give the same result and changing exposure value doesnt help.

@clayjohn
Copy link
Member

@krupitskas Exposure settings are set in the CameraAttributes in the WorldEnvironment.

You need to add a CameraAttributes resource to your WorldEnvironement when using PhysicalLightUnits. Otherwise the default settings will appear way too bright

@krupitskas
Copy link
Author

Ah yeah. It's fixed that. Thank you. I actually didnt see it at all under the all environment parameters.

image

I think its quite undesired behaviour when you switch to physical light units and receive complete white scene. Maybe we can add alert triangle to the Camera Attributes field to ask user not to forget to set this up?

@clayjohn
Copy link
Member

I think its quite undesired behaviour when you switch to physical light units and receive complete white scene. Maybe we can add alert triangle to the Camera Attributes field to ask user not to forget to set this up?

That could work. The only challenge will be that you can also set the CameraAttributes on the Camera3D itself, in which case the error would be wrong to show.

@krupitskas
Copy link
Author

I would like to contribute here actually to get into godot development!
Can we have something like default CameraAttribute parameters if nothing set nowhere?
If we can't then if there a WorldEnvironment node with Environment set but no Camera Attributes set - everything white
If we add Camera3D, set same environment - camera3d also white. But if we add CameraAttributes to the Camera3D, then viewport will be white but Camera3D Preview will be fixed.

I fill like there can be this two solution or default CameraAttributes or alert triangle

@clayjohn
Copy link
Member

I would like to contribute here actually to get into godot development! Can we have something like default CameraAttribute parameters if nothing set nowhere? If we can't then if there a WorldEnvironment node with Environment set but no Camera Attributes set - everything white If we add Camera3D, set same environment - camera3d also white. But if we add CameraAttributes to the Camera3D, then viewport will be white but Camera3D Preview will be fixed.

I fill like there can be this two solution or default CameraAttributes or alert triangle

There is a default CameraAttributes in the editor's WorldEnvironment. Which is why everyone looked fine before you added a WorldEnvironment node to your scene.

The issue here comes from adding a WorldEnvironment without setting a CameraAttributes. From the engine's perspective, if a user adds a WorldEnvironment, but not a CameraAttributes resource, then the engine has to assume the user does not want to use a CameraAttributes at all.

I think the primary solution here is having actual documentation for using Physical Light Units. As it is, physical light units is an advanced feature and it requires more manual handling of light information (which is why it is disabled by default). I have documentation in progress, but I keep getting sidetracked by other tasks.

A configuration warning could be useful, but it will take some thought to decide how it should be exposed and what it should say

@clayjohn
Copy link
Member

Fixed by godotengine/godot-docs#6390

@clayjohn clayjohn added this to the 4.0 milestone Feb 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