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

Allow user to prefer SDFGI reflections when both VoxelGI and SDFGI are used #4811

Open
WickedInsignia opened this issue Jul 5, 2022 · 2 comments · May be fixed by godotengine/godot#63468
Open

Comments

@WickedInsignia
Copy link

Describe the project you are working on

Artistic explorations with Godot's rendering capabilities, with the goal for clean high-grade graphics.

Describe the problem or limitation you are having in your project

When SDFGI and VoxelGI are used together, Godot seems to prefer VoxelGI's reflections.
VoxelGI reflections show many artifacts and inaccuracies, especially when not using multiple bounces. SDFGI shows fewer artifacts and is capable of a higher quality at even very reduced settings.

There are benefits to using VoxelGI and SDFGI together in the same scene, which almost always result in a higher-quality appearance of GI than either could achieve alone. The reflections are the only downside of this technique.

Voxel GI reflections, default settings (no 2nd bounce is used). Reflections are predominantly black and show inaccurate colour, especially on metallic surfaces.
VoxelReflectionOverride_VoxelReflections

SDFGI reflections. Colours are accurate and reflections have a high fidelity.
VoxelReflectionOverride_SDFGIReflections

VoxelGI and SDFGI combined. Godot seems to prefer to use VoxelGI's reflections in this scenario, resulting in deep inaccurate blacks.
VoxelReflectionOverride_VoxelandSDFGIReflections

VoxelGI with two bounces. The deep blacks are resolved, but at a performance cost.
VoxelReflectionOverride_VoxelReflections2Bounces

A closeup of VoxelGI with two bounces. Streaking artifacts are visible, and are much more present with single bounces. This artifact is egregious in many situations, but appears acceptable here due to the complexity of the model.
VoxelReflectionOverride_VoxelReflectionsCloseup

A closeup of SDFGI's reflections. No streaking artifacts, and the only downside is the general "mushiness" of the SDF mesh (which VoxelGI still exhibits to a degree anyway).
VoxelReflectionOverride_SDFGIReflectionsCloseup

Describe the feature / enhancement and how it helps to overcome the problem or limitation

A slider inside the VoxelGI settings to let the user dictate how much VoxelGI's reflections contribute to the scene would be enough to resolve the issue. In the case that the slider is set to 0, SDFGI's reflections take over entirely.
In the situation that SDFGI can no longer display reflections (such as when the cascade draw distance is exceeded) VoxelGI reflections be used as a fallback, since their inaccuracy is less visible at a distance.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

I'm an artist and not a programmer, so all I can propose is a slider in the VoxelGI settings.

If this enhancement will not be used often, can it be worked around with a few lines of script?

See above.

Is there a reason why this should be core and not an add-on in the asset library?

VoxelGI and SDFGI are both core graphics components of Godot.

@Calinou
Copy link
Member

Calinou commented Jul 5, 2022

If #3012 was implemented, you could do this by enabling only indirect lighting from SDFGI. Otherwise, VoxelGI reflections would be preferred (as it's fully real-time, and not just semi-real-time like SDFGI).

VoxelGI with two bounces. The deep blacks are resolved, but at a performance cost.

I found that VoxelGI's Use Two Bounces property didn't have any performance impact when I last tested it: godotengine/godot#55646

@WickedInsignia
Copy link
Author

WickedInsignia commented Jul 5, 2022

@Calinou my biggest concern was the artifacts exhibited in #50842, which are extremely noticeable and simply don’t occur in SDFGI.

I’d also bring up #4812. Sometimes two bounces isn’t desirable due to the effect it has on the scene.

If both of those issues were fixed this probably wouldn’t be necessary.
Ultimately, I made this proposal in an attempt to offer more artistic control. Regardless of the amazing tech, there are many oddities in Godot’s rendering that require artists to exercise a bit of ingenuity to get around.

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

Successfully merging a pull request may close this issue.

2 participants