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

Sun behind the objects is reflected on the materials

Discussion in 'General Graphics' started by Wenon, Oct 31, 2021.

  1. Wenon

    Wenon

    Joined:
    Mar 18, 2018
    Posts:
    19
    Hello
    Could you tell me how can I make sun not reflecting on materials if sun is not visible/behind the wall?
    Unity 2020.3.6 hdrp

    upload_2021-10-31_22-42-47.png
    upload_2021-10-31_22-44-24.png
    upload_2021-11-1_10-21-30.png
     
    Last edited: Nov 1, 2021
  2. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,793
    Enable shadows
     
  3. Wenon

    Wenon

    Joined:
    Mar 18, 2018
    Posts:
    19
    They are enabled.

    upload_2021-11-1_10-17-5.png
     
  4. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,793
    So you must update shadow distance settings
     
  5. Wenon

    Wenon

    Joined:
    Mar 18, 2018
    Posts:
    19
    Those setting didn't change anything with my problem, one thing what helped is dimmer set to 1, sun not reflecting on objects if they are covered by walls anymore but it makes shadows too dark.
    Is there other option to make shadow not so dark without changing dimmer?

    upload_2021-11-1_11-49-9.png
     
    Last edited: Nov 1, 2021
  6. Arycama

    Arycama

    Joined:
    May 25, 2014
    Posts:
    182
    That looks like light leaking due to poor shadowmap utilisation.
    You can try using a closed-mesh, where the edges are welded together, instead of two seperate objects placed close by.

    Otherwise increase shadow resolution or decrease shadow distance.

    Unity's shadow-projection fitting in HDRP is still very poor unfortunately. (Equivalent to the stable-fit in legacy pipeline, they don't offer a tight-fit)

    You can also try enabling micro shadows, which can fix up small artifacts.