Search Unity

Unity 5.3.1p2 Light Probe issue: dark spot in the opposite direction of the directional light

Discussion in 'Global Illumination' started by andrei-ichim, Jan 8, 2016.

  1. Futurerobot

    Futurerobot

    Joined:
    Jul 13, 2011
    Posts:
    179
    @KEngelstoft Thanks for the update! I guess the reason it's a bigger problem for us now than it was in 4.x was that we could bake in gamma where the problem is much less apparent

    Bit of a tangent, but will the option to bake in gamma be implemented? Right now mobile can only use gamma-space, while the lightmaps/probes are always linear. So lights become very different for realtime. (And our lighting setup would again match the 4.x look.)
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,795
    Yes but it's somehow worse in 5 as you can see in the example I posted above. Both are in Gamma mode and the Unity 5 probes are much more contrasty.

    probes.jpg
     
  3. GameArt

    GameArt

    Joined:
    Feb 24, 2013
    Posts:
    86
    I've found an easy way to reproduce my issue.

    I created a new scene, used static unity cube objects to create a room. I added a bunch of probes and a point light. Lighting looked mostly normal. I then add a spot light facing the wall, and my I get a strong black artifact on the probe near my other light source.




    I then remove the texture map, specular and gloss contributions from the material and still see the artifact


    Increasing the albedo brightness to white removes the artifact


    It seems that light probes are receiving weird results when it comes to bounce light.

    ( I also tested with no crack in the room, and the results are exactly the same )

    Because our indoor scenes feature a ton of directional point lights we are receiving this checkerboard artifact on many of our probes, causing a chrome effect on characters.

    It seems as though, instead of adding the bounce, it's replacing the light that was there.
     
    Last edited: Jun 17, 2016
  4. Futurerobot

    Futurerobot

    Joined:
    Jul 13, 2011
    Posts:
    179
    It seems like Unity 5+ always bakes in linear space, and not gamma space. So the unity 5 gamma bake test is actually linear, which makes the artifact more apparent.

    Which is a different issue, especially for mobile where linear is not available in unity: https://issuetracker.unity3d.com/is...ma-slash-linear-lighting-inconsistent-results
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,795
    So it yet again comes back to Gamma baked stuff being out of whack in Unity... Sigh.

    In any case, I made a bug report for this specific instance:

    image.jpeg

    Case 806665
     
  6. jefequeso

    jefequeso

    Joined:
    Oct 16, 2013
    Posts:
    29
    So, anyone found a fix/workaround of any sort? Patch seemed to mostly fix the issues I was having in one scene, but started work on another tonight and issues are worse than ever. This is a single room with a single light source. Clearing cache, moving light source around, of course clearing lightmap... nothing seems to help. I guess next step is to try just placing the probes again to see if some voodoo magic makes it work? I dunno, but I (and probably everyone in this thread) would greatly appreciate a fix. There's no way I can ship a game like this. Unity 2016-06-24 21-57-27-12.png

    EDIT: Ok, solved the issue. Kind of. If you turn on realtime GI before baking, the color/shadow artifacts seem to go away.
     
    Last edited: Jun 25, 2016
  7. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Man. . . . i totally missed the shadow/AO accuracy from beast . . . less leak happened etc :(
     
  8. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
  9. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,795
    Do bug reports (with repro scene) and post the case numbers here.
     
  10. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I will see if I can reproduce in a smaller scene
     
  11. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Hello everyone, Geomerics finally managed to reproduce the issue on their end. We hope to get a new Enlighten build soon with a fix for the unpredictable light probe values.
     
    Pawige and Haagndaaz like this.
  12. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    The issue is fixed (it turned out to be uninitialized memory). As soon as we have a new Enlighten SDK patch with the fix, we will put it into 5.3 and 5.4. Stay tuned.
     
  13. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Fix for random funky colors in probes will be in 5.3.5 Patch 7 which should release 6th July 2016 (and in one of the next 5.4 betas).
     
    nxtboyIII likes this.
  14. nxtboyIII

    nxtboyIII

    Joined:
    Jun 4, 2015
    Posts:
    281
    Happening to me too
     
  15. YuriGrachev

    YuriGrachev

    Joined:
    Jul 12, 2016
    Posts:
    6
    I've updated to 5.3.5p7. The issue is still there.

    LightProbe_color_bug.png
    LightProbe_backlit_bug.png

    Left groups are static and lightmapped. The right ones use LightProbes.

    Clearing GI cache and rebuilding the lighting does not change anything.
     
    Last edited: Jul 13, 2016
  16. Deleted User

    Deleted User

    Guest

    Could it be possible to see Unity's Probe test scene? cause there have been lots of "Fixes" coming our way, since January. I not tested patch 7 yet myself, but seeing what the last post reported, it does not look promising
     
  17. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,795
  18. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Man seeing all this enlighten problem in Unity it really frustrating, i wonder is UE4 also encounter the same problem?
     
  19. andrei-ichim

    andrei-ichim

    Joined:
    Oct 10, 2013
    Posts:
    22
    It looks like the problem is fixed in 5.4.0f3
     
  20. Deleted User

    Deleted User

    Guest

    WOHO Im not getting the wierd cross thingy in 5.3.6p1!
     
  21. rubiez64

    rubiez64

    Joined:
    Jul 25, 2016
    Posts:
    26
    5.4.0f3 here.... and its still there
     
  22. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    @rubiez64, what you are seeing is spherical harmonics ringing artifacts because of the intense light. This is the same output as you would get in Unity 4.x in linear color space. The reason you see this in both linear and gamma mode in 5.4 is because the spherical harmonics coefficients are always stored in linear and converted to the appropriate space later. This is done to ensure the output is as close to the baked lightmap as possible.
    We are looking into ways to reduce the ringing in light probes, but this requires some R&D so I can't give you an ETA on when the improvement will be released.
     
  23. rubiez64

    rubiez64

    Joined:
    Jul 25, 2016
    Posts:
    26
    okay, thank you for the reply...
    so, if I understand correctly, to reduce this artifact, i have to reduce the light intensity and then increase bounce boost in the baking, in order not to lose the illumination of the room?
     
  24. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,795
    More evenly lit environments make the artifact much less pronounced.

    More dramatically lit scenes with one strong light lighting up the whole scene (which is something I like to do, sadly) are the worst case scenario for the current implementation of the lightprobes.

    I think the decision to make baked gamma space look like linear gamma space was a bad one. First of all it doesn't look like linear, it looks worse it has even less contrast and has a number of other issues. And now it seems it's also the reason why Gamma Unity 4.x probes look so much better than Gamma Unity 5.x probes. *sigh*

    Linear space is good, because it produces correct, but somewhat "flat"(/neutral) results. Linear gives you more "range" to work with, so it's better if you are going to be using tonemapping and/or color correction. Introducing more contrast with post processing is much easier than having an already very contrast-y scene and trying to reduce contrast (you'll be trying to recover highlights and shadows that aren't even there or are very crushed). And since Linear is meant for mid/high end platforms where you are bound to be using Tonemapping and/or color correction, everything works and looks great.

    But making gamma space, which is mainly used for mobile (where post processing is doable but takes a lot of performance) having baked lighting have even less contrast than linear, means you are more or less stuck with weird looking lighting and no tools to redeem the situation.

    I have ended up editing the baked lightmaps in image editors to introduce some contrast to them, which is less than great since if I try to push things more than just a tiny bit, I break coherence with the light probes (not to mention I introduce extra banding), which is again, less than great. Plus it complicates my workflow when I need to rebake my scenes.

    I am hoping that the progressive lightmapper will produce drastically different results, but then again, since the current situation seems, up to a point, intentional, maybe I shouldn't have too much hope.

    *sigh*
     
    Last edited: Aug 31, 2016
    ArchVizPRO likes this.
  25. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    That might reduce the artifact but the outcome is highly dependent of your lighting environment so be careful when tweaking the bounce.
     
  26. Paykoman

    Paykoman

    Joined:
    Jun 26, 2014
    Posts:
    500
    I hv this issue.. Without bake maps i hv light in game, after i bake all point lights it all turns black.. Unity 5.4.1f

     
  27. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Would this be 2018.3? Says so in the roadmap :)
     
    ArchVizPRO likes this.
  28. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Yes, it was added to 2018.3.0a5
    • GI: Added LightProbeGroup.dering to enable/disable remove ringing from probes in the group
    • GI: Added Terrain.deringLightProbesForTrees to enable/disable remove ringing from probes attached to trees on a terrain
     
    hippocoder likes this.
  29. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Will it be backported to LTS?
     
  30. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    No, we don't backport new features to LTS.
     
  31. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    2018.3 will become 2018.4 LTS at some point though.
     
  32. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    But you could argue its a fix for broken light probes though :D
     
    hippocoder likes this.
  33. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    They could but they won't because then everyone would want new things backported. And this would cause endless bugs and... oh... be just like upgrading to a new version of unity........ :O
     
  34. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Oh, we are updating, we always have 3 branches going, production branch (2017.3.x something), Dev branch (2017.4.10) and migration branch (2018.2.6). Both Dev and migration branch are constantly being updated to latest version but right now we have no reason moving to 2018 since we are stuck on old PBR pipeline and currently have no real reason moving to beta version of ECS. But we do have alot of strange artifacts on dynamic items due to light probes
     
  35. Simpl3vol2Dev

    Simpl3vol2Dev

    Joined:
    Jun 28, 2016
    Posts:
    2
    Hey, I am still having the original problem with really bad dark/blue spots. Rebuilt light several times, There's only one directional light in the scene set to Direct 1 / Indirect 1, Environment for Bake is also set to 1. What am I doing wrong?
     

    Attached Files:

  36. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Did you tick the tickbox on the light probe group before baking?
     
  37. Simpl3vol2Dev

    Simpl3vol2Dev

    Joined:
    Jun 28, 2016
    Posts:
    2
    Sorry but I am sadly not exactly sure what tickbox you are talking about, the light probe group itself has no settings on itself, has it?

    EDIT: Ah I am still on 2018.2, you were probably talking about the Beta branch right? I am gonna test that out next
     
    Last edited: Nov 12, 2018
  38. Zergling103

    Zergling103

    Joined:
    Aug 16, 2011
    Posts:
    392
    Inb4 light probes in unity 4 still look better than they do in 2018+...

    Honestly, just have a legacy lightprobe math option or something.
     
  39. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,795
    It's not that simple.

    Also, this has been more or less fixed in 2018.3.
     
    KEngelstoft likes this.
  40. Zergling103

    Zergling103

    Joined:
    Aug 16, 2011
    Posts:
    392
    Has it? I haven't seen a screenshot of the updated de-ringed results and how they compare to 4.0 results. 5 minutes of Googling for them hasn't been fruitful either. I'd test it myself but our project is locked in on Unity 5.
     
  41. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,795
    probes.jpg

    Left is Unity 4 and right is deringed lightprobes in 2018.3. The lighting of the scene is kinda different (the main light source is brighter in Unity 4) so it's hard to make a 1-1 comparison (and I don't have time to actually try to match them better right now).

    In short, with deringing, the ringing is completely gone, but they also tend to have a bit less contrast (more pronounced here because of the lighting differences) than Unity 4 probes.
     
  42. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Both in gamma or linear space?
     
  43. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,795
    Both in Gamma.
     
  44. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Ah okay, yeah you did mention the light intensity are different, it's just the new one looks like tonemapped. Alright thanks, i'm just curious :)