Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Occlusion Culling in Unity 5.1

Discussion in 'Editor & General Support' started by jimmikaelkael, Jun 11, 2015.

  1. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    783
    Yesterday I tried to update my project from Unity 5.0.2 to 5.1 but I faced a crash when trying to bake Occlusion Culling at the end of the bake process.

    I tried to manually delete the Library folder from my project, rebaked Occlusion Culling but it didn't changed anything: Unity crashes.
    With Unity 5.0.1 and 5.0.2 it's fine (there's just a bug with showing visibility lines and occlusion portals in the scene view).

    Does anyone have the same problem with Unity 5.1 ?
     
  2. LightSource

    LightSource

    Joined:
    Sep 29, 2012
    Posts:
    249
    If it's reproducible file a bug report.
     
  3. Pecek

    Pecek

    Joined:
    May 27, 2013
    Posts:
    187
    Same here, tried to bake it 4 times without success(a few pixels remains, it's thinking for another 10-15 minutes then bamm, crash). It worked with 5.0.2.
     
  4. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    783
    Ok, I'm not sure if it makes a difference or not but on my side I'm on Win7 64bit and using 64bit edition of Unity.
     
  5. Binary42

    Binary42

    Joined:
    Aug 15, 2013
    Posts:
    207
    5.1 crash here when i try to access the Occlusion Panel. Win7/Unity 64bit.
     
  6. Aurore

    Aurore

    Director of Real-Time Learning Unity Technologies

    Joined:
    Aug 1, 2012
    Posts:
    3,106
    Please file bug reports with repro projects and post the number.
     
  7. Binary42

    Binary42

    Joined:
    Aug 15, 2013
    Posts:
    207
    I could track it down to the usage of SpeedTrees, #705299.

    Edit:
    To nail it down further, this only happens when there is baked data.
     
    Last edited: Jun 29, 2015
  8. emanuelbjorsell

    emanuelbjorsell

    Joined:
    May 4, 2015
    Posts:
    8
    Have the same problem, it crashes when I click the occlusion tab. But then I disable my unity terrain with SpeedTrees on it does not crash.
     
  9. PeterB

    PeterB

    Joined:
    Nov 3, 2010
    Posts:
    366
    Same problem here.
    Filing bug report.
     
  10. Kunani

    Kunani

    Joined:
    Apr 14, 2013
    Posts:
    16
    Same issue. Disabling terrain, clearing occlusion, enabling terrain, re-baking ends in editor crash as well. Running latest patch 5.1.1p2
     
  11. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    783
    Still the same with 5.1.1p4... Unfortunately.
    This is an issue clearly related to SpeedTree in the terrain itself. If they are placed as GameObject there's no crash.

    EDIT: As a temp fix to avoid crash I uncheck "Tree & Detail Objects" Draw checkbox in terrain settings, bake my Occlusion, then I recheck it after that.

    But however Occlusion Culling is not working anymore efficiently (like in 5.0.2)...
    Before I had larger Occlusion data, now it bakes occlusion blazingly fast with the same settings but occlusion data is only 48KB (versus more than 1MB in 5.0.2) and it's totally inefficient.
    Tried to play with settings, but didn't found good values.

    Unity 5.1 onwards is definitely a no go for me.
     
    Last edited: Jul 14, 2015
  12. Binary42

    Binary42

    Joined:
    Aug 15, 2013
    Posts:
    207
    Yea ... i still have a lot of trouble on 5.1
     
  13. Yog0

    Yog0

    Joined:
    Oct 1, 2013
    Posts:
    14
    Thanks. That worked for me.

    Going back to the occlusion culling window when the trees are on causes a crash again, but I'll take what I can get.
     
  14. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    783
    And what about Occlusion Culling efficiency ?
    Is it working as intended for you ?
     
  15. PeterB

    PeterB

    Joined:
    Nov 3, 2010
    Posts:
    366
    Unity 5.1.2 released, and Unity still crashes miserably when computing occlusion for a scene with SpeedTrees.

    Sometimes I really, really don't understand Unity's priorities. This is a very serious regression error. Projects have been submitted which provide repeatability of the error as soon as 5.1 appeared. Still Unity does nothing about it, despite several patch updates and despite the release of both 5.1.1 and 5.1.2?

    I really don't get it. Fix your regression errors. Get your act together, Unity.
     
  16. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    783
    Agreed, Occlusion Culling is a must have for some games.

    On my side I'd like to know a bit more what they have changed so that it became inefficient up to that point. At least in my case...

    Did anyone else noticed inefficiency with the new Occlusion Culling ?

    EDIT: There's also that bug that make visibility lines to not show up, which makes kind of hard to refine the settings.
     
  17. Binary42

    Binary42

    Joined:
    Aug 15, 2013
    Posts:
    207
    The SpeedTree issue will be fixed in 5.2
     
  18. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    783
    Cool :)

    Would be great to get someone from UT talking about the changes in Occlusion Culling algorithm.
    As I mentionned several times I'm unable to get it work properly till 5.1 (with the workaround to prevent the crash of course).

    That's mainly the reason I stick with 5.0.2 for now.
     
  19. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    783
    Had no answer...
    It's not documented anywhere, please someone answer my question above.
     
  20. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    783
    Well I was totally wrong: occlusion culling behaves exactly as before (except the crash with speedtrees enabled in terrain of course).
    In fact to do the workaround (disabling trees in terrain) I duplicated my terrain but I forgot to set it as static... Hence it was not taken in account by Umbra.

    So I'm moving my project to 5.1.2 tonight! :)
     
  21. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    449
    I don't know if it's relevant but in a scene with Speedtrees when I use occlusion portals I run out of memory and have to cut the power to my machine.

    It doesn't crash unless I have an occulusion portal over the Speedtree.
     
  22. Aurore

    Aurore

    Director of Real-Time Learning Unity Technologies

    Joined:
    Aug 1, 2012
    Posts:
    3,106
    The specific bug #705299 has been fixed as of 5.2

    @Glader It might be worth reporting that as a bug.
     
    jimmikaelkael likes this.