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

Large Lighting Data crash

Discussion in 'Global Illumination' started by KellerDev, Mar 6, 2017.

  1. KellerDev

    KellerDev

    Joined:
    Feb 7, 2017
    Posts:
    59
    I'm trying to bake Precomputed GI on a scene with high detail. I've set it to 30 texels per unit and high irradiance budget on the object settings. The quality is ok, but not perfect. The lighting data file is 1.6 GB. If I try to raise the texels per unit more though, I encounter a strange error. After the build of the GI completes succesfully and I can see it in the editor, if I try to save the scene, Unity crashes. I can build the executable with no problems, but I cannot save the scene. If I hit save, an error message pops up which says memory overflow or something like that. It appears to do this if the lighting data file for the realtime GI is larger than 2GB. Is this a nown issue or am I doing something wrong?
    I have 24 GB of RAM and GI cache is set to 20GB.
     
  2. KellerDev

    KellerDev

    Joined:
    Feb 7, 2017
    Posts:
    59
    Any suggestion? I'm trying to achieve results like this
    , or better but with larger scene. I'm getting close to it, but I really need a better GI. Is it possible that the lighting data gets larger than 2GB?
     
  3. kemalakay

    kemalakay

    Unity Technologies

    Joined:
    Jul 12, 2016
    Posts:
    224
    Hey @Kalata8662

    It would be great if you can provide more information about your system spec, platform and which Unity version you are using. Have you perhaps reported a bug report with a reproducible project (in which you encounter the crash error while trying to save)?

    If not, I recommend you to increase page file size first. Increase that to 50 GB or so, and you can try setting GI cache to a higher size as well.

    Thanks,
    QA Team
     
    KellerDev likes this.
  4. KellerDev

    KellerDev

    Joined:
    Feb 7, 2017
    Posts:
    59
    Hey,
    the this you suggested worked. Thank you very much!
    I raised the virtual memory, which allowed me to increase the GI cache more.
    Now the Lighting data file is 3.4 GB.
    Thanks again!
    P.S.
    here's what I'm doing btw :

    This is with the lower quality GI though...
     
  5. KellerDev

    KellerDev

    Joined:
    Feb 7, 2017
    Posts:
    59
    Actually, after I build the executable, Unity crashed again, with the same message. The message says "Size overflow in allocator". Before the crash, I was able to run the scene in the editor, save the scene and restart Unity. Now if I try to open Unity, this message pops up. Any ideas?
    Btw, I'm working on Windows 8, Unity 5.4
    This problem exists in the issue tracker
    It's strange, because in the executable in works fine, and in the editor, before I build the executable. After I build the executable though, it doesn't work in the editor anymore and I have to rebuild the lighting...
     
    Last edited: Mar 18, 2017
  6. KellerDev

    KellerDev

    Joined:
    Feb 7, 2017
    Posts:
    59
  7. kemalakay

    kemalakay

    Unity Technologies

    Joined:
    Jul 12, 2016
    Posts:
    224
  8. KellerDev

    KellerDev

    Joined:
    Feb 7, 2017
    Posts:
    59
    Hi, my scene is different than that, but the problem I encounter is the same - unable to load lighting data bigger than 2GB. If the lighting data gets bigger than that, I have to move it to a different folder than the asset folder and build the lighting again. I updated to Unity 5.5 and it's still the same. Should I post a seperate issue for that?
     
  9. kemalakay

    kemalakay

    Unity Technologies

    Joined:
    Jul 12, 2016
    Posts:
    224
    Hi @Kalata8662

    Yes, it would be nice to have a reproducible project, we would appreciate if you can report it

    Thanks
     
  10. frankadimcosta

    frankadimcosta

    Joined:
    Jan 14, 2015
    Posts:
    203
    I had this error opening scenes with lighting data.asset bigger than 2gb (2.5GB). I solved problem deleting the directory under assest containing data.asset of the scene.
     
  11. KellerDev

    KellerDev

    Joined:
    Feb 7, 2017
    Posts:
    59
    Yes, I do this aswell, but this doesn't solve the problem because you still cannot use the lighting data. You have to precompute it again with lower settings to work.
     
  12. kemalakay

    kemalakay

    Unity Technologies

    Joined:
    Jul 12, 2016
    Posts:
    224
    Hi @Kalata8662

    Have you managed to fix your problem? If not, have you reported the problem? If the issue still persists for you and if you reported it, could you please share the bug ID here? Thanks
     
  13. frankadimcosta

    frankadimcosta

    Joined:
    Jan 14, 2015
    Posts:
    203
    Bug still present in 2017.1.1p2
    Using 4096K not compressed lightmaps, engine builds .LightingData.asset 2.4GB large.
    Using 2048K compressed lightmaps, engine builds the same size (2.4GB) LightingData.asset.

    WHY ?

    How can I reduce the LightingData.asset size ?
    Only reducing resolution ?

    It's a big BUG !!! Video quality could be better but (after a week of computing) i must resize down LightingData.asset.
    DAMN !!!
     
    Last edited: Sep 19, 2017
    renski likes this.
  14. renski

    renski

    Joined:
    Sep 27, 2013
    Posts:
    14
    Hi, having the same problem here with 2017.3.1

    Is that a design problem on our side? I have been working for a couple of years on this project and finally getting close to build but this could be big set back, so how can we reduce the LightingData.asset size on the level design approach, mine is 2.57 GB, is that to large for the average scene ?

    Only removing the folder helps containing the baked data works. Hope we can get some help soon.
     
  15. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    I’m having this same problem. On 2019.1.0f2 on a mac. :-/
     
  16. JenniferNordwall

    JenniferNordwall

    Unity Technologies

    Joined:
    Sep 19, 2016
    Posts:
    160
    Can people who still are experiencing this issue file a bug with a small easy repo case attached to it? It would help us being able to fix it. Cheers!
     
  17. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    @JenniferNordwall I think part of the problem is that you need a BIG repo to create the issue in the first place. I'm a beginner, probably like the others experiencing this issue and my project is quite possibly not well managed (over 60GB). It's never been clear to me from Unity's bug report mechanism exactly how much of my project will be uploaded to you (so like most Unity users I assume, I avoid sending bug reports, as much as I'd like to). I would suggest that the bug reporting mechanism automatically grab the last of the log output when there is a crash and then optionally give users the option of including more info / files.
     
    frankadimcosta likes this.
  18. Sonorpearl

    Sonorpearl

    Joined:
    Sep 8, 2017
    Posts:
    32
    This problem will happen all the time. Because 2GB is the maximum size that can be stored into a 32 bit Integer. And I guess Unity tried to read the File Size in a 32 bit Integer, which will cause the overflow. Please use long instead. :)
    How can you reduce the size? I´ve found this about the contents: https://docs.unity3d.com/Manual/LightmapSnapshot.html
     
    Last edited: Aug 12, 2019
  19. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    It seems no matter how high you set the max page file size it still causes errors/crashes, but raising the initial size to 30GB fixed it in my use case (16km² city map), you will need free space equal to or greater than the page file initial/max size on your OS drive though.