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

LightmapGI doesn't take CameraAttributes into account when baking indirect light in lightmaps (and only partially for direct light) #74139

Open
Tracked by #56033
Calinou opened this issue Mar 1, 2023 · 1 comment

Comments

@Calinou
Copy link
Member

Calinou commented Mar 1, 2023

Godot version

4.0.rc6

System information

Fedora 37, GeForce RTX 4090 (NVIDIA 525.85.05)

Issue description

LightmapGI doesn't take CameraAttributes into account when baking indirect light in lightmaps (and only partially for direct light, i.e. when using Static bake mode).

DirectionalLight3D bake mode set to Dynamic

Regardless of the presence of a CameraAttributes resource in the LightmapGI's properties, this is the result after baking.

Screenshot_20230301_015822

DirectionalLight3D bake mode set to Static, LightmapGI with CameraAttributesPhysical

This works as expected, but changing exposure parameters then baking again doesn't affect light brightness at all even after rebaking lightmaps (be it aperture, shutter speed, ISO or multiplier).

Also note that using a CameraAttributesPractical results in the same lighting, which is unexpected.

Screenshot_20230301_020238

DirectionalLight3D bake mode set to Static, LightmapGI without CameraAttributesPhysical

This is overly bright as expected (which shows that the presence of the CameraAttributes is taken into account by LightmapGI somehow).

Screenshot_20230301_020248

Steps to reproduce

Minimal reproduction project

physical_light_camera_units_lightmap.zip

@clayjohn
Copy link
Member

clayjohn commented Mar 1, 2023

I'll take a deeper look soon. But it doesn't look like there is a bug here. The Camera attributes that is used by GI (both Lightmap and Voxel) is only used for adjusting the dynamic range when baking. At render time, the exposure will be adjusted to match the CameraAttributes that is used at render time.

You want the bake-time exposure to be as similar to the render-time exposure as you can to reduce banding.

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

2 participants