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

PLM GPU artifact terrains soils mesh cliffs

Discussion in 'Global Illumination' started by Max-om, May 5, 2022.

  1. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    This is a relative new artifact, it surfaced a few versions back. We are on 2020.3.34 currently. Cant pinpoint exactly when it surfaced.

    But terrains leaves artifacts on the mesh mountain lightmap

    upload_2022-5-5_19-6-38.png

    This was not a problem earlier in the 2020.3.x lifetime. We havent changed anything in the scene, only Unity version
     
  2. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    Anyone that knows whats wrong?
     
  3. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Looks like indirect occlusion where rocks intersect the terrain. It's not visible on the terrain itself because its texel resolution is too low. Alternatively, your terrain might be marked as a GI contributor that receives lighting from probes.
     
  4. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    Again this error appeared without any change from us. Texel res is 40 on the meshes.

    edit: Whats introduced and that wasnt there before is the brownish gradient on the snow. Here is a screenshot without terrain that shows the brownish tint better.

    upload_2022-5-6_12-6-28.png
     
    Last edited: May 6, 2022
  5. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Again, I'm pretty sure that's just indirect shadowing from the terrain. Tweak your filtering settings by setting that enum to Advanced if you find that there's too much blurring.
     
  6. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    I will go back in git history, brb
     
  7. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    Have you set any materials to GI double sided or tweaked backface tolerance in the lightmap parameters?

    Those texels beneath the terrain should be marked invalid AFAIK (unless there is something different about how terrain is handled?).
     
  8. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    Zero change. Give me some time, will go back in git
     
  9. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    For clarity what I’m saying is you shouldn’t have materials as double sided, so the texels beneath the ground can get rejected instead of being dark.
     
  10. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    Yeah they aren't double sided. Never been.
     
  11. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    It seems how AO behaves have changed. If I disable AO it looks better. But now it looks really flat and ugly in corners

    Can I somehow control which meshes that will receive AO?
     
  12. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    I don't think so.
     
  13. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    That's a bummer. It often feels like Unity wasn't ment for real games.
     
  14. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    It's true.

    But also I more often than not hate how AO looks, so this doesn't seem like a huge deal (to me).

    Can you post an image of the Texel Validity debug view?

    @kristijonas_unity Shouldn't those texels under the ground get rejected even with AO on, which would invalidate all that darkness under the terrain?
     
  15. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    Sharp corners look dull without AO. Here without

    upload_2022-5-7_16-56-55.png

    With

    upload_2022-5-7_16-57-13.png



    Unity doesnt cache texel vadility can only display it right after a bake. Go figure
     
  16. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    You see this to me doesn't seem like dull / not dull, it seems like the corners are dirty or have mold in one of those.

    If I wanted to make things more interesting I would look into making the lighting more interesting (less even, more contrast, more opportunity for shadowed areas and gradients to appear).

    I'm not trying to change your mind, if you like how things look with AO, that's fine, I'm just expressing another viewpoint.
    Yeah... You can do a pretty terrible bake with really low sample values, sample counts don't matter (much) for texel validity.
     
    Last edited: May 7, 2022
  17. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    im on a 3090 luckily so it bakes pretty fast.

    upload_2022-5-7_17-23-10.png

    upload_2022-5-7_17-23-26.png
     
  18. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    It's a little difficult to understand what I'm looking at, but is the area that is fully dark beneath the terrain green or red in the texel validity view?
     
  19. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    Green.
     
  20. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    I think it should be red. Are you sure there are no materials set as double sided? Also in the lightmap parameters, what is the value of backface tolerance?
     
  21. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    upload_2022-5-7_18-14-3.png

    upload_2022-5-7_18-15-21.png

    upload_2022-5-7_18-19-10.png
     
  22. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    Yeah, you're right... Those seem fine.

    One last test: If you bake with AO disabled, does the area under the terrain become red in the texel validity view?

    If yes, then I think we found a potential bug / weird design.
     
  23. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    Give me 15 for it to bake :)
     
  24. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    Sorry for delay, PLM broke down on me. Its green too actually
     
    Last edited: May 7, 2022
  25. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    There goes that theory. I'm not sure why it's green on both, or why AO behaves differently... :/ Sorry I'm out of ideas.
     
  26. Max-om

    Max-om

    Joined:
    Aug 9, 2017
    Posts:
    499
    Thanks it was worth a try!
     
    AcidArrow likes this.