Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Light from Area Light passes through walls

Discussion in 'High Definition Render Pipeline' started by Toonas, Aug 21, 2020.

  1. Toonas

    Toonas

    Joined:
    Sep 4, 2017
    Posts:
    19
    Hi everyone! I'm new in HDRP and Unity lighting and I have a problem with interior lighting.
    I had created simple project whith two rooms. Rooms are closed from outside light (rooms from planes, but with "Two Sided" Cast Shadows). In one of the room I had placed Area Light, but light from Area Light passed through walls into another room. How can I resolve my problem? (I need realtime light or baked light but with shadow cast on dynamic objects (like a player))
     

    Attached Files:

  2. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,009
    Check Light Probes.
    And make the light static.
     
    Toonas likes this.
  3. Toonas

    Toonas

    Joined:
    Sep 4, 2017
    Posts:
    19
    Hi! Thank you for your message!
    As I know, Light Probes don't do shadows for dynamic objects, but I need it
     
  4. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,009
    If this is a real time light with shadows it should not cast light into other room like in your Problem.png.
    Actually it is quite strange because it is lighting in in improper way. Does it also light if you put some wall made of cube between those rooms ?

    Also what if you swap area light with point light is it still illuminating other room ?
     
    Toonas likes this.
  5. Toonas

    Toonas

    Joined:
    Sep 4, 2017
    Posts:
    19
    Wall between rooms doesn't affect on shadow cast. But yes, Point Light works too better.
     

    Attached Files:

  6. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,009
    In documentation it is written that
    You could cheat a little by placing area light and spotlight at the same point both with illumination halved. Bake the area-light and keeping the spotlight runtime. You will have some shadows.
     
    Toonas likes this.
  7. Toonas

    Toonas

    Joined:
    Sep 4, 2017
    Posts:
    19
    Thank you! I will try it!
     
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,848
    check the "shadow cone" settings on your area light and increase it.
    unfortunately shadows from area lights are less the sub optimal....
     
    koirat likes this.