Search Unity

Light probes losing realtime GI data on load?

Discussion in 'Global Illumination' started by Erasmus-Crowley, Feb 26, 2018.

  1. Erasmus-Crowley

    Erasmus-Crowley

    Joined:
    Jan 29, 2016
    Posts:
    6
    Hi everybody!

    I already created a bug report for this, but while I wait for some kind of confirmation there, I thought I would ask here to see I've done something to cause it, or if anyone knows of a workaround for it.

    What I'm seeing is that right after I bake my lighting for my scene, light probes will illuminate dynamic objects with light coming from all the light sources in the scene, but when I build to exe, or load a different scene and come back, they're suddenly only lighting using data from emissive objects with the Global Illumination mode set to "Baked" and ignoring them if the mode is set to "Realtime".

    In this test scene the blue sphere on the left is "Baked", the red sphere on the right is "Realtime". The cube is a static object, and the smaller sphere is a dynamic object being lit by light probes. I'm baking using the progressive light mapper at the default settings.

    This is what it looks like immediately after I bake the lighting.

    After I load another scene and return, or I try to run the game as an exe, it becomes this...


    I first ran into it in 2017.1, I think. I tried updating to the latest 2017.3 build to fix it, and it didn't help.
     
  2. dom_cobb_22

    dom_cobb_22

    Joined:
    Feb 6, 2014
    Posts:
    24
    Similar problem. I have walls with a 'static' flag. Directional Light, a couple of Point Lights, all in Realtime Mode and Realtime GI turned on.
    And I have the doors (which is dynamic objects), that lits with Light Probes.
    When I bake light everything is good, but when I build the project, these doors are going to black in runtime and in Editor too, until I recompute GI.

    Please, attention to this. What can I try?

    Unity 2018.1.1

    LIght_Probes_issue_Good.PNG LIght_Probes_issue_Bad.PNG
     
    Last edited: Aug 2, 2018
  3. dom_cobb_22

    dom_cobb_22

    Joined:
    Feb 6, 2014
    Posts:
    24
    Baked light with Light Probes working good...

    Realtime GI and moving objects. Is that possible at all?
     
  4. dom_cobb_22

    dom_cobb_22

    Joined:
    Feb 6, 2014
    Posts:
    24
    Partially solve this problem following:
    Make my point lights in Baked mode, what takes to me some additional GI for my objects (more brightness).
    Then add one more point lights layer for just doors in Realtime mode (Culling mask - just one layer).
     
  5. tetto_green

    tetto_green

    Joined:
    Dec 22, 2015
    Posts:
    35
    Still same issue...
     
  6. fildax

    fildax

    Joined:
    Apr 7, 2017
    Posts:
    37
    Same for me BUT only when I use progressive lightmapper.
     
  7. CristobalAtria

    CristobalAtria

    Joined:
    Jun 30, 2017
    Posts:
    1
    Same issue here with progressive + Realtime GI. This also gives issues with LOD cause they uses lightprobes for the lower res models.

    i'm using Unity 2018.3.5f1

    When I bake the lighting it looks good.
    upload_2020-2-18_12-46-49.png
    Then I save the scene and reload it and get this:
    upload_2020-2-18_12-46-26.png
    The cube is not static, and it looks wrong. My LODs greater than LOD0 looks black so the transition is terrible, and I noticed the light probes looks also black.

    Obviously this is a test scene, I'm having this issue with a big production scene which takes 16+ hours to bake, so this is a real big pain...

    Have anyone found a solution for this problem?
    @Erasmus-Crowley Have you had any feedback on the bug report?
     

    Attached Files:

    Last edited: Feb 18, 2020
  8. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    you can watch



    but remember it very different in practice :)
     
  9. Erasmus-Crowley

    Erasmus-Crowley

    Joined:
    Jan 29, 2016
    Posts:
    6
    I wanted to post an update to this in case anyone is struggling with this problem and comes across this post. I was curious if any progress had been made on it, so I just loaded up the project that I used in the original post to reproduce this issue in Unity version 2019.4.8f1 and this problem still exists.

    My original bug report was closed as a duplicate issue, but I was forwarded to this bug report instead.

    https://issuetracker.unity3d.com/is...y-mode-when-baked-and-realtime-gi-are-enabled

    To summarize, the issue was closed with a resolution of "Won't Fix". The description says, "This issue has been identified as having low priority and has been closed without a fix. If the bug has no workaround and is blocking your production please feel free to reopen it with any additional information you might have. Sorry for the inconvenience this might cause."

    Looks like this bug is just going to be around forever, unfortunately. :(
     
    Last edited: Aug 21, 2020
  10. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    They won't fix because real time GI is enlighten and they depreciate that and stopped paying them. SO you need probably to go bake GI only or find another solution for real time.
     
  11. Dknighter2

    Dknighter2

    Joined:
    Aug 17, 2014
    Posts:
    44
    Does anyone know if using Bakery will fix it?
     
  12. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    No it won't, bakery just bake.
     
  13. Dknighter2

    Dknighter2

    Joined:
    Aug 17, 2014
    Posts:
    44
    I'd say this is a pretty major bug then, especially that it is in a LTS release.
     
  14. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Like I say, it's predicated on enlighten, they revoked the license to enlighten, therefore enlighten cannot offer support for integration. It's not a bug, it's an artifact of depreciation. People have been ranting about the lack of low end GI solution like enlighten, while unity is trying to roll out their own high end GI based solution of full raytracing or nvidia's rtxgi sdk (based on ddgi).
     
  15. Erasmus-Crowley

    Erasmus-Crowley

    Joined:
    Jan 29, 2016
    Posts:
    6
    I personally reported this bug nearly 3 years ago. There were others who reported it before me. This issue predates Unity's decision to retire Enlighten. Unity's fix is apparently to replace Enlighten entirely. I understand that.

    I don't understand why you're arguing that it's not a bug though. It shouldn't matter if Enlighten is deprecated, because deprecated systems can still have acknowledged bugs.The resolution of the bug might be "won't fix" or "can't fix", but it's still a bug.
     
    NotaNaN, futurlab_xbox and neoshaman like this.
  16. Erasmus-Crowley

    Erasmus-Crowley

    Joined:
    Jan 29, 2016
    Posts:
    6
    Now that there has been an announcement that Realtime GI with Enlighten is no longer deprecated, and it looks like it's going to be with us for a considerable amount of time in the future... Is there any chance that we might get someone to take another look at this issue?
     
    Ar7ific1al and NotaNaN like this.
  17. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    327
    We've just reopened the case since due to the change in plans regarding Enlighten. You can follow the status on the issue tracker: https://issuetracker.unity3d.com/is...y-mode-when-baked-and-realtime-gi-are-enabled

    Thanks for for bringing this up again :)
     
  18. Ar7ific1al

    Ar7ific1al

    Joined:
    Jan 21, 2014
    Posts:
    54
    That's nice but will this actually be fixed? I only just noticed this bug today and it makes my scene look like total crap. Using Enlighten to bake lightmaps is not an option. It looks terrible compared to progressive lightmapper, and it's entirely CPU bound so it takes way too long.
    Furthermore, if this is to be fixed, will it be back-ported to LTS versions of Unity? E.g. 2018 LTS, 2019 LTS? Or will it only be fixed moving forward, forcing those of us on previous LTS versions to continue to suffer with no realtime GI?
    Would love to see a complete replacement for Enlighten realtime GI.
     
    Ruchir likes this.
  19. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    327
    The issue has quite a substantial amount of votes and has been prioritized accordingly. It is currently being investigated. As far as I can tell, a refactor is warranted as part of the fix, so I can't provide an ETA. I think backports would make a lot of sense in this case - I'll make sure to request them.
     
  20. Ar7ific1al

    Ar7ific1al

    Joined:
    Jan 21, 2014
    Posts:
    54
    Thank you very much, that's very good to hear.
    Even if it takes a while to fix, it's very good to hear it's being worked on actively. Thank you for taking the time to provide this information! :)
     
  21. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    So I'm not sure if this is the same bug or not, but I'm using 2020.3.9 LTS and when I enter playmode, either my RealtimeGI checkbox gets unchecked (making me unmaximize/pause, recheck it, unpause), or more recently, my entire lighting of the scene seems to be changing when I hit play. I'm only using real time GI, nothing is baked. When I hit play, everything gets brighter, and even turning off all my lights still has the game being lit ... something funky is going on with the GI I assume. This persists until I redo the GI.

    The entire product I'm working on is dependent on realtime gi just working normally, so I'm hoping this gets stabilized soon ... I'm trying 2020.3.10 now, but it sounds like its an ongoing issue.
     
  22. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Attached are two pictures, the "before" is in editor after the realtime gi is finished, and "after" is when I hit play. What on earth is going on >.<. 2020.3.10f LTS still doing this.

    I added another "no_lights". Notice, there are 0 lights turned on, no post processing, no reflection probes, etc ... and everything is still lit. It all turns black when I clear the baked light data, as it should. Somehow, when I hit play, my GI seems to become some sort of base-line for the scene, then lights + actual realtime GI are added to that, or something.

    Okay ... more testing. I can clear my baked data. Turn off RealtimeGI. But when I hit play, now it does the opposite of what it did earlier today ... it TURNS IT ON by itself, and then does a weird bake automatically making everything super bright. Even when I have no baked data and its turned off.

    [Edit -- Making a new scene fixed this. Holy moly, bad bug ... glad thats all it was.]
     

    Attached Files:

    Last edited: Jun 1, 2021
  23. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    I'm experiencing this bug in Unity 2021.2.0b12, looks like this bug is alive

    For me, I set up a scene like this:

    upload_2021-9-25_20-22-21.png

    This is right after baking lightmaps with mixed lighting and realtime GI. Everything looks good.

    The Sphere is the only thing that isn't Static, it's supposed to be placeholder for my character.

    Then as soon as I enter play mode:

    upload_2021-9-25_20-23-43.png

    The sphere just goes black on the side where there's no direct light pointing at it.

    It's unbelievable this bug has existed for so long. I'm going to report this bug with my project files attached to hopefully help the devs repro this and fix it. I suggest everyone else do the same to help the devs solve it
     
  24. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,571
    I've run into this thing right now. Lots of fun.

    Coupled with inabilty to properly prefab lightmaps I'm wondering if I am supposed to run my own lightmapping system.
     
  25. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    There's now a resolution note added to the issue tracker page, it's looking like this is not going to be fixed until sometime in the 2022.x product cycle. That's absolutely crazy, it's a pretty important feature no? Is there at least some kind of workaround in the mean time?
     
  26. Zylex

    Zylex

    Joined:
    Nov 25, 2008
    Posts:
    238
    Running in to this problem as well, very problematic. Why exactly is something this important postponed?
     
    arvzg likes this.
  27. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    We are planning on addressing this issue as a part of a larger light probes-related refactor. I will bring this issue up again internally, and will follow up once there are any updates.
     
    davidrochin and LumaPxxx like this.
  28. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    657
    lol, a year later, still no resolve, amongst other seriously horrible light probe issues, and now its only being looked at for 2022... ?

    i Swear, some of these bugs are left in intentionally to prevent anything serious unless you paying for that elevated support. 'facepalm / tinfoil hat etc etc'. :D (Looks at nav mes issues across every major LTS, Custom Lists etc... O,o ).

    Ok, tinfoil hat off. /Resume.

    Note: Like this lovely gem, which pops on attempt to async retetrahedralize light probes after a scene change...bug?? I dunno, shrug. Its unity.. errors not very descriptive , and points no where, including a Google search which turns up 'Whooops'. meh. Hence, i ended up here.

    Code (CSharp):
    1. Assertion failed on expression: 'offsetIndex != -1'
     
    Last edited: Aug 18, 2022
  29. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Is this going to be fixed in 2022.1.x because we are using a plugin which relies on UnityEngine.Networking, but that has all been removed from 2022.2 So it turns out we are stuck because light probes are not working and we can not switch to 2022.2b because the plugin update will take time ?
     
  30. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Which 2022.1 version are you on exactly? This issue should have already been fixed in 2022.1.8f1.
     
  31. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi i'm on version 2022.1.19f1 using latest URP

    Actually in our case we are not using Realtime GI
    Anyway Light Probes are still not working with baked lighting

    That's in edit mode
    upload_2022-11-9_11-31-57.png

    And that's in play mode. Both spheres and some of the objects in the back that are not baked are not lit by Light Probes upload_2022-11-9_11-59-48.png
     
    Last edited: Nov 9, 2022
  32. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    From the looks of it, it appears to be another SkyManager-related issue. Read through this section in the troubleshooting guide, and see if the suggestions listed there would help. Otherwise, please report a bug.
     
    Vagabond_ likes this.
  33. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi,

    Thanks for that Lightmapping Troubleshooting Guide page, i've never come across it ! It did the job !
    it's the LightProbes.Tetrahedralize(); method was actually needed as the scene is loaded Additively !

    Cheers !
     
    icyuan and kristijonas_unity like this.
  34. icyuan

    icyuan

    Joined:
    Jul 21, 2019
    Posts:
    6
    I also encounted this problem. Here's my situation:
    I have 3 scenes, scene_Base, scene_A and scene_B.

    * I will load scene_Base firstly and then load scene_A in additive way, and set scene_A as active scene.
    (At this moment, light probes in scene_A works fine.)

    * Then I will unload scene_A and then load scene_B in additive way.(scene_Base will always exist).
    In this moment, light probes of scene_B become all black. However, it works fine when I open scene_B in Editor mode.

    Do you have any ideas?

    I'm using Unity 2021.3.2f1, HDRP 12.1.6
     
  35. icyuan

    icyuan

    Joined:
    Jul 21, 2019
    Posts:
    6
    Thank you! This works for me.
     
  36. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Have same problem it seems like unity messed something again (I encounter that problems with additive loading since 2017 version) Hope it will be fixed. Did you maybe resolved it? It seems like lightprobes are overrides in playmode from some reason. Did you have lightprobes on Scene _base?