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. Dismiss Notice

Computing Occlusion takes forever

Discussion in 'Editor & General Support' started by Denisowator, May 21, 2017.

  1. Denisowator

    Denisowator

    Joined:
    Apr 22, 2014
    Posts:
    918
    So I have a 1000x1000 Terrain scene, with trees and grass. And the Occlusion Culling baking is taking absolutely forever.

    I started baking at around 6am this morning, and it is now 5pm, and the blue bar hasn't even reached 1/10 of the "Computing Occlusion". Not to mention, when I try to pan around the scene in the editor window, it's like almost completely frozen. It moves slightly and then freezes up, and repeats. This happens even if I disable "View Volumes".

    Part of the problem may be the fact that every inch of it is a dense forest, on a really high and hilly landscape. But it still seems to take a way too big amount of time with baking the occlusion.

    I will try doing this on a completely flat terrain, and removing some of the trees in areas that will never be seen by the player, but it if still takes a long while, then I'm all out of ideas.
     
  2. DroidifyDevs

    DroidifyDevs

    Joined:
    Jun 24, 2015
    Posts:
    1,724
    What are your computer's specs? Specifically the CPU, and other info if you have it. Also, what settings are you using when baking?
     
  3. Denisowator

    Denisowator

    Joined:
    Apr 22, 2014
    Posts:
    918
    I found out what it was. The bake settings had the same values I set for my test scene, which was only 100x100. And the values were something like "0.25" and "0.1" (not at home right now, and don't remember the settings' labels), so it was scanning very fine and small areas for the entire 1000x1000 landscape.

    P.S. My CPU is an AMD FX(tm)-8350 Eight-Core (4.00GHz).
     
  4. DroidifyDevs

    DroidifyDevs

    Joined:
    Jun 24, 2015
    Posts:
    1,724
    After you changed the values, it should bake faster. Your CPU should be fine for such tasks.

    Typically, the default settings are OK for me, but since I do a lot of mobile stuff I like to keep them fine.
     
    Denisowator likes this.
  5. Denisowator

    Denisowator

    Joined:
    Apr 22, 2014
    Posts:
    918
    Yep, when I changed them to default, it did everything in just half a minute. I'll keep it at default for now, since I'm not making a final level at the moment, and just need more fps for testing purposes.
     
  6. Lucifer711

    Lucifer711

    Joined:
    Jul 28, 2017
    Posts:
    7
    Just encountered the same issue with Unity 2020.3.26f1.
    Processor is Ryzen 9 3900x, First half went with all cores, after 50%, It only uses 1 or 2 threads. Poor thread management?
     
  7. chriscode

    chriscode

    Joined:
    Mar 2, 2015
    Posts:
    44
    Had this issue. Tearing hair out. Turned out to be had marked very distant "moon" static - so got included in the occlusion. Got stuck at about 1 hour. I should have noticed the blue cubes appearing around it tbh