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

HDRI lighting not working

Discussion in 'High Definition Render Pipeline' started by again, Feb 14, 2020.

  1. again

    again

    Joined:
    Mar 3, 2013
    Posts:
    21
    Hi,
    I am trying to bake lighting in my HDRP scene using HDRI, but the result is very unsatisfactory.

    As you can see on the images below, my HDRI has clearly visible sun, which would in reality create sharp shadows. Previews from the HDRI source page confirm that, but my baked lighting has very soft shadows.

    Seems to me that the lightmapper doesnt take the HDR into account as well as the background which looks weird - if I try to match the color of the grass to the sample image on the HDRIhaven, my sun bleeds hard, so I would say that the information about intensity is not there.

    Also the lighting is very dark compared to the HDRI background - that cube and ball has material with default DHRP/lit shader and white basecolor.

    I somehow confirmed my theory by converting the HDRI into LDR (*.png) and getting the same results from the lightmapper as well as the background image.

    So my question is:
    Am I missing something or the cubemap is limited to low dynamic range be it for lightmapper or background image?

    temp.png temp2.png
     
    Last edited: Feb 14, 2020
    fuzzy3d likes this.
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
  3. again

    again

    Joined:
    Mar 3, 2013
    Posts:
    21
    Thanks for your reply!
    Well Iam not sure if it could be the same bug you are talking about, as I am currently using Unity 2019.3.0b6.
    Also I tried Build-In RP, the shadows looks somehow correct, but the overall result is very wrong.
    I attach screenshot with all the lighting settings so you can check if I didnt fail something hard, but basically It has the same spotty character no matter what I change. temp.png
     
    Last edited: Feb 19, 2020
  4. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    The issue you are seeing in built-in RP is caused by denoising artifacts due to an excessive amount of noise in your scene. You can validate this by setting filtering field to None and rebaking.

    Enabling multiple importance sampling and increasing indirect and environment samples to at least 256 should help remedy the issue.
     
  5. again

    again

    Joined:
    Mar 3, 2013
    Posts:
    21
    Whoa ! Thank you!
    The multiple importance sampling fixed that caustics-looking weirdness.
    There still are some artifacts on the balls however, those hard shadow edges looking out of soft shadows are running along polygon edges. Any tips on theese ?
    temp.png

    EDIT:
    I made some more tests to be sure its not happening because of the default unity sphere geometry. I made 3 spheres with different topology.
    Also the UV isle seams are pretty visible even with padding of 10.
    temp.png
     
    Last edited: Feb 20, 2020