Search Unity

Bug HDRP - Artifacts around edges

Discussion in 'High Definition Render Pipeline' started by AxonFluxNils, Feb 20, 2023.

  1. AxonFluxNils

    AxonFluxNils

    Joined:
    Aug 25, 2021
    Posts:
    4
    Greetings,

    for quite some time now we noticed strange artifacts around edges in the HDRP. Basically since we are using reflection probes.

    Here are two images for reference:
    Unity_rd1qGCRXTX.png Unity_K0lguhqSF8.png

    Now, i already found this thread on the forums: Artifacts around edges of some objects with SSR enabled

    So, i know that it must have something to do with the reflection probes and that the materials are falling back to the global reflection probe.

    The mentioned thread suggests to set clear coat to 0 in the material, or to turn it off when using a custom shader. But we never used clear coat in the first place, nor are we using SSR - so the thread didn't really help us.

    I tried to play around with values in the materials, i played around with the global volume we are using in the scene to check if maybe a post processing effect is the culprit. I played around with a bunch of settings in the HDRP render pipeline asset but to no avail.

    Did anyone ever have similar issues? Or ideas that could fix this issue?

    Some informations that might be helpful:
    • We are using Unity 2021.3.19f1 with the HDRP 12.1.10
    • Some objects in the screenshots are using the standard HDRP lit shader (e.g. floor tiles) and some use a custom made shader (walls, pillars) made with shader graph (lit base, clear coat disabled etc)
    • We are not using any sort of raytracing
    • We are currently working with DX11 and not 12
    Thank you very much
    - Nils
     
    Last edited: Feb 20, 2023
  2. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Try increasing "reflection 2d Atlas Size" in your active HDRP asset.
    Also switching from forward to deferred or vice versa and see if that makes a difference.

    Finally, you could go nuclear and turn off (set to 0) reflective lighting in your indirect lighting post process override.
     
  3. AxonFluxNils

    AxonFluxNils

    Joined:
    Aug 25, 2021
    Posts:
    4
    Hey PutridEx, thanks for your answer.

    I tried increasing the Atlas Size but it didn't do anything. Switching between forward and deferred rendering also had no effect sadly.

    Setting the reflective lighting to 0 in the volume actually fixed the artifacts, but it's sadly not a valid solution, since reflective surfaces now become black or rather extremely dark.
     
  4. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    One more thing you can try: Increase "Maximum cube reflection probes on screen" in your active HDRP asset
     
  5. Julien_Unity

    Julien_Unity

    Unity Technologies

    Joined:
    Nov 17, 2015
    Posts:
    72
    Looks like you are hitting a per tile probe limitation. Do you have a lot of probes in your scene?
    You can check in the Rendering Debugger (Windows -> Analysis -> Rendering Debugger) in the Lighting Panel you can enable Tile Debug and then choose Reflection Probes.
    I suspect you're going to see high numbers where you have artefacts.
     
  6. AxonFluxNils

    AxonFluxNils

    Joined:
    Aug 25, 2021
    Posts:
    4
    Hey guys, thanks for the answers!

    Increasing the value was one of the first things i tried. At this point i went through every setting and changed values to insane amounts, just to check if something's gonna happen. Sadly it didn't do anything.

    At the moment we only have 32 Reflection Probes in the whole scene. And that is not really a crazy amount i would say. Atleast i think. Given that the screenshot only shows a tiny part of the level.

    About the Rendering Debugger, i keep forgetting that the tool exists :oops:
    Now, i have enabled tile debugging and set the category to Reflection Probes, but instead of seeing high numbers, it just doesn't show anything. Perhaps that's the way of the debugger to tell me that the numbers are insanely high, but idk - all the numbers around the broken tiles seem reasonable to me (1-3). When setting the Debugger to cluster it shows pretty much the same thing, which is to be expected.
    upload_2023-2-21_10-44-45.png

    I also tried to updated to Unity 2022.2.7 to see if there might've been an update or bugfix. But we have the same problem in 2022. Any ideas how to debug this any further or potential workarounds/fixes?

    - Nils
     
  7. AxonFluxNils

    AxonFluxNils

    Joined:
    Aug 25, 2021
    Posts:
    4
    Alright, so i have tested and played around a bit more. And i think i've found the culprit. I noticed in the rendering debugger that the punctual values were quite high on the tiles that were affected.

    So i started to play around with the "Maximum Punctual on Screen" value in the HDRP render pipeline asset. Reducing the value actually fixed the problem.

    Yes, we are using quite a bunch of point lights in this scene. At the moment every torch uses a realtime light on top of a baked light. I noticed that the fade distance of the point lights was pretty high. So i reduced the value as well. After that i was able to increase the max. punctual amount again without the artifacts reappearing.

    Given, we haven't polished the level yet. So the amount of realtime point lights probably gets reduced anyways and would've randomly fixed the problem. But at least now we know that we shouldn't spam too many point lights with a high fade distance. :confused:

    Interesting how too many point lights can glitch out the reflection of a tile. I am not educated enough in the matter of rendering, even though i wish i was,but at least the artifacts are gone for now. :D

    Cheers