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

Directional property on LightmapGI node causes invalid pixels. #95875

Closed
EMBYRDEV opened this issue Aug 20, 2024 · 4 comments · Fixed by #95888
Closed

Directional property on LightmapGI node causes invalid pixels. #95875

EMBYRDEV opened this issue Aug 20, 2024 · 4 comments · Fixed by #95888

Comments

@EMBYRDEV
Copy link
Contributor

Tested versions

4.3.stable

System information

Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 32.0.15.6070) - AMD Ryzen 9 7950X 16-Core Processor (32 Threads)

Issue description

Switching on directional lightmapping can lead to invalid pixels that when paired with autoexposure can completely corrupt the scene.

LightmapGI non-directional:
image

LightmapGI directional:
image

Directional with moved camera:
image

Steps to reproduce

  1. Download project: https://github.com/perfoon/Abandoned-Spaceship-Godot-Demo
  2. Enable autoexposure in the Hangar's world environment
  3. Bake lightmap using OIDN (havent tested with JNLM)
  4. Observe lack of artifacting
  5. Bake lightmap with Directional enabled.
  6. Observe massive bloom and severe artifacting when rotating camera.

Minimal reproduction project (MRP)

https://github.com/perfoon/Abandoned-Spaceship-Godot-Demo

@clayjohn
Copy link
Member

I wonder if this is the same as #81556. We could be getting NaNs that get propagated by the auto exposure

@EMBYRDEV
Copy link
Contributor Author

I wonder if this is the same as #81556. We could be getting NaNs that get propagated by the auto exposure

Potentially, I'm getting some similar looking specular in some parts of the scene
image

@Calinou
Copy link
Member

Calinou commented Aug 21, 2024

The NaN propagation issue related to the lightmap no longer occurs with #95888, but that PR still seems to struggle with baked light on alpha-tested materials. Baking with Directional enabled still creates a brighter overall lightmap with flickering occuring when Glow is enabled:

Directional OFF Directional ON
image image

Probes also have negative-looking artifacts, but these are present regardless of whether Directional is enabled:

Directional OFF Directional ON
image image

Dynamic objects themselves look fine though, so maybe this is just an issue with the visualization.

Edit: The scene gets extremely bright (but not NaN) as I save the scene, or switch back to the main scene after baking in the Hangar scene:

image

The issue is connected to the first ReflectionProbe node in Hangar. Hiding it fixes the issue, even after switching back to the main scene.

The issue occurs even if the ReflectionProbe's ambient mode is set to Disabled and its Intensity is reduced to 0.01. However, it does not occur anymore if you switch its update mode to Always, which uses a real-time filtering method for (ir)radiance. This means the culprit is likely the high-quality filter mode for reflection probes, which is used for the Once update mode.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Aug 21, 2024
@BlueCube3310
Copy link
Contributor

BlueCube3310 commented Aug 22, 2024

but that PR still seems to struggle with baked light on alpha-tested materials. Baking with Directional enabled still creates a brighter overall lightmap with flickering occuring when Glow is enabled:

These look like ringing artifacts that occur due to sampling the SH lightmap's lower hemisphere, which has negative colors.

Edit: A way to mitigate this has been described in https://web.archive.org/web/20160313132301/http://www.geomerics.com/wp-content/uploads/2015/08/CEDEC_Geomerics_ReconstructingDiffuseLighting1.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants