Search Unity

Progressive lightmap baking light limit?

Discussion in 'Global Illumination' started by ChanzDog, Sep 29, 2017.

  1. ChanzDog

    ChanzDog

    Joined:
    Sep 28, 2017
    Posts:
    43
    Full disclosure, I have tested this on the Progressive light mapper. I am unable to try on Enlighten because it simply takes way too long when trying to bake maps.

    I am baking lightmaps for levels I have extracted from an old game back in 1999. It used to vertex baked lightmaps. Because Unity doesn't support vertex based lightmaps, I simply bake lightmaps with a very low resolution and it works quite nicely for what I am after. All of the lights are point lights and are set to Baked mode.

    One of the levels that I am working on is quite large and has around 500 point lights around the level. When I bake the lightmaps, everything initially looks great but then I notice that some lamps and other objects that normally cast light are not working. I go and verify that the lights are large and bright enough to make it to a surface and sure enough they are.

    Here is a small image of the bake:
    https://i.imgur.com/8ufRqJw.png
    https://i.imgur.com/o3cEGDs.png

    Then I tried figuring if it's just taking the first n amount of lights. I added a very bright very big green light to the middle of the level and baked. No effect. Then I tried removing around 200 of the lights, and it showed up in the next bake. So I am assuming that Unity only supports a certain number of point lights contributing, which is a bit frustrating considering they are baked. Yes, I know 500 lights is a lot, but maybe not for a huge scene.

    Furthermore, I tried breaking the level into chunks and still, the limit seemed to apply (my thinking was that it was n amount of lights per model).

    So I am stumped. The Progressive lightmapper is miles ahead of the old Enlighten one.

    Does anyone have any idea how I could increase the limit or do something else?
     
  2. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,876
    It's known limitation on Progressive Lightmapper

    I suggest you to use Enlighten with very-low preset and disabling Final Gather to bake faster than progressive lightmapper
     
  3. ChanzDog

    ChanzDog

    Joined:
    Sep 28, 2017
    Posts:
    43
    Thanks. Reducing the quality seemed to help it bake faster. Appreciate it.

    But as it's a "known limitation", why was I not able to find this written anywhere?
     
    GoGoGadget likes this.
  4. Hikari_NTU

    Hikari_NTU

    Joined:
    Jan 9, 2018
    Posts:
    1
    I do meet this bug today when I was baking my interior scene which include 22 point light. With the same problem, there was always one certain point light go off, and only changing it's transform or light parameter will lit it up again, but with another one go down. And after I take off one lamp which is less important, things go well without any broken light bulb.

    In this image, the two light up the stairs have identical parameters, but some how this one goes off:
    https://imgur.com/a/wwCHz

    lights limit to 21? Why not 20 or numbers more common like 32 or 256? I don't think the number is the main problem now since this thread use 200 lights and there is few people talking about this limit. So I was wondering maybe is the range overlapping problem, since I am not familiar with unity light setting, and those light in my scene was setting in close distance with almost every light range overlap to each other.

    And still cannot find a document on this bug to deal with it. I really need Progressive solution which is similar to Blender Cycles, and Enlighten just take too long to bake ANY thing when you don't get familiar with it.
     
  5. Gokcan

    Gokcan

    Joined:
    Aug 15, 2013
    Posts:
    289
    It is a known problem that has solved in 2017.3 and as far as I know it is backported.