Search Unity

Cannot bake Occlusion. Out of memory in TomeGenerator

Discussion in 'Editor & General Support' started by hoesterey, Jan 28, 2017.

  1. hoesterey

    hoesterey

    Joined:
    Mar 19, 2010
    Posts:
    571
    Hi,
    I'm unable to bake occlusion in a pretty simple scene. I'm getting the following errors:
    Error occurred in occluder data computation:
    Out of memory in TomeGenerator

    Here are my settings (its a airship game hence the large numbers):
    upload_2017-1-28_9-47-31.png

    I have 32 GB of ram on this PC.


    Thoughts?
     

    Attached Files:

  2. ramy_d

    ramy_d

    Joined:
    Oct 12, 2014
    Posts:
    19
    Same here, system has 60 GB of ram.
     
  3. LtKelleyUSMC

    LtKelleyUSMC

    Joined:
    Oct 6, 2012
    Posts:
    32
    Yeah, I got the same problem. Have one Terrain that is 5000x5000 and a 32GB machine, with the 1070 video card, and an AMD 8-CORE processor.
    Not sure what is causing the problem, but OUT OF MEMORY IN TOME GENERATOR is the error I am getting. The previous error says ERROR OCCURED IN OCCLUDER DATA COMPUTATION. How can this be? I even have the blue lines compilation, too.
    Oh, and I am using UNITY3D Version 5.6.2p2. Of course, in the Occlusion tab, it shows that NO OCCLUSION DATA HAS BEEN BAKED, too
     
    Last edited: May 24, 2018
  4. tachyon-particle

    tachyon-particle

    Joined:
    Jan 5, 2016
    Posts:
    69
    I received the same error message and I fixed it by increasing the "Smallest Occluder" and "Smallest Hole".

    Try increasing those values until the error goes away.

    Fortunately my values were small enough for success:
    Smallest Occluder = 10
    Smallest Hole = 1

    Error occured when using these values:
    Smallest Occluder = 4
    Smallest Hole = 0.25
     
  5. Camarent

    Camarent

    Joined:
    Feb 19, 2014
    Posts:
    158
    Time passed but error is still there. I have 64 gb Ram and I see that baking is using less than a half oft it.
     
  6. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    2,626
    Bumping for justice. Still happens on 2019.3.15f1 + 32 GB;
    It doesn't even seems to be even using that much RAM. This looks like a bug.
     
  7. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    2,626
    Okay, so I think I found a way to bake large and complex scenes. For the future searchers:
    Make sure to use Occlusion Area component and define approximate areas where your camera in game will be.

    By doing so you'll drastically reduce required memory consumption and bake time, which will also allow you to do higher precision bakes. (I was able to bake 4000x4000 map, with smallest occluder size of 2)

    This should be obvious, but it isn't that obvious from the manual.
    In fact this should be mentioned on the first Occlusion Culling page (https://docs.unity3d.com/Manual/OcclusionCulling.html) of the manual as well, because not everyone even know that Occlusion Area component exists.

    Also, for those having dynamic doors -> there's an Occlusion Portal component, that allows toggling on / off occlusion states for the doors, openning passages, etc.
     
    Last edited: Sep 25, 2020
    JonathanBartel and Camarent like this.
  8. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    I got the same problem.
     
unityunity