Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Real time directional light reflecting in an interior environment

Discussion in 'General Graphics' started by ChameleonPower3DDev, Jan 16, 2019.

  1. ChameleonPower3DDev

    ChameleonPower3DDev

    Joined:
    Mar 14, 2017
    Posts:
    24
    Hi everyone,

    Its quite possible that I'm a big tool and thanks in advance for the help -- I'm running into an issue of the real-time directional light reflecting on interior surfaces through static geometry. The glass is also set to static, reflection probes are set to projection, and real-time via scripting.
    upload_2019-1-16_15-36-5.png

    My geometry is static, cast shadows on, scene lighting settings are:
    upload_2019-1-16_15-36-38.png

    Directional light settings are:
    upload_2019-1-16_15-37-2.png

    Am I missing any information to help figure this out?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    The issue you're running into is Unity doesn't support shadow receiving on real time transparent objects. You can either set your light to be baked, or you can use layers to exclude your windows from being lit by the directional light to fake shadows.

    The more complex solutions would be to move to using the HDRP which does support shadows on transparent objects, or to write code to copy the shadow map and custom transparency shaders that use that shadow map.
     
  3. ChameleonPower3DDev

    ChameleonPower3DDev

    Joined:
    Mar 14, 2017
    Posts:
    24
    Awesome thanks for the response bgolus! The directional light has to be real time and HDRP isn't an option since the project is about to ship, so I'll give layers a shot. It's not a huge issue honestly, mostly just a polish goal. Many thanks for your insight!