Announcement

Collapse
No announcement yet.

Light passes through walls

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Light passes through walls

    I trying to do hallway and the light must come only from the windows, but somehow it cross through walls. My walls are BSP, the roof and the ground are boxes. How to fix this problem? This bright line start to disappear when I move close to it.
    Attached Files

    #2
    This is from cascaded shadow maps, they have a tendency to bleed and on top of that their resolution decreases the further they get from the camera which just makes it more likely.

    If you don't need your directional light to be moveable the best solution is typically to just bake static shadows into the scene with lightmass. The cascades will switch to static shadows in the distance.

    If you need it to be moveable then as far as I know there is no perfect solution. You're stuck either making your walls thicker or adjusting the shadow map settings in the directional light.

    Comment


      #3
      It's not only cascaded shadow maps (CSM) that causes that. What are your directional and skylight settings? Whenever you have a lighting / shadowing problem, you should post at least some of your directional and skylight settings to get help faster and for more precision in approaching the problem. It's not an obvious thing to do, but it helps in searching for solutions and troubleshooting as no one really knows your project well. One of the things that causes the light bleed there, besides CSM, is ambient occlusion settings being incorrect. Another is something to do with lightmaps, but that's primarily for static / stationary lighting, though it can affect dynamic depending on other things.

      So, are the directional and skylight each static / stationary / dynamic? and can you post a screenshot for each of their settings (base and under Lighting)?
      What are the World Lightmass settings for the project (click Settings up top, and it's one of the first several in the list)?

      Before uploading screenshots, though, one thing to try is modifying Shadow Bias (and possibly Slope Bias) and Shadow Resolution in the directional light Advanced settings (click directional light > scroll to Lighting > click Advanced dropdown).
      Last edited by presto423; 07-16-2020, 04:12 AM.

      Comment


        #4
        Thank you, my lighting will be static so the problem is fixed with static lighting settings, if I use dynamic lighting I will keep these things in mind.

        Comment

        Working...
        X