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

HDRP contact shadows

Discussion in 'High Definition Render Pipeline' started by andrejpetelin, Jun 4, 2020.

  1. andrejpetelin

    andrejpetelin

    Joined:
    Oct 14, 2017
    Posts:
    31
    When starting up a new HDRP project I'm greeted with a sample scene looking like this:

    clean.PNG

    If you look at the bottom of the rightmost leg of the workbench and at the wooden block on the floor furthest from us you'll notice some shadow artifacts. They look worse when you get closer.

    Adding a contact shadows effect to my post processing stack you can modify parameters and these shadow artifacts change. If, on the other hand, I enable the contact shadows effect and within it disable contact shadows I get this contactShadowsDisabled.PNG

    It's perhaps worth noting that disabling the postprocessing volume altogether still shows these shadow artifacts. I'm assuming this is not the intended way of things working. I'd ask if I'm doing something wrong but I haven't even as much as moved the camera when taking these screenshots, so I'd be really curious to know where the bug is?

    I am using HDRP 7.3.1 on Unity 2019.3.13.f1, though I've got similar results with HDRP on other 2019.3 and even the 2020.1 beta versions of Unity. The screenshots were taken on Windows 10, nVidia GTX 980 graphics.
     
  2. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,115
    This bug has been around for about 3~4 months...dont worry you are not doing anything wrong.
     
    andrejpetelin likes this.
  3. andrejpetelin

    andrejpetelin

    Joined:
    Oct 14, 2017
    Posts:
    31
    Oh, okay! Thanks for letting me know!
     
  4. RobyGod

    RobyGod

    Joined:
    Mar 5, 2020
    Posts:
    16
    Hi andrejpetelin. I'm having the same artifact in Shadows, in contac shadows to be precise. Look at that sphere! I've been trying eny setting I could find on doc and on forums but still no way to get rid of those artifacts ShadowTest01.jpg
     
  5. RobyGod

    RobyGod

    Joined:
    Mar 5, 2020
    Posts:
    16
    Look at this! Is this normal? ShadowTest03.jpg
     
    andrejpetelin likes this.
  6. andrejpetelin

    andrejpetelin

    Joined:
    Oct 14, 2017
    Posts:
    31
    But does this only happen after you've added contact shadows or does it appear also without contact shadows being active? It does seem contact shadows are broken but it also seems that in order to remove those artifacts you need to actually add the contact shadows override to post proc and then enable the "Enable" option and then disable it there! I am like 99% sure this is not expected behavior and I am sure it is a bug. Since it's so easy to see it by simply opening the sample scene in HDRP I'm sure it must have been noticed, but I have no idea what the status on this is.
     
  7. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    It is indeed contact shadows that is responsible for these.
    You can find the original volume in the HDRP Default settings (Edit > Project settings > HDRP Default settings > Volume components). You can either disable it there, or add an override to your volume in the scene and disable it there.
    You can also remove the contact shadows per light with disabling the contact shadow checkbox in the shadow tab in each light.
     
    andrejpetelin likes this.
  8. RobyGod

    RobyGod

    Joined:
    Mar 5, 2020
    Posts:
    16
    Yes Andrej. Exactly what you said. You have to either add the contact shadow override and then disable it in order to get rid of those artifacts. Also as Chap said