Search Unity

unity 'object size in lightmap has reached the max atlas size.

Discussion in 'Global Illumination' started by adpok, Nov 27, 2017.

  1. adpok

    adpok

    Joined:
    Oct 26, 2017
    Posts:
    28
    So sometimes when baking using Enlighten, depending on your lightmap scale you get this warning.

    unity 'object size in lightmap has reached the max atlas size

    can anyone explain how unity works this out? Is it based on all objects in the scene that are marked static, even ones that are turned off in the inspector or something else?

    The reason i ask is that I'm dubious that this is an accurate warning. I've had it before, but when i baked it all fit onto the single map.

    Any help is much appreciated.
     
    Nick62 likes this.
  2. shotoutgames

    shotoutgames

    Joined:
    Dec 29, 2013
    Posts:
    290
    Same issue so hopefully OK bump?
     
  3. Sam-DreamsMaker

    Sam-DreamsMaker

    Joined:
    May 2, 2015
    Posts:
    13
    Hi,
    You have to reduce the "Scale In Lightmap" parameter in your Mesh Renderer.
    (Mesh Renderer/Lighting/Lightmap Settings/Scale In Lightmap)
     
  4. Baschti-aus-s

    Baschti-aus-s

    Joined:
    Jan 6, 2020
    Posts:
    9
    Hi,
    reducing the "Scale in Lightmap" parameter for particular objects is working fine, even if you got less quality for the rendered shadows on this object because of the lower scale.
    If you got let’s say 50 objects in the scene with different size, you have to adjust the scale parameter for every single object to avoid exceeding the lightmap size but at the same time keep the best quality you can get. This seems to be an annoying work step.
    Is there are more common way to solve this?
    Without changing the scale value and ignoring the warning message, Unity will generate a lightmap for the object anyway.
    So could anyone explain what internally will happen and which parameters Unity will adjust by itself to be able to generate the lightmap even if the scale parameter is not set properly?
     
  5. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    You can control lightmap resolution on a global scale in the Lighting window.

    If you don't want the object to be lightmapped, you can make it use Light Probes instead in the inspector for the renderer.
     
  6. kevinivan

    kevinivan

    Joined:
    Jan 29, 2018
    Posts:
    1
    thank you