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

Additive Light Probes Artifacts

Discussion in 'Global Illumination' started by Incode, Jul 1, 2020.

  1. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    78
    I'm hoping a Unity dev can help shed some light (pun intended) on additive light probes and the new Tetrahedralization method.

    Our project is currently using URP.

    I'm currently working with a base scene that has no lighting. At runtime I load an additive scene that has lighting and light probes. If I do the tetrahedralize call, it will update the light probes, but it will frequently leave a number of very bad artifacts and dark objects that aren't sampling the light probes correctly.

    Am I doing something wrong, or is the fact that the base scene has no lighting a problem?

    Edit* Issue tracker: https://issuetracker.unity3d.com/is...robes-cause-artifacting-on-objects-in-a-scene
     
    Last edited: Aug 17, 2020
  2. thefranke

    thefranke

    Unity Technologies

    Joined:
    Jun 20, 2015
    Posts:
    153
    Hey Incode,

    that sounds wrong, you should only get the light probes that are "new" after the tetrahedralization call. Do you have a reproducible you could share?

    Cheers
     
  3. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    78
    Thanks, I thought so. I'll try to put a repro project together tonight.
     
    Pema-Malling and thefranke like this.
  4. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    78
    @thefranke Well, I tried putting something together in a fresh project, and was unable to repro. I'm guessing it's a bit of an edge case related to some issue in our current project. Can hopefully pin something down so I have more useful information to share.
     
    KEngelstoft and Pema-Malling like this.
  5. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    78
    Alright @thefranke , after some more tinkering I was able to repro.

    The artifacts seems to be related to one of two things, either:
    An additively loaded scene is baked, and then a separate additively loaded scene with baked lightmaps is loaded and tetrahedralized
    or
    Multiple reflection probes with different cubemaps exist in an additively loaded scene during tetrahedralization

    I've attached a photo of the resulting artifacts. Case: 1263524

    LightProbeArtifact.PNG
     
    Last edited: Jul 16, 2020
  6. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    78
  7. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    307
    Thanks for the bug report :). We just managed to reproduce the issue for the first time yesterday, so I can't really give you more info about fixes or workarounds yet. Some initial investigation was done, and the issue seems to be related to incorrect handling of overlapping (identical) probe positions in different probe sets.
     
    Last edited: Aug 18, 2020
    Incode likes this.
  8. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    78
    That's a great jumping off point, will at least verify I don't have any overlapping probes. Thanks!
     
  9. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    78
    @Pema-Malling Hey, just got around to checking the light probes and it looks like there are no overlapping probes in our scene. Anything else I should look for?

    It looks like there is a fix in the works but only for 2020.2 (we're on LTS).
     
  10. thefranke

    thefranke

    Unity Technologies

    Joined:
    Jun 20, 2015
    Posts:
    153
    Hey Incode,

    so a bit of a delay, but this morning the fix got approved (there were some performance considerations we first needed to check out). I'll trigger some backports so you get it in LTS.

    Cheers
     
    laurentlavigne likes this.
  11. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    78
    You're the best, thanks so much.
     
    KEngelstoft and thefranke like this.
  12. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    78
    @Pema-Malling @thefranke Hey guys, we're going to be launching shortly and probably won't be able to wait for the backport fix unfortunately. Do you know if there's a possible workaround, we've experimented quite a bit with merging sets, deleting probes, trying to manually write the data etc..

    Edit: For posterity, we might have found a suitable work around using this: https://github.com/laurenth-personal/lightmap-switching-tool

    It still has some issues, but we've been able to get correct bakes and correct lightprobes with it so far.
     
    Last edited: Dec 18, 2020
  13. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    307
    I just checked the status of the backport and I am afraid there are no updates yet. I'm glad you found some workaround, sorry for the hassle.
     
    Incode likes this.