Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Loading Occlusion Culling additively in Unity 5.5

Discussion in 'Editor & General Support' started by Grosnus, Jan 3, 2017.

  1. Grosnus

    Grosnus

    Joined:
    Mar 4, 2015
    Posts:
    17
    Since the release of 5.5 Unity is supposedly supporting multi-scene occlusion culling. Does it mean it is possible to use LoadLevelAdditiveAsync to load level with baked occlusion data?
    I tried baking for all scenes that are being streamed additively in my project, but occlusion culling doesn't seem to work that way at all.
     
  2. GloriaVictis

    GloriaVictis

    Joined:
    Sep 1, 2016
    Posts:
    133
    Bumping the question.
     
  3. SaraCecilia

    SaraCecilia

    Joined:
    Jul 9, 2014
    Posts:
    675
    Hey, we do have an issue where OC doesn't work for additively loaded scenes if the original scene doesn't have OC baked. A workaround is to have occlusion culling baked for the loader scene. This can be done by adding static mesh, baking OC and removing mesh.
     
  4. GloriaVictis

    GloriaVictis

    Joined:
    Sep 1, 2016
    Posts:
    133
    We did a OC into scene which we have loaded before additively loading another scenes (lets say its a "UI" scene on which we are loading chunks of game world) and its not working.

    Maybe we need to bake it also on the first scene game is launching? Its a login scene for us, and than we are loading next scenes (character selection and than main game) but not additively.
     
  5. Grosnus

    Grosnus

    Joined:
    Mar 4, 2015
    Posts:
    17
    I've tried debugging what is going on with OC on a new empty project (Unity 5.5.0p3).
    I created two scenes, first one - the one that will be additively loaded contains floor, wall and some spheres (https://i.gyazo.com/aa6b3b94178d7549f9bc8ef5e16552f7.png). The floor and the wall have both occluder and occludee static flags set, the spheres are only marked as occludee.
    As you can see OC is working fine if I play this scene:



    Second scene, the one loaded normally, contains only camera, light and floor positioned exactly the same as in the first scene (https://i.gyazo.com/1406c38778ff25fd703b3b93ac0381e6.png). This scene also has occlusion baked. Once the scene is played I load the first scene using LoadSceneAsync.
    OC does not work in this case:



    NOTE: the wall is opaque during OC baking process, I only made it transparent afterwards, to see what is going on.
    There is no difference in result if I delete the floor from main scene or not after baking.

    I am not sure what else has to be done to make this setup work, what I tested seems to be the simplest case.
     
  6. GloriaVictis

    GloriaVictis

    Joined:
    Sep 1, 2016
    Posts:
    133
    Bumping, that was the feature we've been waiting for 5.5 most and its not working.
     
  7. SaraCecilia

    SaraCecilia

    Joined:
    Jul 9, 2014
    Posts:
    675
    Yeah, so I checked with the team since the Docs also have it listed as a known issue ("Occlusion culling data from Umbra can still not be loaded additively") and it seems the only way right now is to bake with all your scenes loaded.
     
  8. GloriaVictis

    GloriaVictis

    Joined:
    Sep 1, 2016
    Posts:
    133
    https://unity3d.com/unity/whats-new/unity-5.5.0
    • Graphics: Multi-Scene occlusion culling now works correctly. Culling data has been extracted to a separate Asset, and can be baked/reloaded with multi-Scene setups. Note that the data is stored relative to the active Scene, and is loaded correctly when loading any Scene or group of Scenes that reference it.
    So its not working at all at this moment, am I right?

    As our game is pretty big, won't computing the one big Occlusion every frame just to oclude some objects (as we load neightbour scenes additively) make more overhead than rending models actually?

    Btw. we have actually tried baking it for entire world but it crashed after 12 hours of baking.
    Most probably due to out of ram (32gb in here actually).

    So, should we add this as a issue on issuetracker? Honestly speaking, we were waiting for a few years for this feature already, thats pretty sad.
     
  9. SaraCecilia

    SaraCecilia

    Joined:
    Jul 9, 2014
    Posts:
    675
    The release notes are correct. When you bake multiple scenes, a ref is stored to each scene in one big occlusion data bundle - then scenes can be loaded / unloaded / additively, but the occlusion data is still a big blob, it’s not additively loaded itself. But yeah, in the end if you bake 100 scenes together, but only load one - you’re still loading the occlusion data for the 99 other scenes.
     
  10. GloriaVictis

    GloriaVictis

    Joined:
    Sep 1, 2016
    Posts:
    133
    Ok, so is there any chance we would have this working on additive loading anytime soon?
    This is the only way I know to maintain a big project without keeping everything loaded, still we are having performance overhead because not using such a basic tool like occlusion culling.
     
  11. GloriaVictis

    GloriaVictis

    Joined:
    Sep 1, 2016
    Posts:
    133
  12. pixelsplit

    pixelsplit

    Joined:
    Sep 16, 2013
    Posts:
    173
  13. dkm

    dkm

    Joined:
    Sep 9, 2013
    Posts:
    22
    Yeah, I'm having the same issue, it would be nice to know if this is on the roadmap at least (I couldn't see anything about that in the 5.6 notes/roadmap).
    I don't think it's going to be doable for me (memory-wise) to load all scenes and bake the occlusion at once...
     
  14. GloriaVictis

    GloriaVictis

    Joined:
    Sep 1, 2016
    Posts:
    133
    For us its impossible and we have 32gb rigs, also overhead from using that big occlusion while having just a small part of map loaded is nowhere close to be acceptable.
     
  15. Queso2469

    Queso2469

    Joined:
    Aug 31, 2017
    Posts:
    1
    Bumping this to see if anyone has another workaround or news on this. Sadly I can't bake everything at once since the 20 or so levels I'm working with all have to load into about the same place in the world. Project is way too old and way too large to rewrite our whole level loading logic around non-additive loading.
     
  16. kunst-stoff

    kunst-stoff

    Joined:
    Sep 2, 2014
    Posts:
    9
    I think this feature working properly is really essential for open world games.
    Gloria, can you temporarily delete all textures in your project and try to load all levels again? Maybe it fits in your memory and the baking is possible. We did a similar project but got the error message that there are too many colliders loaded.
     
  17. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    I know this is an old thread, butDoes anyone know if this ever got solved?

    I’m able to bake Occlusion for multiple scenes and have it work correctly Unity (2917.4.14), HOWEVER I can’t possibly open all of my scenes into memory at the same time....they won’t fit.

    Is there a way to bake each independently and merge the Occlusion data?
     
  18. ImproxGames

    ImproxGames

    Joined:
    Apr 3, 2017
    Posts:
    20
    This problem still persists in 2018.3. We have an "Essentials" scene always loaded, which has a GameManager etc. This scene then loads the actual level scenes, additively. So upon level switching, the OC data of the new scene does not get loaded, but the OC data of the old scene persists.

    Baking all levels at the same time, every time one level has been changed, seem inefficient.
     
  19. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,650
    If you're able to reproduce this issue, please submit a bug-report, including a (mini) project to reproduce the issue, as described in this document:
    https://unity3d.com/unity/qa/bug-reporting

    Submitting a bug-report allows Unity Technologies to take a look at this issue. Unfortunately, the forum isn't really the place where UT is looking for bug reports (more).

    After you submitted the bug-report, you receive a confirmation email with a bug-report Case number. You can post this Case number (the number only, not the link) in this forum thread for Unity staff to pick up, in case they see it.