# No matter what I do, I can't seem to stop the sunlight from 'leaking' through the meshes. Is there any solution?

**URL:** <https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267>\
**Category:** Rendering\
**Tags:** unreal-engine, lighting-problem, Rendering, staticmesh, directional-light, Lighting, question\
**Created:** [February 6, 2024, 4:25pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267 "2024-02-06T16:25:44Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hyraxon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hyraxon/32/726891_2.png) [@Hyraxon](https://forums.unrealengine.com/u/Hyraxon)\
**Post date:** [February 6, 2024, 4:25pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/1 "2024-02-06T16:25:44Z")

</div>

In this scene, the character is completely surrounded by wall meshes, yet the light still leaks through.

---

<div class="post-metadata">

**Author:** ![Holosim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Holosim](https://forums.unrealengine.com/u/Holosim)\
**Post date:** [February 6, 2024, 5:02pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/2 "2024-02-06T17:02:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Hyraxon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hyraxon/32/726891_2.png) [@Hyraxon](https://forums.unrealengine.com/u/Hyraxon)\
**Post date:** [February 6, 2024, 5:23pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/3 "2024-02-06T17:23:56Z")

</div>

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.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/8/5/985968f77c8aac861dbce99e174310567fbc8d28.png)

---

<div class="post-metadata">

**Author:** ![glitchered](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/glitchered/32/768299_2.png) [@glitchered](https://forums.unrealengine.com/u/glitchered)\
**Post date:** [February 6, 2024, 5:29pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/4 "2024-02-06T17:29:26Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Hyraxon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hyraxon/32/726891_2.png) [@Hyraxon](https://forums.unrealengine.com/u/Hyraxon)\
**Post date:** [February 6, 2024, 5:40pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/5 "2024-02-06T17:40:07Z")

</div>

It still didn’t work.

---

<div class="post-metadata">

**Author:** ![glitchered](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/glitchered/32/768299_2.png) [@glitchered](https://forums.unrealengine.com/u/glitchered)\
**Post date:** [February 6, 2024, 5:42pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/6 "2024-02-06T17:42:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Hyraxon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hyraxon/32/726891_2.png) [@Hyraxon](https://forums.unrealengine.com/u/Hyraxon)\
**Post date:** [February 6, 2024, 5:49pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/7 "2024-02-06T17:49:11Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/0/02060966c1d8d2808dfc9a85bc81a65963db78e7.jpeg)  
Still no luck. I wasn’t even using a post-process volume before.  
probably should have used it.

---

<div class="post-metadata">

**Author:** ![glitchered](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/glitchered/32/768299_2.png) [@glitchered](https://forums.unrealengine.com/u/glitchered)\
**Post date:** [February 6, 2024, 5:50pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/8 "2024-02-06T17:50:49Z")

</div>

is the volume set to infinite extend or spread around the box? that should work to some degree.

---

<div class="post-metadata">

**Author:** ![Hyraxon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hyraxon/32/726891_2.png) [@Hyraxon](https://forums.unrealengine.com/u/Hyraxon)\
**Post date:** [February 6, 2024, 5:56pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/9 "2024-02-06T17:56:37Z")

</div>

In the previous screenshot, it was only around the structure, but now it’s in infinite mode.

---

<div class="post-metadata">

**Author:** ![Hyraxon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hyraxon/32/726891_2.png) [@Hyraxon](https://forums.unrealengine.com/u/Hyraxon)\
**Post date:** [February 6, 2024, 6:06pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/10 "2024-02-06T18:06:25Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![glitchered](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/glitchered/32/768299_2.png) [@glitchered](https://forums.unrealengine.com/u/glitchered)\
**Post date:** [February 6, 2024, 6:10pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/11 "2024-02-06T18:10:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Hyraxon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hyraxon/32/726891_2.png) [@Hyraxon](https://forums.unrealengine.com/u/Hyraxon)\
**Post date:** [February 6, 2024, 6:16pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/12 "2024-02-06T18:16:03Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![planetvfx](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/planetvfx/32/986560_2.png) [@planetvfx](https://forums.unrealengine.com/u/planetvfx)\
**Post date:** [November 6, 2024, 6:45pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/13 "2024-11-06T18:45:31Z")

</div>

are your wall and floor materials have double sided enabled?

---

<div class="post-metadata">

**Author:** ![Pierrax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pierrax/32/596699_2.png) [@Pierrax](https://forums.unrealengine.com/u/Pierrax)\
**Post date:** [November 27, 2024, 6:02pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/14 "2024-11-27T18:02:03Z")

</div>

This, this is the answer

---

<div class="post-metadata">

**Author:** ![miskevicht96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@miskevicht96](https://forums.unrealengine.com/u/miskevicht96)\
**Post date:** [September 24, 2025, 1:49pm UTC](https://forums.unrealengine.com/t/no-matter-what-i-do-i-cant-seem-to-stop-the-sunlight-from-leaking-through-the-meshes-is-there-any-solution/1670267/15 "2025-09-24T13:49:49Z")

</div>

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.

 ![shadows](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/7/347d6401891216b4991bad06223e6e4d4bc544f0.png)

When it’s turned off:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/c/2bcff5069b3ce731a74a3fbd2e2856cb3e3b03ff.jpeg)

When it’s turned on:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/6/9/e697b78c812ffd53203790ab5e033069bb4a040d.jpeg)
