I have trying to bake our scene of few days now and always getting stuck with this error during [6/11 Visibility | XXXX jobs]:
Please close applications to free memory, optimize the scene, increase the size of the pagefile or use a system with more memory.```
Our current system has 32 GB of ram and another 32 GB pagefile with 100 GB GI Cache limit. Everything is on M.2 SSD with +300 GB free space. When this error is appearing there have been only 18-20 GB of RAM in use so still over 10 GB of free ram available + pagefile.
Current system:
Ryzen 2700X, 32 GB DDR4, 512 GB M.2 SSD
Hey! If you have a very large scene with a very high cluster resolution, it is possible to run out of memory at some point. Does reducing lightmap resolution help? Also, are you using realtime or baked GI? Which Unity version are you using? Also, could you please submit some screenshots, showing your lighting settings - that would be helpful. Thanks.
We have been playing with settings and baking works fine on lower settings. Currently ramping settings up between bakes to find out limits. Disabling Realtime Global Illumination seemed to help a lot.
What baffled me was that our scene isn’t that large and I don’t think that our settings were that high considering that there was total of 60 GB memory available (ram + cache). Scene is around 150x100 units, but most of it is fairly simple shapes outside the office building.
We are keeping Unity updated so bake was made with Unity 2018.2.11f1.
Setting Indirect Resolution at 8 whilst you had realtime GI enabled could have been one of the culprits why your bake would take a very long time, or would not finish at all. For outdoor scenes, Indirect Resolution of 1-2 is a much more reasonable value. For more information about realtime GI please follow this article - https://unity3d.com/learn/tutorials/topics/graphics/introduction-precomputed-realtime-gi
Also, ask yourself whether you actually need to have realtime GI in the first place. If the lighting in your scene will not change and the entire scene is mostly static, you can easily get away with just baked GI.
It is also worth inspecting the lightmap density of your models. After a successful bake, switch to the Baked Lightmap scene view (dropdown in the top left corner of the scene view) and inspect how dense your lightmaps are. Lowering lightmap resolution for objects that don’t have that much geometry definition (walls, floors, curtains, etc) is highly recommended.
In addition, not every object needs to be lightmapped. Small objects can be easily marked as dynamic and receive GI from lightprobes placed in the scene.