Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Visibility job failed | error: 3 'Out of memory loading input data' - With plenty of free memory

Discussion in 'Global Illumination' started by Koskenranta, Oct 10, 2018.

  1. Koskenranta

    Koskenranta

    Joined:
    Oct 10, 2018
    Posts:
    2
    Hello!

    I have trying to bake our scene of few days now and always getting stuck with this error during [6/11 Visibility | XXXX jobs]:
    Visibility job failed for system: 0xXXXXXXXXXXXXXXXXXXXXXXXXX, error: 3 - 'Out of memory loading input data.'.
    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
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    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.
     
  3. Koskenranta

    Koskenranta

    Joined:
    Oct 10, 2018
    Posts:
    2
    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.

    Scene:
    scene.png

    Settings that failed:
    lightmapping_Settings.png

    Latest successful bake:
    lightmapping_Settings_latest.png
     
  4. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    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.