In this scene, the character is completely surrounded by wall meshes, yet the light still leaks through.
There is light-bleed in your scene due to Lumen.
- View Mode > Lumen > Lumen Scene
- Move around and look for:
- beams of light that shouldn’t be there (appearing/disappearing).
- light bleeding in from the bottoms of walls (or even tops and sides).
- Solution 1
Use light-blocking geometry
- Create a cube or other static mesh primitive
- Scale and position behind your visible mesh to block the light from your environment.
- Solution 2 : Edit material
- Find your material instance in the Content Browser
- Right-click and choose “Find Parent” until you find the master material.
- Open the master material in the material editor
- Note the input pin for “Pixel Depth Offset”. If there is a connection to this pin, disconnect it by ALT-Clicking.
- Click “Apply”.
If solution 1 worked for you, you just have to remember that polygons are only visible from one side, and DirectionalLights are only blocked by one side of the poly. You can test this by setting the light to “Movable” and you’ll see which polygons aren’t blocking ANYTHING.
If the material solution worked, the problem was that Lumen doesn’t support Pixel Depth Offset yet.
I have no association with either of these guys, but I learned this from watching these guys on Udemy.
- Stanislav Zhuikov
- Ben Tristem
For this project, I’m using screen space, and there’s nothing connected to Pixel Depth Offset in the material either. Even after adding basic cubes around the entire structure, the directional light isn’t being blocked.
looks partially like an autoexposure issue to me. set it 0,0 or 1,1 for testing or whatever you prefer as a baseline.
it should no leak into the cube tho. unless shadow bias makes it leak thru the joint edges. i dunno how good ssgi is. so…
It still didn’t work.
i dunno what that exposure contrast scale does (i can’t boot the engine, rn. busy compiling).
the autoexposure settings i meant are in the postprocessing volume → exposure tab. min and max EV
is the volume set to infinite extend or spread around the box? that should work to some degree.
In the previous screenshot, it was only around the structure, but now it’s in infinite mode.
I believe it’s some kind of light leakage issue because before placing the basic cubes around the structure, the character was casting a shadow, and now the shadow has disappeared.
Perhaps there’s an issue with my meshes?
well… brain to square one. since this seems to be in a dungeon of some kind. have you actually tried to disable the sun light. i mean… that is the source of iight that maybe leaks. also disable skylights. since they can actually render a generic ambient term that will mess up interior scenes if not controlled.
there are methods to disable and reenable it at runtime if required.
This game is just a small personal project for my son to play. The first dungeon was made on a separate map, and this one probably will be too, but I wanted to test the open-world day and night system in a dungeon.
Anyway, thank you very much for the help, guys!
are your wall and floor materials have double sided enabled?
This, this is the answer
UE5.6.1 here. I’ve tried every possible solution out there, and nothing helped, so I started experimenting on my own.
Pre-conditions (at least what worked for me):
- your static meshes that are intended to prevent light from leaking inside (walls, ceilings, floors) are not planes and don’t have holes where it is not intended for them to have holes. You can check it by selecting the mesh, going to Modeling (plugin has to be enabled before you can get access to modeling) → Mesh → Fill holes → Select All. Before clicking Accept you’ll have all the holes highlighted on your mesh;
- all the meshes are at least 10cm/units in terms of thickness;
- their materials or material instances are set to Two Sided.
- I also have Lumen turned on, and for these meshes - Nanite turned off, as I need the dynamic lighting in my scene - so I haven’t tested this solution for the baked lights. My only light source in the example below is the directional light, but when I tested this issue with only the point light outside my room, the leaking was there, so this solution should probably help with other light sources too.
Solution: select the walls, floor, etc. go to Details panel, find the Lighting section and switch on the Volumetric translucent shadows. I am not sure why from the technical perspective, but for my scene it stopped the leaking completely.
When it’s turned off:
When it’s turned on: