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 light occlusion results in sudden deep blacks #62673

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

Vulkan: SDFGI light occlusion results in sudden deep blacks #62673

WickedInsignia opened this issue Jul 3, 2022 · 4 comments

Comments

@WickedInsignia
Copy link

WickedInsignia commented Jul 3, 2022

Godot version

4.0 Alpha 11

System information

Windows 10, GTX1080, i7 6700

Issue description

SDFGI will regularly produce noticeable pitch-black patches in areas of occlusion.
These are persistent regardless of setting but can be slightly reduced by decreasing Cascades and increasing Min Cell Size.
They occur regardless of intersecting or watertight geometry, but seem most egregious with intersecting geometry that is organic/not built with faces at 90 degree angles that align with global space.

The effect is highly noticeable in detailed PBR scenes since the deep blacks will also affect normal maps, creating many spots of extreme contrast. This might be resolved if occluded areas had softer transitions or probes inside watertight geometry were disregarded or took less priority than those outside of objects.

All shots taken at default SDFGI settings.
SDFGI_BlackArtifacts01
SDFGI_BlackArtifacts02
SDFGI_BlackArtifacts03
SDFGI_BlackArtifacts04
SDFGI_BlackArtifacts05

Steps to reproduce

Should be noticeable in most scenes but is most visible on PBR materials with normal maps.

Minimal reproduction project

HERE

@Calinou
Copy link
Member

Calinou commented Jul 3, 2022

This is expected with the current implementation of SDFGI occlusion. This is why you should only enable SDFGI occlusion if you actually need it. In other words, you need to balance whether preventing leaks is worth the black spots and the performance impact. A lot of AAA games won't care about light leaks that much instead 🙂

In the meantime, I suppose the amount of occlusion performed could be made adjustable. This way, corners won't be darkened as much. This will make light leaks more noticeable though, so it needs careful tweaking depending on the scene.

SDFGI is planned to get a rework eventually, but I don't think this will be done before 4.0 is released.

These are persistent regardless of setting but can be slightly reduced by decreasing Cascades and increasing Min Cell Size.

This is a good thing to do if you don't need highly detailed GI, as it also improves performance (especially when the camera moves).

@Calinou Calinou changed the title SDFGI: Light occlusion results in sudden deep blacks. Vulkan: SDFGI light occlusion results in sudden deep blacks Jul 3, 2022
@WickedInsignia
Copy link
Author

Occlusion was disabled for all these examples.
The ability to adjust the contrast of darker areas would be great, since SSAO and SSIL could be activated to darken areas further where necessary.

Combining SDFGI with VoxelGI lessens the effect but is probably not ideal in regards to performance.

@WickedInsignia
Copy link
Author

Minimal reproduction project added. Just some simple meshes with textures, SDFGI at defaults. Should be enough to show that occlusion artifacts occur pretty frequently and deeply affect normal maps. Becomes much more visible with Auto Exposure.

Overall, an option to lessen this effect (without the use of SSIL or VoxelGI) should be provided, whether that manifests as smoothing out the transition between dark areas to light or something else.
Few games made with Godot are likely to have enough props and PBR effects to diffuse these shadows and plenty of Godot games/examples use a low-poly flat material aesthetic.

@Calinou
Copy link
Member

Calinou commented Jul 5, 2022

Becomes much more visible with Auto Exposure.

The current autoexposure implementation is flawed (like the one in 3.x), so I recommend not relying on it: godotengine/godot-proposals#3080

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