Light going through walls

Hello

I am working on a level for my game and adding ceiling lights to the building. How do i stop the light from going through the ceiling and walls. Ive tried checking two sided lighting but that didnt work. I am using a post processing volume in the level for the outside to make it a night scene so i dont know if thats affecting the light going through walls

Do you have the “cast shadows” box checked on the ceiling mesh? (also the “dynamic shadows” box if your lights are dynamic)

Hi @Chantanclan

Both cast shadows and dynamic shadows are checked. I have also unchecked them and it has not fixed the light leaking. Im thinking it has to do with the radius of the point light being to big so that I can light the ceiling on the side where the light is but by doing that its also lighting the other side?

(post deleted by author)

Just in case, another thing that could cause that is not having “cast shadows” enabled in the light details.

If you put another simple material on the ceiling, does it still happen? That way you can rule out if it’s something with the material.

Do the light cast other object shadows well?

It’s worth checking the Walls/Ceilings Thicknesses that might be causing light leak if using 2D planes instead of actual geo, this happens sometimes in lumen due to reasons related to Mesh distance fields etc.

I have dragged in a cube and some other objects but no shadows appear even though they have cast shadow enabled and the light has shadow enabled

My Walls and ceilings are pretty thin as I used geometry brushes and converted them to static meshes.

Could you share a screenshot of your viewport displaying Mesh distance field, Lumen scene and light complexity debugging views?

Then the problem is that your light is not producing shadows for some reason…

If you add a new movable light to the room, for example a point light or spot light, does it also not produce shadows?

Otherwise, maybe it has to do with distance fields, which lack the volume to block light as the other user mentioned.

Go to Show - Visualize - Mesh Distance Fields and check if the objects are represented with an approximate volume. If I’m not mistaken, that is the geometry that casts shadows when you use Lumen and/or Nanite.

Here Is the mesh Distance Field

The lumen scene which says “lumen visualization is enabled but cannot render because lumen is disabled”

And the light complexity debugging views

Yeah none of my lights add shadows even though its enabled. I have some spotlights outside the building that aim at land and when i drag in cube there is no shadow from it. They are set to moveable

Edit: Fixed shadows. I forgot I had my viewport scalability settings set to lowest so my computer can run the engine. This also fixed the light going through. Should have been first thing I checked

2 Likes

(post deleted by author)