godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.15k stars 20.21k forks source link

Reflection Probe differences between Always and Once cause Materials to look radically different #82177

Open Menithal opened 12 months ago

Menithal commented 12 months ago

Godot version

v4.1.1.stable.mono.official [bd6af8e0e]

System information

Godot v4.1.1.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon RX 7900 XTX (Advanced Micro Devices, Inc.; 31.0.21031.1005) - AMD Ryzen 7 5800X3D 8-Core Processor (16 Threads)

Issue description

AlwaysVsOnce

When I add an reflection probe to my node tree, my materials start looking off. If I play around with the settings of the reflection probe's and set update mode from Once to Always, the materials look correct and one to one with how they'd appear in Blender Eevee. (see above vs below) BlenderTest

If set to the Reflection Probe to Once, the roughness maps feel like are sampled up to intervals of 0.125-0.25. (from 0.0-1.0), and skipping gradients which causes stuff that shouldn't be so reflective to be very reflective. This happens both with the Standard and ORM version of the godot default materials.

Expected:

Once vs Always should behave similarly, even if one of them is updated when called/ modified vs the other every time the frame is updated.

Steps to reproduce

  1. Create scene with an matrice of balls with incrementing values of roughness and metallicness, a simple hdri environment image, and a reflection probe.
  2. Observe Result.
  3. Swap Reflection Probe update mode to Always
  4. Observe Result.
  5. Compare Results, see difference.

Minimal reproduction project

ReflectionProbeTest.zip

bitsawer commented 12 months ago

Seems like disabling ReflectionProbe cull mask layer 1 makes the behavior more similar between the two update modes. Alternatively, setting Ambient mode to Disabled has some effect, too. I'm not an expert on ReflectionProbe, so I can't say if the behavior is intentional or a bug.

Menithal commented 12 months ago

Seems like disabling ReflectionProbe cull mask layer 1 makes the behavior more similar between the two update modes. Alternatively, setting Ambient mode to Disabled has some effect, too. I'm not an expert on ReflectionProbe, so I can't say if the behavior is intentional or a bug.

Yeah, this would be making it to equal to as if the Reflection probe wasnt there. The intention though is to have the reflection probe however, so it still is a bug unfortunately.

More precise would be "Once" mode for Reflection Probe does not match the material characteristics if the Reflection Probe wasnt there, or set to Always.

Calinou commented 12 months ago

This is expected, as the way the roughness mipmaps are updated differs when using the Always update mode for performance reasons.

See https://github.com/godotengine/godot-proposals/issues/2934, which could be designed to allow changing the update mode independently from the roughness mipmap filter method. Using the Always update mode with the high-quality filter would generally be too expensive, but it should be viable to use the Once update mode with the real-time filter if you wish. (This would allow reflection probes to show up faster when initially loading a scene.)

Also, you seem to be using an HDRI with very bright spots, which is a bad fit for a game engine – it's hard to generate good roughness maps for those without having visible "fireflies" on those. Try enabling HDR Clamp Exposure in the Import dock after selecting the HDRI texture in the FileSystem dock.

The real-time filter generally handles roughness mipmaps with very bright spots better, but it's less accurate when using HDRIs designed for game engines.

Menithal commented 11 months ago

which could be designed to allow changing the update mode independently from the roughness mipmap filter method. Using the Always update mode with the high-quality filter would generally be too expensive, but it should be viable to use the Once update mode with the real-time filter if you wish. (This would allow reflection probes to show up faster when initially loading a scene.)

This explains it. There should be a decoupling from the filtering method vs timing. My expectations was to keep consistency between the two modes with the difference being one is done once , the other is done on every frame instead of it also setting the method of filtering. Not have the mipmapping filtering method change, because ... oh boy... does Once "high-quality" filter look awful on those hdri images.

A clearer documentation on this feature would be great. Alternatively, perhaps we could have more controls how the hdri is perceived by the "high-quality" mipmap