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

Vulkan: SDFGI has artifacts on off-axis geometry due to bias being too low #62671

Open
Tracked by #55327
WickedInsignia opened this issue Jul 3, 2022 · 2 comments
Open
Tracked by #55327

Comments

@WickedInsignia
Copy link

WickedInsignia commented Jul 3, 2022

Godot version

4.0 Alpha 11

System information

Windows 10, GTX1080, i7 6700

Issue description

Geometry that is not flat on the X, Y or Z axes will create noticeable lighting artefacts and sudden unrealistic shifts in lighting.
This occurs with geometry that is modeled with polygons at any angle other than flat in X, Y, or Z in global space, and any objects that are rotated to become off-axis.

This is reduced but not resolved by reducing Cascades count and increasing Min Cell Size. These adjustments simply reduce the frequency but they still persist on a large scale.
VoxelGI can not be used since it has its own (arguably more severe) problems with off-axis geometry.

On-axis geometry:
SDFGI_AxisArtifactsBug01

Off-axis geometry. Notice the extreme bright spots, sharp tonal shifts and strongly occluded corners:
SDFGI_AxisArtifactsBug02
SDFGI_AxisArtifactsBug03

Steps to reproduce

  • Import any geometry that is modeled with angular polygons that don't perfectly align with the X, Y and Z axes.
  • Alternatively, rotate a cubic model so it is out of alignment with the global space.
  • Example geometry is provided in the example.

Minimal reproduction project

SDFGI_OffAxisArtifactsBug.zip

@Calinou
Copy link
Member

Calinou commented Jul 3, 2022

Like with VoxelGI, you need to increase the normal bias and probe bias values if you have large spans of off-axis geometry. That said, artifacting becomes less noticeable as you add complex textures to your materials.

Allowing the rotation of the entire SDFGI grid could help in those cases, but this depends on how your level is designed. (For reference, this is already possible with VoxelGI by rotating the node.)

If this kind of artifact is absolutely unacceptable, then consider using lightmaps or faking GI with secondary light sources instead (that is, lights with high range, low energy, no shadows and Specular set to 0).

@Calinou Calinou changed the title SDFGI: Artefacts on off-axis geometry Vulkan: SDFGI has artifacts on off-axis geometry due to bias being too low Jul 3, 2022
@WickedInsignia
Copy link
Author

WickedInsignia commented Oct 19, 2023

Unfortunately normal bias doesn’t really help, it just shifts the same problem into other areas.
Pushing probe bias to the point that the issue is acceptable nullifies the value of GI almost completely.
This is a fundamental issue with SDFGI, changing bias doesn’t solve it.

Complex textures can help, but dark probes inside of geometry will “radiate” strong darkness across the normal map of PBR materials, effectively mooting the point of using complex materials to disguise it.
This kind of boxy geo is one thing but SDFGI absolutely will not play nice with a sphere or large curved surface.

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