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.
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?
Hey @KellerDev
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
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 :
https://www.youtube.com/watch?v=tHx24QWzS38
This is with the lower quality GI though…
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…
This is the issue. The ID is
736679. It says it’s supposed to be fixed in Unity 5.3, But I’m using 5.4 and it’s not fixed…
Hey @Kalata,
I just checked this issue with the project attached to the case you mentioned above in 5.5 and didn’t encounter this problem. Are you perhaps building the lighting with auto enabled or without?
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?
Hi @KellerDev
Yes, it would be nice to have a reproducible project, we would appreciate if you can report it
Thanks
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.
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.
Hi @KellerDev
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
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 !!!
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.
I’m having this same problem. On 2019.1.0f2 on a mac. :-/
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!
@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.
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: Unity - Manual: Lighting Data Asset
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.