Search Unity

Real time Light Errors

Discussion in 'Global Illumination' started by Cody-Rauh, May 20, 2017.

  1. Cody-Rauh

    Cody-Rauh

    Joined:
    Oct 12, 2013
    Posts:
    256
    When adjusting my bias on my directional light I get either this issue of light leak when it is adjusted up.



    or if I adjust it down to stop the light leak it causes lines.



    The entire room is one single model with no model separations, and only a single texture.
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
    That's the nature of the way Unity does shadows (and most engines). Play with the bias settings, find a good balance. Reducing the Shadow Distance might help as well.

    If the leak that is bothering you is the one on the top right, model thicker walls.

    If all of that fails, you can look into getting an asset. either NGSS or Sonic Ether's contact shadows.
     
  3. Cody-Rauh

    Cody-Rauh

    Joined:
    Oct 12, 2013
    Posts:
    256
    Thanks for the reply. I have played with the settings, it seems I am either stuck with one or the other, I also have pretty thick walls. Any thicker and it won't make any sense when going through doors, unless every door is a hallway. :)

    Are both those assets on unity store?
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
    Yeah, but they come with a performance hit, so depending on your target platform they may or may not work for you, so look into them a bit. (NGSS = Next-Gen Soft-Shadows, it's a complete replacement for shadows, and Sonic Ether's Screen Space shadows does a screen space post process and adds shadows where they're missing due to bias settings)

    You should be able to work around that leak on the ceiling though. You could always place some extra geometry/boxes just to make sure shadows are cast.