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

Shadow passing multiple objects

Discussion in 'General Graphics' started by ZeBraNS, Dec 2, 2020.

  1. ZeBraNS

    ZeBraNS

    Joined:
    Feb 21, 2015
    Posts:
    40
    Hi all,

    I am having an issue with dynamic objects (like characters) that cast shadows on the floor down. I am using URP with Subtractive mode and Mixed directional light. Floor objects are set to static, receive shadows. I created one default URP scene and duplicated the floor, the same effect occurs.

    Is this a limitation, bug, bad settings,....?
     

    Attached Files:

  2. ZeBraNS

    ZeBraNS

    Joined:
    Feb 21, 2015
    Posts:
    40
    Update:
    I trayed Unity 2020.1.16 with the default scene and it is still present.
    Interestingly on the scene from -Harnessing Light with URP and the GPU Lightmapper- by Ciro Continisio (great stuff) this effect is not present on the same Unity version. I trayed copying all the light settings (i think so) and used the same URP render pipeline setting and still the same passing through multiplying shadow.
    What am I missing?
     

    Attached Files:

  3. AKingOfLettuce

    AKingOfLettuce

    Joined:
    Apr 8, 2020
    Posts:
    5
    I'm still having this same issue with Unity 2020.2, did you ever find a solution?
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,238
    Subtractive mode is effectively attempting a "best guess" at how to merge dynamic and static lights. How effective it is comes down to how closely that "guess" matches the lighting of the scene. Sometimes it'll look perfect, other times the realtime shadow won't show in places you expect it to, and other times it'll show where you don't want it. That's the "cost" of using Subtractive mode vs. Shadow Mask mode, which guarantees perfect mixing of realtime and baked shadows.
     
  5. ZeBraNS

    ZeBraNS

    Joined:
    Feb 21, 2015
    Posts:
    40
    I got a response from the Unity support team that basically said that in order to not have dynamic shadows passing through objects use other light models than subtractive. Not great, not terrible.
    They mention reducing shadow distance but it is camera position-dependent, not per object.