Search Unity

Question Water receiving shadows

Discussion in 'High Definition Render Pipeline' started by ChristophL, Jan 24, 2024.

  1. ChristophL

    ChristophL

    Joined:
    May 20, 2015
    Posts:
    4
    Hi,

    I have water surface receiving reflection (enable Screen Space Reflection in Volume Settings and enable it HDRP render settings.) In general I receive shadows on transparent surfaces except for the water. Is this possible and if which settings have to be set for this? I am using HDRP version 16.

    Thanks,
    Christoph
     
    Last edited: Jan 24, 2024
  2. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    266
    Hello, water should receive shadows like any transparent object, and this isn't related to SSR.
    Maybe if your water is very transparent and most of the lighting is coming from refracted light, then there shouldn't be shadow but that's expected. Do you have a screenshot of your issue so that i can better understand ?
     
    Last edited: Jan 25, 2024
  3. ChristophL

    ChristophL

    Joined:
    May 20, 2015
    Posts:
    4
    Sure,

    I have attached 3 shots. Shot A: The tower should cast a shadow from the sun shining from the right side. This is visible on the foam but not on the water. Shot B: We are now in the shadow. The end of the shadow region is again visible on the foam (right side middle of image) but not on the water. Shot C: Counter light situation a shadow and darker region should appear in front of the boat and not bright water.

    Setting the absorption distance in the refraction section in the water appearance to zero does not change this.

    Thanks,
    Christoph
     

    Attached Files:

    Last edited: Jan 25, 2024
  4. ChristophL

    ChristophL

    Joined:
    May 20, 2015
    Posts:
    4
    Ok,

    I think I found the answer. I saw the shadows in the editor. Not seeing the shadows is based on the flat camera angle and a high smoothness value. Lowering this one fixes makes for a more distinct boundary.

    Christoph
     

    Attached Files:

  5. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    266
    Nice, otherwise the settings that will make shadows most visible are the scattering color and all the terms in the scattering section. When values are low, most lighting will come from the sky and don't have shadows (as your tower is not part of the sky cubemap is suppose). When values are high, much more importance will be given to direct sun light and shadows will be more visible

    upload_2024-1-25_15-32-13.png upload_2024-1-25_15-32-15.png
     

    Attached Files: