VXGI Lighting Issue

I’ve been working on this for hours since yesterday and I’ve still come to no solution, so I’m left with asking for help :frowning:

I’m working on a house/architecture and I have a main room and two rooms with limited lighting (one with no windows and a doorway, the other with a closed door and a window opposite of the sun direction).
When using a directional light, all three rooms receive lighting (meaning through the walls, not bounced or under any cracks). After doing some tests.

To verify it’s not a mesh/uv/etc problem, I used BSP and default spheres with multiple materials to test the lighting. I attached 3 images showing the light problem. Also, spotlights will bounce light through objects/walls but not with BSP (spotlights; directional lights mess up everywhere).

With VXGI disabled:

With VXGI enabled:

With VXGI enabled and directional light:

This is inside a room composed of 1 additive BSP, 1 subtractive BSP, 3 spheres, 1 spotlight.
Rotating the directional light changes the light in the room but obviously that shouldn’t happen since there’s no space for it to enter. There are no backfaces obscured from viewer (there are the six faces inside the room and six opposite faces around it)

Is there something I’m missing, or are these just issues with VXGI that require numerous cheats to avoid, such as multiple processing volume changes and faked lighting and etc?

I don’t know if I’m correct but unreal engine 4 don’t draw the backfaces of static meshes and will light get tru. Make sure your walls have thickness!

Backfaced Mesh Display:

If this isn’t thickness, I don’t know what is.

Does increasing the amount of cones help the problem at all?

That only helps in making some bounces look less dingy (16-256); it does nothing for my issue.

How thick is the wall ingame? And are you using distance field shadows or cascaded shadow maps?

Just tested it myself in a small map, 8 cones gets a lot of light bleeding in an enclosed space, while 64 cones gets rid of the problem 100%. Should also ask, are you using the normal VXGI build, or the newer VXGI-dev branch? It’s been updated a bit in there, and hasn’t been merged into the normal VXGI branch just yet.

Everything I’m using and steps to recreate scene and issue: (Note: requires VXGI)

1 BSP Additive box
1 BSP Subtractive box
1 Basic sphere (optional)
1 Directional Light
1 Spotlight (optional)
1 Atmospheric fog (optional)
1 Post Process Volume

  1. Place additive box in a blank level
  2. Place a smaller subtractive box inside the additive box
  3. Place the directional light into scene, then change it to a movable object and enable VXGI Indirect Lighting
  4. Place Post Process Volume into scene, then change it to unbound and enable VXGI>Enable Diffuse Tracing.
  5. (Optional) place sphere and spotlight inside of the subtractive box and enable VXGI for the spotlight.
  6. (Optional) change the material of the subtractive box and sphere for color variation.

Simple setup that gives additional lighting where none should be. I’ve been trying to tweak Directional, Spotlight, and PostProcessVolume values around but I’ve yet to find anything that doesn’t disable the light that I actually want.

I am using dev branch, but as I recall, I still had the problem in the 4.7 version

Are you importing the cube from blender or making one out of brushes in unreal engine? maybe vxgi doesn’t work with brushes at all!

vxgi works better with brushes, less chance of backfacing issues. It does not matter, problem persists.

I redownloaded and rebuilt the current build and performed additional tests, and the 4.75 build does not use BSP…I think at all; I couldn’t get the brushes to work with or without vxgi on them (at least not Additive&Subtractive brushes).
However I performed more tests and the problem still persists in that build as well.

To recreate it this time without BSP, I used the basic box mesh. As for thickness, I just scaled on two axises (leaving thickness at the other axis, which is really thick), then duplicated and moved/rotated until I got six different faces making a box.

I’ll bring this to the attention of someone on the VXGI dev team. I don’t know what could be going wrong here.

Cross-posting my reply about this from Github.

This is an issue with cascaded shadow map sampling that’s performed in VXGI voxelization. If you set “r.VXGI.DebugMode 3”, you should see that there are many lit voxels near the edges of the inner box (at least that’s what I see). Basically, the voxelization shader samples the coarsest cascade first, and it’s just way too coarse.

I fixed the voxelization code in our internal dev version to start with the finest cascade. As a temporary workaround, you can reduce the light’s Dynamic Shadow Distance.