Search Unity

Occlusion Culling Data Not Saving

Discussion in 'Editor & General Support' started by ShadyAlien, Jul 1, 2015.

  1. ShadyAlien

    ShadyAlien

    Joined:
    Aug 28, 2009
    Posts:
    210
    I'm not sure if I'm posting this in the right place, but I'm having an issue with occlusion culling after I bake it. Initially it says there's 2.0 mb of data or however much there is depending on the scene, but as soon as I hit play, the data disappears and the scene performs as it would if it were just using view frustum culling. There are no errors or anything like that, and everything seems to be working fine up until I hit play. Has anyone else experienced this problem?

    Edit: Saving the scene and restarting the editor also kills the data. This also happens on any scene, be it a fresh new one or an already existing one.

    Edit edit: Solved! I deleted the library folder and upgraded to unity 5.1 Somewhere between those two things, that solved the problem.
     
    Last edited: Jul 2, 2015
  2. DarthDisembowel

    DarthDisembowel

    Joined:
    Jun 11, 2014
    Posts:
    54
    I am getting this now all of a sudden, and deleting the Library folder doesn't fix it. Anyone have any other suggestions?

    After I bake the occlusion, I test in the editor and the results are perfect, but when I save, close and reopen the project, the results are completely different and render much more than what I saw before I closed the editor. Any builds will have the broken occlusion culling too, even if I build without closing the editor first.

    This seems to happen from time to time and it eventually resolves itself somehow, but I hate being dependent on chance like this. :)
     
  3. DarthDisembowel

    DarthDisembowel

    Joined:
    Jun 11, 2014
    Posts:
    54
    Note that in my case, the Occlusion data size remains unchanged (i.e. still shows 2.0 mb), even though the visualization is completely different (only frustum culling). @Ramandu : Did your Occlusion data size actually reset to zero when this happened, or did you just notice the difference in the visualization?

    Also, OC in play mode works for me after baking, until I restart the editor, then it is broken again.

    Please let me know if this is the same behaviour you saw, otherwise I will open a separate thread.

    I have submitted a bug report with a repro in a test scene. Case # 725002
     
    Aurore likes this.
  4. Aurore

    Aurore

    Director of Real-Time Learning

    Joined:
    Aug 1, 2012
    Posts:
    3,106
    Thanks for the bug @DarthDisembowel (It's also really well written and explained)

    Have you tried to repro in 5.1.3?
     
  5. DarthDisembowel

    DarthDisembowel

    Joined:
    Jun 11, 2014
    Posts:
    54
    @Aurore : Thanks! I saw a post here saying how a bug report should be formatted :)

    Yes, I was actually entering another report on a %100-repro crash we get when trying to play or build in 5.1.3 with an oculus rift attached, and while I had 5.1.3 installed I checked to see if this bug is still present, and it is. Reverted back to 5.1.2 and I still have it.

    I'm anxious to hear if your QA team is able to reproduce it in the test case I sent. OC was working fine for me until recently so it might be a local problem, but I can't imagine what would trigger this behaviour.
     
    Aurore likes this.
  6. DarthDisembowel

    DarthDisembowel

    Joined:
    Jun 11, 2014
    Posts:
    54
    I just installed the 5.1.3p2 patch released today, and though it fixes the crash on play or build as advertised, I still have the same occlusion issues.

    I did receive an email from Unity QA saying that they were able to reproduce the bug with my data and it has been forwarded to the developers to fix, so hopefully it won't be too long.

    I'm losing 20 fps to this bug, and I'm developing for the Oculus Rift, so it is critical that I maintain 75 fps. AND I've submitted my game to the Unity awards this month and I'm trying to get a final version out, but I can't submit a version at 50 fps for VR, unless I want to make all of the judges throw up. :(
     
  7. DarthDisembowel

    DarthDisembowel

    Joined:
    Jun 11, 2014
    Posts:
    54
  8. DarthDisembowel

    DarthDisembowel

    Joined:
    Jun 11, 2014
    Posts:
    54
    Still occurs in 5.2.0f3. Also installed Windows 10 (not that it should make a difference) :(

    I've tried adding occlusion areas, deleting the library folder, and even reverted my Unity version all the way back to 5.1.1p3, with no change whatsoever. I noticed that after baking OC and seeing a good result, I don't even need to restart the editor to break it, I can just double-click the current scene in the project explorer to refresh it and the culling is immediately broken.

    If anyone has any suggestions at all for a workaround, I'd be very grateful, as I'm showcasing my game at Unite Boston in 11 days and I'm getting desperate. @Aurore : any chance you can poke around and see if anyone is working on this?

    And please upvote to put some pressure on: http://issuetracker.unity3d.com/iss...on-results-change-after-restarting-the-editor
     
    Last edited: Sep 10, 2015
  9. DarthDisembowel

    DarthDisembowel

    Joined:
    Jun 11, 2014
    Posts:
    54
    BTW, if you are using occlusion culling in your scenes, I suggest you double check the result after a bake by reloading your scene. For a long time I thought it was working based on the visualization after baking, not realizing that it was misleading and that those seemingly perfect results were lost when reloading or building a standalone version.
     
  10. Haze-Games

    Haze-Games

    Joined:
    Mar 1, 2015
    Posts:
    189
    I agree I have the same issues without Occulus Rift in the project, with Unity 5.2.3f1. Just a "normal" non-VR project; My occlusion data is perfect once freshly baked, and if I reload the scene, the data is broken and I have false negatives randomly all over the place. This happens to normal static occluder objects, as well as occlusion portals which act as "half open" when they are supposed to be closed.
     
  11. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    472
    repro'd with 5.3.4f1
     
  12. DrivingSim

    DrivingSim

    Joined:
    May 28, 2013
    Posts:
    32
    Can anyone answer these questions?

    1) tell me if occlusion data is per scene. If so, why do I see the same occlusion data in 16 different scenes when I open the occlusion window? In other words I baked occlusion data in one scene and see the same data in every scene I open thereafter...makes no sense.

    2) What about dynamic scenes? Should I bake in the world scene that's being loaded asynchronously or the root scene that does the loading or both? Can't find info in docs or online regarding the new scene loading techniques that U5.3 is using.

    Thanks.
     
  13. Acreates

    Acreates

    Joined:
    Dec 12, 2016
    Posts:
    41
    I am getting this
    Saved the Scene file under a new name
    I believe that all dependencies are still pointing to the old scene name
    When I calculate occlusion and lighting I'm not getting any data files in the project folder.

    I think it's because I saved the file under a new name.
     
  14. Riz1

    Riz1

    Joined:
    Nov 11, 2015
    Posts:
    4
    after restart scene occlusion culling break in unity3d. Can anyone help me please?
     
  15. ss0cratess

    ss0cratess

    Joined:
    Oct 23, 2018
    Posts:
    4
    reproduced with 2020.3.48f1, did anyone find a way around this?
     
  16. ss0cratess

    ss0cratess

    Joined:
    Oct 23, 2018
    Posts:
    4
    Same here
     
  17. Anvarito

    Anvarito

    Joined:
    Sep 13, 2017
    Posts:
    8
    2022.3.4f same problem
     
  18. WidmerNoel

    WidmerNoel

    Joined:
    Jun 3, 2014
    Posts:
    65
    I had this issue too. In my case the occlusion asset was being being created but the scene asset was not being associated with it. Make sure that your scene asset contains the guid of the occlusion asset. This should be easy to verify in your version control. Either manually save the scene or switch the scene after the bake to prompt the save dialog.