Search Unity

Strange Shadow Artifacts

Discussion in 'Global Illumination' started by joedartjr, Feb 11, 2019.

  1. joedartjr

    joedartjr

    Joined:
    Jul 13, 2013
    Posts:
    9
    When playing in editor mode, I am getting many frames that seem to glitch the shadows like this:
    frame 100
    img00100.png
    But the frames before and after are fine, and look like this:
    frame 99
    img00099.png

    frame 101:
    img00101.png

    It seems to happen in every project. I tried taking away the post processing effects, but didn't have any luck.
    frame 02:
    img00002_s.png

    I have also baked the lighting, set to real time / mixed, important, changed bias, changed normal bias; I'm running out of ideas. Any help would be appreciated.
     
  2. Kuba

    Kuba

    Moderator

    Joined:
    Jan 13, 2009
    Posts:
    416
    Hey @joedartjr,

    I would suggest checking out the Frame Debugger first to see if the rendering steps are the same in the correct frame and in an incorrect frame.
    I realize that it might be hard to catch those situations, in that case using an external graphics debugger/profiler like e.g. RenderDoc would be a good first step.

    Cheers,
    Kuba
     
  3. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    I was also wondering whether you have LODs setup for your trees. If so, which LOD fading technique are you using?
     
  4. joedartjr

    joedartjr

    Joined:
    Jul 13, 2013
    Posts:
    9
    First off, thanks for the responses. I know it took me a while, but I appreciate the help.

    I ran frame debugger, but was unable to pinpoint what draw call may be poking through to the camera incorrectly, but unfortunately when running the project it is almost unnoticeable, I am really only able to capture the problem when recording or taking screenshots. There's an ocean of calls per frame.

    I took a look at the LOD on some of the trees and they were messed up. Multiple LOD were overlapping each other. I reset all the LOD to run some tests and the issue is still persistent, but only when running in 4K now. I installed Pegasus to the project so I could render the exact same scene over and over while changing settings. When running at 1080p the issue doesn't appear, in 4k it is still very much happening.

    I made a new project, created a basic ground with coverage and ran the project; same results. No issues anymore in 1080p, 4k is causing same artifacts to appear. This is using linear deferred render path, one single unmoving directional light, and standard settings for everything. This scene has no trees to cause LOD problems. The shadow issue also appears across the ground, in a stripped pattern. Could it be a shadow bounce issue? Issue appears with and without post-processing still as well. Standard unity deferred materials.
     
  5. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    It is hard to tell what exactly the problem is without taking a look at it ourselves. Would it be possible for you to provide a small project where this issue reproduces? Thanks!
     
  6. joedartjr

    joedartjr

    Joined:
    Jul 13, 2013
    Posts:
    9
    I'll have time this weekend to produce you a sample project.
     
  7. joedartjr

    joedartjr

    Joined:
    Jul 13, 2013
    Posts:
    9
    I didn't ever upload the project because I got to the root of the problem. I cleared my cache and moved it over to a faster drive, manually deleted my asset folder contents, including my standard assets, updated to the Feb 21 (now on the March 1), and everything has been smooth since.
     
    kristijonas_unity likes this.