Open WickedInsignia opened 11 months ago
Given how VoxelGI works with a lot of approximations, this may not be entirely fixable.
Static geometry is baked so it could technically be possible to perform some kind of supersampling at bake time (at the cost of longer bake times), but we have few people knowledgeable with VoxelGI.
Yeah totally understandable. If there's any way for it to determine whether a surface/normal is where the direct light is hitting and bouncing from, there might be some way to tell it not to spread light further onto that surface and simply bounce it away. I expect preventing light bleeding around corners to be more tricky since you're working with a single voxel in that area, there's no way to create a sharp "corner." Either there's a line of light voxels in the shadow area, or a line of dark voxels in the light area.
Regardless I'm seeing it "radiate" light further around corners than it should. I don't see any reason (as an artist, not as a developer who deeply understands VoxelGI) why the slightly lighter voxels at the top edge of this building can't be as dark as the ones directly below them:
This also seems to be a situation of dark voxels inside the area that's being hit with light (the entire roof of that building) without negative effects. Again just an artist so I wouldn't be too surprised if I completely misunderstand what the limitations of improving this are.
Godot version
4.2 Dev 6
System information
Windows 11, Nvidia RTX4070ti, AMD Ryzen7700x
Issue description
Voxel GI spills light into shadows in an unrealistic manner, creating a "glow" effect around their edges and propagating light across surfaces that should not be affected by the bounces they're creating. This gives meshes an unintentionally waxy appearance, since this effect is similar to subsurface scattering. It also spills light around corners into areas unaffected by direct light, causing light to leak around sharp angles.
VoxelGI at default settings (128 subdiv). The Glow post processing effect is disabled, so the light leaking into the shadow the structure is casting is caused by Voxel GI:
This is not resolved by higher resolutions (512). Here we can also see the light bleeding around sharp angles more clearly, near the top of the structure:
We can see the effect in the Voxel lighting view (128 for this example):
Changing Normal Bias can reduce the effect, but causes further leaks in other areas (128):
When we use Blender's Cycles as a ground truth example, there is no light bleeding into the shadows. Only light bouncing onto surrounding surfaces:
Thus, the optimal result would be as follows. Light shouldn't bleed into shadowed areas on the surface they are cast against nor should it bleed around corners. It should only bounce onto other surfaces:
Steps to reproduce
Simply use VoxelGI with any dynamic light (directional, spot, omni) with shadows turned on.
Minimal reproduction project
VoxelGI_GlowingShadows.zip