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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Beast Lightmap Import Memory Bloat and Crash

Discussion in 'Editor & General Support' started by ruj, Jun 7, 2013.

  1. ruj

    ruj

    Joined:
    Feb 28, 2013
    Posts:
    113
    I have searched and haven't found this particular issue anywhere. When I bake lightmaps several times in a single session in unity, the program gobbles up more and more memory with each lightmap import until it finally crashes.

    If I watch the resource monitor, I can see the RAM allocation to unity climb during this portion of the process, but it never drops back down, climbing by the same amount on each build.

    Has anyone else seen this particular problem? Any known workarounds (other than closing and opening unity again)?

    Thanks
     
  2. Batigol

    Batigol

    Joined:
    Oct 17, 2012
    Posts:
    234
    Import lightmap almost same as import new texture in Unity3d. RAM VRam will increase time by time and no way to decrease in Editor (but no problem in Stand Alone mode).
    To fix this problem, you have restart UnityEditor when ever you bake lightmap and import.
    Another way is set Project Setting/Quality --> Texture Quality: half res in Editor and restore to full res when ever you need to build to stand alone version
     
  3. Domino-Studios

    Domino-Studios

    Joined:
    Oct 26, 2012
    Posts:
    31
    I have the same problem and it is a bug. They work on it but I don't know when a patch will be available.
    The only work around I found is to set the atlas scale of objects to 0.3-0.5 so they are more objects on same LM and then less LMs...
     
  4. ruj

    ruj

    Joined:
    Feb 28, 2013
    Posts:
    113
    Thanks for the replies. I added more RAM to my machine and played with lightmap resolution and the problem is less of an issue. Would still be nice if it didn't happen though.
     
  5. login4donald

    login4donald

    Joined:
    Jan 3, 2012
    Posts:
    462
    Sorry to revive such a thread but I have similar issue but it happens no matter what I bake. Around the time it imports the Terrain into beast, Unity closes. And the terrain resolution is 100X100, with one static tree, Single Lightmap, Low Quality. I hope they have a fix for this bug.
     
  6. Matt1122

    Matt1122

    Joined:
    Sep 20, 2013
    Posts:
    2

    Another way is set Project Setting/Quality --> Texture Quality: half res in Editor and restore to full res when ever you need to build to stand alone version


    THIS WORKS THE BEST...i actually set all textures as 8th rez in quality settings not just half res, and then i was able to restore it to full res when finished....RESULT=SIGNIFICANTLY REDUCED NUMBER OF UNITY CRASHES DURING LIGHTMAP BAKE
     
  7. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    I'm having the same issues -- however, I found that I could manually put in the baked lightmaps after the crash.

    only problem now, though, is that the light maps don't show up and Unity crashes whenever I "play" the scene or load it up from a different scene.

    For dual light maps, anyone know which column is "near" and which is "far"? So far, when I did have the light maps in place (I removed them since it kept crashing), they had zero effect.
     
    Last edited: Nov 1, 2013