Search Unity

Unity 5.2.1p2: Realtime lights not working - Occlusion Problem

Discussion in 'Editor & General Support' started by ArachnidAnimal, Oct 2, 2015.

  1. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,835
    Edit: Problem still exists

    I just upgraded to Unity to 5.2.1p2 from 5.2.1p1 and noticed about 1/2 of my realtime lights weren't working anymore.
    Just in case anyone else runs into the issue.
     
    Last edited: Oct 2, 2015
    drumonman likes this.
  2. drumonman

    drumonman

    Joined:
    Nov 25, 2013
    Posts:
    5
    Hey I'm having a similar issue with 5.2.1p2, re-doing the occlusion seemed to help with some lights, but any realtime light that has shadows enabled is not working at all. If I disable shadows on those lights, they work just fine. Also, if I disable occlusion culling on our main camera, lights and shadows all work as intended. Tried messing around with related quality settings and nothing is working. This was not happening in previous patch.
     
    ArachnidAnimal likes this.
  3. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,835
    YES. i just found that the issue is still occuring today.
    Case 733005

    I uploaded it to dropbox if anyone wants to see for themselfs:
    https://www.dropbox.com/s/bbhtmbfrzhhfu25/BugReport-RealtimeLightsOcclusion.zip?dl=0
    It's only 2 MB download

    To reproduce:
    1. Notice the realtimelights are working
    2. Bake the occlusion data
    3. Suddenly the realtime lights turn off in the editor and player
     
    Last edited: Oct 23, 2015
    Haydar-AYDIN likes this.
  4. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,835
    Turning off the shadows also ellimated the problem. So it sounds like we both have the same issue.
     
    drumonman likes this.
  5. I also have this problem but I think I'm going back to 5.2.1p1
     
    drumonman likes this.
  6. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Same issue in 5.2.1p3, ever since p2
     
  7. Deleted User

    Deleted User

    Guest

    Same issue here. Turning off Shadows on the problematic Lights or Culling on the camera fixes the issue. Also clearing the Occlusion Culling data fixes it. Can anyone confirm going back to 5.2.1p1 fixes it?

    Thanks
     
  8. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,835
    Unity hasn't even addressed my bug report yet (above). Apparently they aren't responding to OC related bug reports.
    I spent 4 hours generating bug report that they don't even respond to.

    What really irks me is that bugs keep getting into new patches which are unrelated to anything added to the Unity release notes. If you look at the Unity 5.0+ release, there is nothing in there related to OC changes. This happens over and over again.
     
    Last edited: Oct 12, 2015
    drumonman and LeonH like this.
  9. BlackMill-Games

    BlackMill-Games

    Joined:
    Apr 16, 2009
    Posts:
    2
    Shameless bump. Is this related to the things implemented in the 5.3 cycle under the hood perhaps?
     
  10. Silent8Strike

    Silent8Strike

    Joined:
    Mar 10, 2014
    Posts:
    29
    Can also confirm this issue coming from 5.2.1p1 to 5.2.1p3. Clearing occlusion data fixes it for now, but performance obviously tanks because of this. Looking forward to a solution (or a least a response?), occlusion culling is a pretty major feature in my opinion.
     
  11. Downloading now the 5.2.1p4 patch

    EDIT: still not working
     
    Last edited by a moderator: Oct 14, 2015
  12. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Still there in 5.2.1p4. We were finally able to update from 5.2.0f3 (subsequent releases broke version control in P4), but now our entire game is pitch black.

    Realtime lights and occlusion are common features, and their combination is not some fringe case. How did QA not catch this regression?
     
    Last edited: Oct 15, 2015
    ArachnidAnimal likes this.
  13. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    Hey,
    Currently looking into the issue. I have identified what introduced the problem so just looking at if we need to backout the change or if we can fix it. Hopefully we will have a solution in a patch in the near future.
     
    ArachnidAnimal likes this.
  14. LeonH

    LeonH

    Joined:
    Oct 15, 2014
    Posts:
    92
    BTW, has anyone tested if this problem can be worked around by setting lights to mixed mode rather than real time? I highly doubt it, but it might be worth a shot. Even if that works, it would probably be a complete workaround only for projects that use no static lighting at all. But that would work for our projects. If someone tries this, please post!
     
  15. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    Hi.
    We updated Umbra and it seems to have introduced some problems for us. I am speaking to the dev who is looking into if we can fix it or backout the change. If we back it out then its likely to cause issues for people building for PS3 though.
     
    LeonH likes this.
  16. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Didn't work for me, but as soon as I changed a light to Mixed it popped up a warning under the Baking property saying that we need to enable Baked GI for Baked or Mixed to work. I guess we don't have Baked GI enabled in this scene, but to be honest I have been letting our artist and LD focus on lighting and don't know much about that whole process.
     
  17. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Cool, thanks for the update. The question that comes to mind for me is what percentage of teams are building for the PS3 versus PS4/XB1/PC/Mac. That sounds like a loaded question, but it's not intended to be; I have no idea what the numbers are, and for all I know there are still a large number of last-gen platform teams.

    If it's a small number compared to current gen platforms, perhaps someone could reach out to PS3-dependent teams and let them know not to update if it's backed out? Or offer a custom build with Umbra that works for PS3?

    That might be more trouble than it's worth, of course, or not feasible. Just a thought in case the # of PS3 teams is significantly smaller than the # of teams affected by this on non-PS3 platforms.
     
  18. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    Its fine we have a fix now, should be out in an upcoming patch.
     
    LeonH likes this.
  19. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Great news! Thanks so much for hopping on this so quickly; it is much appreciated.
     
  20. LeonH

    LeonH

    Joined:
    Oct 15, 2014
    Posts:
    92
    Yeah Karl, thanks so much! But I am afraid you made a huge classic mistake by demonstrating your effectiveness, as I now have someone's shoulder to tap on directly! muahahaha...
     
    karl_jones likes this.
  21. LeonH

    LeonH

    Joined:
    Oct 15, 2014
    Posts:
    92
    Oh yeah, I also wanted to mention-- as far as I can tell, the release notes for the patch where this problem started made no mention of an Umbra update or anything else related to OC. I know it's easy to miss things when putting together release notes, but it would be useful to try to include info about revs to Umbra (and PhysX, etc). It would be an indicator that we may want to pay special attention to stability and perf of that system when evaluating the patch. Even if we are happy with our current patch level, if I see something like a rev to Umbra or Physx, I definitely want to evaluate the patch in case there may be a performance boost to be had!
     
    Last edited: Oct 16, 2015
    ArachnidAnimal likes this.
  22. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    It looks like the release notes about Umbra were in the PS3 release notes which are kept separate due to NDA.
    I don't believe the Umbra update provides anything special, it was needed to support the newer Cell SDK for PS3.
     
  23. StealthStudiosInc

    StealthStudiosInc

    Joined:
    Oct 22, 2014
    Posts:
    5
    Hi, we also have this issue in 5.2.1 patches 3 and 4, which is a very big deal for us seeing as how we're gearing for a Halloween promotion. Having realtime light shadows in a baked scene seems as though it should be an EXTREMELY high priority.

    We were also instructed to update to at least patch 3 in order to resolve another Unity5 bug issue pertaining to resolution. So, here we are, seemingly stuck in a bug loop.

    Which version of Unity5 should we revert to in order to have realtime lights/shadows after a bake as well as resolve the resolution issue? When playing in the Editor, Directional lights seem to ignore this bug; all other realtime lights, while working as intended in the Scene view, are completely absent from the Game view unless shadows are turned off. Lighting our scene with only probes is unfortunately not a solution. A very distressing conundrum to say the least, with our deadline looming.

    If anyone has a hack solve, we'd love to hear it!
     
    Last edited: Oct 21, 2015
  24. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    The fix for missing realtime lights after baking occlusion data is in patch 5.2.2p2, this is scheduled for a mid week release next week however releases can sometimes slip if QA raises issues. I believe the resolution issue came in 5.2.0 so rolling back to the last 5.1 may work for the moment.
     
  25. StealthStudiosInc

    StealthStudiosInc

    Joined:
    Oct 22, 2014
    Posts:
    5
    Hi Karl,

    Thanks for the response. Unfortunately, 5.1 has a resolution bug that affects full screen mode. This bug is resolved 5.2.1p3, which as we know, has the 'realtime lights' bug. So, our current options are to either have a game that works which is lit by probes and lightmaps only, or a game that looks pretty but breaks when changing resolution.
     
  26. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Hopefully stories like these will contribute to a change in process at Unity that puts more focus on maintaining the stability of existing features. We were stuck on 5.2.0f3 -- which was incredibly buggy and required constant restarts -- for over 5 weeks because the first patch broke P4 integration and we couldn't upgrade.

    The entire 5.2 branch has been unbelievably frustrating; as soon as one critical bug is fixed, another equally bad one crops up. I'm not aware of any 5.2 build or patch that works for our team; right now we are running at a bad framerate due to having to clear occlusion data because our entire game uses lights that no longer work with occlusion. 5.2.2p2 will be the first stable 5.2 build for us ... if it does fix the lighting issues without introducing new critical bugs. We honestly may never update again if we get a known working build, which is a sad state of affairs given that we're still 6 months from shipping.

    I'm just hoping that the extreme fragility and instability of 5.2 will lead to meaningful internal changes at Unity. I would much rather have a dependable engine than a steady flow of new features if the constant forward march comes at such a cost to existing games and teams. Obviously new features are going to come, but there's a delicate balance between creating new functionality and preserving what's there, and right now the balance is tipped way too far toward new features.
     
  27. LeonH

    LeonH

    Joined:
    Oct 15, 2014
    Posts:
    92
    Check out the 5.3 beta forums and poke around for what Alex has to say about this sort of thing. Short version: don't hold your breath. The people with the power to influence decisions like you're hoping for are either oblivious, in complete denial, or have their hands tied (it's impossible to know from outside) regarding how much of a disaster 5.2 has been for people trying to ship large projects.

    Hopefully 5.3 turns out better for our other project, but we're stuck with 5.2 for the current one. To be completely fair though, we really shouldn't be trying to use an engine rev that was released just 2-3 months before we need to enter cert. That's pretty crazy, but it was a judgment call based on risk comparisons: we needed 5.2's fixed function shader support because we have a lot of fixed function legacy shaders and I had no idea how long it would take me to learn enough about shaders to write them properly. (That aspect of 5.2 works really well, by the way!)
     
    Last edited: Oct 23, 2015
  28. StealthStudiosInc

    StealthStudiosInc

    Joined:
    Oct 22, 2014
    Posts:
    5
    We'd be happy with realtime lighting. Which I thought was pretty standard since... roughly over a decade ago? We have a zombie game that can't even use flashlights anymore, and our biggest promotion day of the year, Halloween, is next week. Yay!
     
  29. SpreadcampShay

    SpreadcampShay

    Joined:
    Dec 9, 2010
    Posts:
    180
    I see it in the release notes, but I'm sorry to say it's still not working... I already tried clearing and rebaking the Occlusion, even tried emptying out the Library/Occlusion folder myself since it keeps old files around - but nope. The only difference with this release is that 1 of the shadow casting realtime lights that are missing sometimes flickers into existance when I look around, while all the others stay missing.

    EDIT: If you follow the link to the issue tracker it says "Status: Fixed in Unity 5.2.3" - is it actually next week and someone left this in the notes by error?
     
    Last edited: Oct 30, 2015
  30. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    The fix was verified by QA to be in 5.2.2p2. It could be you are suffering from a different bug. Can you create a bug report with a reproduction and post the number here? I will get QA to see if its the same problem.

    The milestones don't include patch releases, they are just for normal releases.
     
  31. ChrisSpears

    ChrisSpears

    Joined:
    Sep 17, 2012
    Posts:
    6
    I just updated to 5.2.2p2 and still see the issue as well. Had several other engineers verify that they also saw it. I also tried clearing my occlusion and rebaking with no luck. Please reopen the issue.
     
  32. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    How can 5.2 consistently be this unstable, and how can the internal process for verifying fixes be just as broken? 5.2 was release over 7 weeks ago and there is still literally not a single 5.2 build or patch release we can use without major, game-breaking issues.
     
  33. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    The reported bug 733005 is fixed. The provided reproduction now works against 5.2.2p2, I just checked it myself.
    There is no use reopening the bug without a new reproduction. Try the reproduction project for yourself, TTTTTa provided a link: https://www.dropbox.com/s/bbhtmbfrzhhfu25/BugReport-RealtimeLightsOcclusion.zip?dl=0
    We will need a new project that shows the issue you are having as the one we now have works.
    If someone can create a new bug report with a sample project I can take a look.
     
  34. Tried the project and it seems to be working, but when I added other lights everything broke.

    Added some spotlights and it broke, as soon as I cleared the data lights came back
     
    Last edited by a moderator: Oct 30, 2015
  35. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    Can you upload that project as a bug report and post the bug id? I have tried and can not recreate it.
     
  36. LeonH

    LeonH

    Joined:
    Oct 15, 2014
    Posts:
    92
    Just tried 5.2.2p2 with a completely clean reimport. Realtime lights are still broken with occlusion culling (some lights are OK, most are not).Looks like we're not going to be hitting our holiday release.

    I don't really know what to say at this point. What's the use?
     
  37. SpreadcampShay

    SpreadcampShay

    Joined:
    Dec 9, 2010
    Posts:
    180
    I made my own repro for you by trimming down from my own project, it's still a bit large but I hope it will serve the purpose. After some initial trouble to send it, the Case Number is 740988
     
    Last edited: Oct 30, 2015
    karl_jones likes this.
  38. Reported with projects files, case number is 740977
     
    karl_jones likes this.
  39. LeonH

    LeonH

    Joined:
    Oct 15, 2014
    Posts:
    92
    This is a pretty classic case (which mostly afflicts inexperienced engineers) of, "well, it worked in my test level!" where only a small subset of conditions are tested by the person fixing it. Sure, the fix might cover some of the problem conditions (i.e. the ones exposed in the test level), but unless part of the process is to test fixes in production levels, there is no way to be sure they have all been caught.

    The missing piece here is testing in production levels, because Unity only wants bug reports in a small test level. Actually, the piece isn't missing, the piece happens when the patch is released and then customers get to do the QA in production levels.

    I don't think this problem will go away unless the "test in production levels" step can happen before an update is released to the public. I know small test projects are convenient, especially to jump start initial work on a bug, but it seems like there also needs to be a formal way to incorporate testing of bug fixes in actual production projects before the fixes are released in patch.

    If Unity were more agile, it wouldn't be such a problem. For example, now that we know this fix is not comprehensive, if it could be prioritized and a "hot fix" released within days that addressed only this one issue (frankly, what should have been done when it was originally broken), it wouldn't be a problem. But now that the fix has failed, given what appears to be the current lead time from a bug being reported to it being fixed and released in an update, it will be weeks, if not months.
     
    ArachnidAnimal likes this.
  40. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    Thanks. I just spoke to the developer who made the previous fix and he is now looking at it.

    We do have full projects we test against however not for patch releases as this is a long process. We do full testing against projects for our major releases 5.x which takes multiple weeks. For patch releases we use automated tests and QA verify the individual fixes.
    The issue has been prioritized, the developer who made the previous fix is now working on it.
     
    Enrico Monese likes this.
  41. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,835
    This is exactly why I make all of my bug reports public and upload it to Dropbox for EVERYONE to see.
    Had I not done this, I would have downloaded the Unity patch, only to find out, like everyone else, that something is still broken. Then I would have to spend more time submitting a bug report again.

    What I'm not understanding here, is how the fix could work for the existing lights in the repro, but yet when you add additional lights, the problem occurs again. I've been sitting here for 30 minutes trying to imagine how that can happen. The only conclusion I can draw is that someone didn't take the time to see the larger picture of the bug report, and the fix was done just to handle that particular situation. There is an interesting thread here which explains this issue:
    http://forum.unity3d.com/threads/please-unity-slow-down.361090/
     
  42. LeonH

    LeonH

    Joined:
    Oct 15, 2014
    Posts:
    92
    In my experience, this is actually quite a common pattern with inexperienced engineers. It just takes a while of mentoring and monitoring, teaching them to take some initiative and think comprehensively (and preemptively) when addressing bugs, rather than focusing narrowly on just what's laid out in front of them. I have to imagine that at the rate Unity is growing, there is a lot of mentoring going on right now. :)
     
  43. xDavidLeon

    xDavidLeon

    Joined:
    Jun 9, 2014
    Posts:
    123
    Ahh... look at me.. thinking I was going to finally be able to leave behind 5.1..

    As the others said, lights don't work with Occlusion Culling enabled.
    I wish there were 'nightly' builds or hot-fixes available instead of having to wait > 1 week for another try at "let's see if the new Unity build is usable in production'". Each time a new build fixes a major issue it creates a new one.
     
  44. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    Hi.
    The real time lighting issue is now fixed, its on its way to 5.3 and will then be back ported to 5.2. The visualization of occlusion data issue is now also fixed in 5.3 so I have added that to our 5.2 backport queue. Apologies for the problems, I can understand the frustration. We now know we have some holes in our occlusion tests which we will fill so this does not happen again in the future.
     
    ArachnidAnimal likes this.
  45. LeonH

    LeonH

    Joined:
    Oct 15, 2014
    Posts:
    92
    Thanks for the update, Karl. Given this info:
    • Our project is currently on 5.2.1p1.
    • 5.2.1p1 (and its predecessor 5.2.1f1) is unstable, with frequent crashes in the GfxDeviceWorker system.
    • Support threads have indicated upgrading to newer releases in the 5.2.1 and 5.2.2 line could alleviate crash problems, due to fixes in that system as well as memory handling.
    • We are unable to perform such upgrades as all 5.2 releases after 5.2.1p1 have broken realtime lights when occlusion culling is used: our project is 100% realtime lights and requires occlusion culling for shippable frame rate.
    • We need to enter cert for PS4/XB1 by the end of November, for a holiday release.
    Nevermind any frustration, it's irrelevant at this point and I am beyond that. What I need is concrete advisement for how to proceed, given the above info and the status update you just provided.

    How do we go about shipping our project? Do we need to downgrade to a different version of Unity? If so, what would be the specific recommended version, given we are currently on 5.2.1p1? If we need to downgrade, will there be any problems with assets that have been created or modified using 5.2.*?

    Or will the backported fix be available in 5.2 within the next week or two, and we should hold steady at 5.2.1p1 and plan to be able to upgrade in time to have a couple weeks of stability testing before entering cert?

    Or are we advised to notify our publisher that the current time frame is not feasible, and they need to wait an unknown amount of time for 5.2 (or 5.3) to be stable enough for our game to enter cert?

    Please help! The period of just trying to make good general decisions and letting that guide things in the right direction is passed for this project. We need very specific advisement regarding this issue.
     
    OneThree likes this.
  46. LeonH

    LeonH

    Joined:
    Oct 15, 2014
    Posts:
    92
    FYI to anyone following this topic: Karl and Richard are 100% on top of this, we're working on testing it offline, and hopefully the results of that will mean this will be fixed for real (in 5.2) asap!

    Oh, and did I mention that Karl and Richard are fantastic and that even though we pesky customers can be annoying when frustrated, all their support on these forums is very much appreciated? If not, well, I just did!
     
  47. DarthDisembowel

    DarthDisembowel

    Joined:
    Jun 11, 2014
    Posts:
    54
    Is there an ETA? This week's patch? Next week's?
     
  48. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    The fix will be available in next weeks patch. 5.2.2p4. We are just verifying it at the moment, so far it looks promising.
     
    holliebuckets likes this.
  49. DarthDisembowel

    DarthDisembowel

    Joined:
    Jun 11, 2014
    Posts:
    54
    Ok, thanks Karl :)
     
  50. TeohRIK

    TeohRIK

    Joined:
    Jan 22, 2014
    Posts:
    106
    thanks karl for your information