You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See also #2743 which is for particle nodes and #2744 for point lights.
Describe the project you are working on
The Godot editor 🙂
Describe the problem or limitation you are having in your project
Reflection probes currently don't feature a built-in LOD system.1
When you use many reflection probes, these can have a significant performance impact despite them being barely visible when they're in the distance. This is especially true with real-time reflection probes (update mode set to Always).
While Godot 4.0's clustered forward renderer makes it possible to use hundreds of reflection probes while keeping good performance, real-time reflection probes are still relatively expensive in comparison. Also, on low-end/mobile hardware, the mobile renderer can't display hundreds of reflection probes with good performance.
Even when using the default Once update mode, reflection probes can take a while to be rendered if you use dozens of them in a large scene (they're rendered in a seemingly random order). Adding a LOD system would allow for better prioritization of the probes to render first.
For the record, the Decal node (new in 4.0) features a built-in LOD system with configurable distance and fade distance.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Unfortunately, ReflectionProbe doesn't have any built-in way to fade it out progressively. Decreasing the Intensity property will make environment lighting darker, which means it's not usable for progressively fading out the reflection probe. Therefore, the only way to hide distant probes is hide the node.
Alternatively, the Intensity property can be set to 0, which disables reflections but keeps ambient lighting (either from the environment or a constant color configured by the user). This won't improve performance as much as hiding the node, but it still helps a bit while making pop-ins less noticeable.
To get smooth fade-ins, we'll have to tweak the Intensity property not to darken environment lighting when set to values below 1. (The current behavior may be a bug.)
Decreasing Intensity also won't affect environment lighting intensity, but this may be done by design (so that you can create fake area lights that don't affect reflections).
In this bug report, I included a MRP which may be useful for experimentation purposes.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Add the following properties to ReflectionProbe:
Lod Distance: The distance at which the reflection probe starts fading away.
Lod Fade: The distance over which the reflection probe should be faded.
Once the reflection probe is fully faded, it is disabled, resulting in increased performance.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Kind of. It's possible to play with reflection probe intensity and visibility with a script, but see the caveats above.
Is there a reason why this should be core and not an add-on in the asset library?
Implementing this LOD system in C++ would lead to better performance when using large amounts of reflection probes (hundreds or more).
Footnotes
ReflectionProbe already has a Lod Threshold property, but that property is about selecting the automatic mesh LOD level to use when rendering the reflection probe. Lod Threshold does not affect reflection probe visibility at a distance. ↩
The text was updated successfully, but these errors were encountered:
It does give the expected performance benefits. However, reflection probes currently don't fade with background sky reflections properly, and their ambient lighting is also not modulated by the Intensity property. Both need to be fixed before distance fading can look correct. I'll look into doing that in a separate PR.
See also #2743 which is for particle nodes and #2744 for point lights.
Describe the project you are working on
The Godot editor 🙂
Describe the problem or limitation you are having in your project
Reflection probes currently don't feature a built-in LOD system.1
When you use many reflection probes, these can have a significant performance impact despite them being barely visible when they're in the distance. This is especially true with real-time reflection probes (update mode set to Always).
While Godot 4.0's clustered forward renderer makes it possible to use hundreds of reflection probes while keeping good performance, real-time reflection probes are still relatively expensive in comparison. Also, on low-end/mobile hardware, the mobile renderer can't display hundreds of reflection probes with good performance.
Even when using the default Once update mode, reflection probes can take a while to be rendered if you use dozens of them in a large scene (they're rendered in a seemingly random order). Adding a LOD system would allow for better prioritization of the probes to render first.
For the record, the Decal node (new in 4.0) features a built-in LOD system with configurable distance and fade distance.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Unfortunately, ReflectionProbe doesn't have any built-in way to fade it out progressively. Decreasing the Intensity property will make environment lighting darker, which means it's not usable for progressively fading out the reflection probe. Therefore, the only way to hide distant probes is hide the node.
Alternatively, the Intensity property can be set to 0, which disables reflections but keeps ambient lighting (either from the environment or a constant color configured by the user). This won't improve performance as much as hiding the node, but it still helps a bit while making pop-ins less noticeable.
To get smooth fade-ins, we'll have to tweak the Intensity property not to darken environment lighting when set to values below 1. (The current behavior may be a bug.)
Decreasing Intensity also won't affect environment lighting intensity, but this may be done by design (so that you can create fake area lights that don't affect reflections).
In this bug report, I included a MRP which may be useful for experimentation purposes.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Add the following properties to ReflectionProbe:
If this enhancement will not be used often, can it be worked around with a few lines of script?
Kind of. It's possible to play with reflection probe intensity and visibility with a script, but see the caveats above.
Is there a reason why this should be core and not an add-on in the asset library?
Implementing this LOD system in C++ would lead to better performance when using large amounts of reflection probes (hundreds or more).
Footnotes
ReflectionProbe already has a Lod Threshold property, but that property is about selecting the automatic mesh LOD level to use when rendering the reflection probe. Lod Threshold does not affect reflection probe visibility at a distance. ↩
The text was updated successfully, but these errors were encountered: