Search Unity

Official Progressive CPU Lightmapper

Discussion in 'Global Illumination' started by Kuba, Feb 2, 2017.

  1. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    Are there plans to implement the Lock Atlas feature for the Progressive Lightmapper? It may well be the last piece of the puzzle which would allow use PLM in our projects.
     
    JamesArndt likes this.
  2. ChayChay

    ChayChay

    Joined:
    Sep 10, 2014
    Posts:
    12
    I have a very large scene in which I was hoping to use the new PLM because it gives such great results (especially for night time outdoor scenes) but when I try to bake my scene in it's entirety i get the following message:

    "Progressive lightmapper supports a maximum of 10000 instances. Please remove some instances and try rebaking the scene."

    Am I bound to having less than 10,000 objects in one bake? Is this temporary or by design? Anyone have any good work arounds? I am currently attempting to bake separately and load in baked scenes but I would rather not have to keep everything separated so.
     
  3. kemalakay

    kemalakay

    Unity Technologies

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

    When you open the lighting window, you can see whether Auto option is enabled or disabled at the bottom. There is a known issue in Progressive Lightmapper that if lightmap resolution or lightmap size is high, lightmap indices can be assigned incorrectly: https://issuetracker.unity3d.com/is...ices-of-4k-lightmaps-are-assigned-incorrectly

    However, this is not an issue when you disable auto mode and generate the lightmaps manually. That's why I'm trying to determine which mode you're using to bake your lightmaps.
     

    Attached Files:

    • Auto.JPG
      Auto.JPG
      File size:
      10 KB
      Views:
      1,061
  4. kemalakay

    kemalakay

    Unity Technologies

    Joined:
    Jul 12, 2016
    Posts:
    224
    This is temporary as Progressive Lightmapper is still in preview stage. Currently, there are no workarounds besides baking pieces of your level separately and loading them additively. However, lighting team is now working at full steam to address this issue. Thank you for your understanding.
     
    GoGoGadget and ChayChay like this.
  5. kemalakay

    kemalakay

    Unity Technologies

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

    Currently, "Lock Atlas" feature is not on the roadmap but have you perhaps tried using Baked Tag option in custom lightmap parameters? (https://docs.unity3d.com/Manual/LightmapParameters.html)
     
    JamesArndt likes this.
  6. YvesAlbuquerque

    YvesAlbuquerque

    Joined:
    Jun 6, 2017
    Posts:
    3
  7. kemalakay

    kemalakay

    Unity Technologies

    Joined:
    Jul 12, 2016
    Posts:
    224
    YvesAlbuquerque likes this.
  8. agilelensalex

    agilelensalex

    Joined:
    Apr 7, 2014
    Posts:
    24
    Anyone else using the progressive lightmapper getting giant black pixelated blotches, even after hours of baking?
     
  9. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    used to happen with area lights, did you check backface tolerance? UVs?
     
  10. Jesper-Mortensen

    Jesper-Mortensen

    Unity Technologies

    Joined:
    Mar 15, 2013
    Posts:
    232
    Check the texel validity visualization in the `Scene View`, it will show you if you have areas that are affected by backfaces. If you do - either add a backface or make the material double sided for GI.
     
  11. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Finally got around to trying this last night and was impressed by how much better the interior shadows look compared to Enlighten. I'm running Unity 5.6.3p1 on a decent rig with 32GB of RAM and have had quite a few problems and crashes just trying to get things to work at all... but when they do, is looking really nice.

    Things I've encountered, already noted looking back through this thread:
    • Increasing 'Lightmap Resolution' beyond 20 texels causes instability and crashes sometimes when baking.
    • Increasing the 'Lightmap Size' beyond 1024 causes all kinds of problems, and memory issues.
    • Area lights are pretty messed up and cause weird squares / anomalies on objects.
    • Bake times seem inconsistent, first attempt was 4 hours, another said 7 hours and then 2... for the same settings.
    • Getting out of memory issues at console occasionally but the bakes continues, will the system keep retrying these failures until successful (if the bake is continuing to run and update)?
    Overall looks pretty exciting... will future updates continue to be included in 5.6 as well? 2017 is still not performing well on my project compared to 5.6.
     
  12. Jesper-Mortensen

    Jesper-Mortensen

    Unity Technologies

    Joined:
    Mar 15, 2013
    Posts:
    232
    Screenshot of your results if you're at liberty to share?

    We are just finalizing a round of memory scaling work. We can now bake hundreds of lightmaps on a 16GB machine so stay tuned for that. Along with that work is a lot of fixes to leaks and instability problems, now that we can reliably bake large scenes.

    We intend to reach feature parity with Enlighten baking soon and the features will make their way to 5.6, but it takes some time to backport the changes.
     
    Kellios11 and WildStyle69 like this.
  13. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    So once the progressive % has gone to 100%, the status message changes to 'Baking...' and the editor still shows a high % of CPU usage. It's been like this for one hour now. Is this behavior expected, or we're in glitch-ville now?

    Previous bake I did with different settings overnight... so I have no idea if that was the same.
     
  14. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    Will GPU support also be in 5.6? or will that be pushed to the new releases?
     
  15. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    So yeah -- it stayed like that for about 3 hours and then crashed.
     
  16. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Am baking at a Lightmap Resolution of only 10 and 1024 Lightmap Size.
     
  17. Jesper-Mortensen

    Jesper-Mortensen

    Unity Technologies

    Joined:
    Mar 15, 2013
    Posts:
    232
    How many lightmaps does the scene generate and at what resolution? The lighting window should have some stats while baking is happening.
     
  18. Jesper-Mortensen

    Jesper-Mortensen

    Unity Technologies

    Joined:
    Mar 15, 2013
    Posts:
    232
    New features like GPU support won't be backported. We will provide feature parity with Enlighten baking in 5.6 - of course with all the other benefits of the Progressive Lightmapper.
     
  19. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Thanks for reply -- it was baking 7 maps @ 1024 for my scene and barfing after completion. I tried a few different settings, cleaning all caches etc. but nothing seemed to help.

    I've gone back to Enlighten for the time being, but look forward to trying a more stable version of the new light mapper soon... as I'm sure it will be awesome once ready!
     
  20. Jesper-Mortensen

    Jesper-Mortensen

    Unity Technologies

    Joined:
    Mar 15, 2013
    Posts:
    232
    Which version of Unity are you currently on? And can we have a copy of your editor log?
     
  21. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Unity 5.6.3p1 - not sure about log... I gave up when I felt like throwing my computer out the window yesterday. I'll perhaps try again at the weekend and get a log... or will try 2017 again, or maybe just wait a bit until you guys have the newer features rolled out, as my free time is kind of limited right now.

    BTW - I saw your tweet yesterday about baking a stack of light maps.. nice work there! :)
     
    JamesArndt likes this.
  22. Jesper-Mortensen

    Jesper-Mortensen

    Unity Technologies

    Joined:
    Mar 15, 2013
    Posts:
    232
    We will look into this soon - stay tuned.
     
    Jde likes this.
  23. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    246
    Is there an eta on support for Distance ShadowMasks/Subtractive, etc? The lack of these is still killing my project. (Not to mention the out-of-memory on any sensible size level, but it seems you're addressing that one!)
     
    chrismarch likes this.
  24. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Same question !?

    Thank You !
     
  25. Jesper-Mortensen

    Jesper-Mortensen

    Unity Technologies

    Joined:
    Mar 15, 2013
    Posts:
    232
    Lightmodes (shadowmasks/subtractive) are fully supported for Progressive Lightmapper in 2017.3 that is soon entering beta. We are working on backporting it to 5.6.
     
    chrismarch, mh114, Vagabond_ and 2 others like this.
  26. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    YES!
     
  27. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    246
    Oh, so THAT'S what 'very soon' means. ;)

    "the awesome new lightmodes that we added in 5.6 are not supported yet in the progressive lightmapper, but they will be very soon."

    Jesper-Mortensen, Feb 23, 2017
     
    mh114 likes this.
  28. Jesper-Mortensen

    Jesper-Mortensen

    Unity Technologies

    Joined:
    Mar 15, 2013
    Posts:
    232
    Yes, we thought it would be easy... But a sizeable rabbit hole appeared;-)
     
  29. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    246
    It's ok, we love you really ;)
     
  30. rmalecki

    rmalecki

    Joined:
    May 21, 2013
    Posts:
    8
    How on earth is it possible that this is the third (or fourth??) lightmapping solution and I still cannot bake an outdoor scene with terrain + trees and have the trees cast proper shadows. This has been broken since at least Unity 4. It blows my mind.
     
  31. Jesper-Mortensen

    Jesper-Mortensen

    Unity Technologies

    Joined:
    Mar 15, 2013
    Posts:
    232
    This has been fixed in 2017.3 and is currently being backported to 2017.2, should land in a patch soon as we missed the release window.
     
  32. ArchVizPRO

    ArchVizPRO

    Joined:
    Apr 27, 2014
    Posts:
    457
    There is a limit in baked lights number?
    In a test I have made seems that after a certain number of lights they are ignored in the baked lightmap.
    It's a bug or a limitation ?
     
  33. Jesper-Mortensen

    Jesper-Mortensen

    Unity Technologies

    Joined:
    Mar 15, 2013
    Posts:
    232
    This is a bug we have fixed this on our mainline and are in the process of backporting those fixes and improvements. Stay tuned. If you are brave you could grab 2017.3 beta that will be out soon.
     
  34. Jesper-Mortensen

    Jesper-Mortensen

    Unity Technologies

    Joined:
    Mar 15, 2013
    Posts:
    232
    Here's 2048 spots...
     

    Attached Files:

    JamesArndt and buttmatrix like this.
  35. ArchVizPRO

    ArchVizPRO

    Joined:
    Apr 27, 2014
    Posts:
    457
    Thank you for your quick reply.
    Can't wait for the fix. Thank you!
     
    JamesArndt likes this.
  36. Gervais60

    Gervais60

    Joined:
    Apr 7, 2016
    Posts:
    37
    Did you improve the memory management has well in 1017.3 because it is really bad currently can't use the system in 2017.2 my system always run out of memory before Unity Crash
     
    JamesArndt likes this.
  37. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Is there any way to fix mixed mode lighting becoming broken once I've set the lightmapper to "Progressive" and then switched back to "Enlighten". It's like the editor is stuck on Progressive lightmapping. Editor is 5.6
     
  38. ArchVizPRO

    ArchVizPRO

    Joined:
    Apr 27, 2014
    Posts:
    457
    I see that in Unity 2017.3 the Progressive Lightmapper support Shadowmask... AWESOME.
    But seems that the FILTERING doesn't work anymore. :(
    Hope in a quick fix
     
    JamesArndt and buttmatrix like this.
  39. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Filtering? As in antialiasing bakes?
     
  40. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    246
    *holds breath for the 5.6 release*
     
    WermHat likes this.
  41. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Hope you have Olympic breath-holding technique. ;)

    But seriously, yeah would be really nice for these updates to come back to 5.6 soon.
     
    WermHat, Kellios11 and JamesArndt like this.
  42. ArchVizPRO

    ArchVizPRO

    Joined:
    Apr 27, 2014
    Posts:
    457
    I was talking about the Filtering of the Progressive lightmap.
    Both "Auto" and "Advance" options doesn't work in Unity 2017.3.
     
  43. ArchVizPRO

    ArchVizPRO

    Joined:
    Apr 27, 2014
    Posts:
    457
    I correct myself.
    Filtering, in Lightmap Settings/Progressive works only after bake is finished.
    Before 2017.3 Filtering works also during iterations.
    Is it intended or it's a bug ?
     
  44. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Does the current 2017.3 progressive lightmapper support >10000 objects? Almost tempting enough to upgrade my project from 5.6 for that.
     
    JamesArndt and ChayChay like this.
  45. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    So curious to hear what improved and what regressed with the Progressive Lightmapper in the new 2017.2 release?
     
  46. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    246
    I was under the impression you should use lighting probes for small things, and only light map larger things/things with obvious shadow seams?

    Also; really would love an ETA on the 5.6 backport >_<
     
    WildStyle69 and JamesArndt like this.
  47. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    +1 for the 5.6 backporting on Mixed Mode lighting fix too.
     
    WildStyle69 likes this.
  48. rczarnowski

    rczarnowski

    Joined:
    Jan 12, 2017
    Posts:
    3
    I am having the same issue. Changing 'Backface Tolerance' to 1 inside Lightmap Parameters does not help resolve the issue, nor did enabling Double Sided Global Illumination in material settings. I'm baking light with 40 resolution, 320 direct and 500 indirect samples, 2048 lightmap size. I'm using Unity 5.6.3. Here are my observations:

    What I did notice, was the fact that those black squares disappear from view if I move my editor camera away from an affected mesh. They actually smoothly fade out in opacity as I move my camera away, to the point they vanish completely. This is both visible in Shaded view and Baked Lightmap view, so the black squares seem to be a weird part of lightmaps, like a layer on top of them.

    The black squares have a white, strongly emissive border (as in Polff's images) when the lightmaps are directional. In non-directional mode, they are just black.
    They don't appear in light bakes that use a small number of Direct and Indirect Samples.

    Moreover, this whole issue seems to happen in scenes with Area Lights that are intersecting with and/or are very close to static geometry. In a scene with only one light source (Area Light), I moved the Area Light away from wall, leaving a clearly visible gap, and the black squares stopped appearing in the bake! Once I moved it back closer to the wall, they begun popping up again.

    I hope this helps identify and fix this pesky bug once and for all.
    Progressive Lightmapper is a huge improvement over Enlighten, and has a great future. If it wasn't for this bug and the 'lights randomly switching off', it would be perfect for my use cases. Thanks for the hard work Unity team! The future looks bright :)
     
    JamesArndt likes this.
  49. Detniess

    Detniess

    Joined:
    Oct 28, 2014
    Posts:
    46
    I've also had this problem related to Area Lights creating splotches. So I had to disable them in order to get rid of the super-brightnes created by these artifacts. However, I tried your hypothesis of moving them away from any static geometry and now it works just fine. I moved my Area Lights about 0.5 units away from the windows in the scene! Thanks for the tip :)

    Screenshot 2017-10-17_20-12-15.png
     
    JamesArndt and rczarnowski like this.
  50. kemalakay

    kemalakay

    Unity Technologies

    Joined:
    Jul 12, 2016
    Posts:
    224
    Hey @rczarnowski and @Detniess,

    We managed to have a consistent reproducible for this issue and fixed it. I'm glad to hear that you were able to find workarounds. Temporarily, it should be fine but a proper fix will very soon be available in 2017.3. We'll of course backport it to previous versions. Thanks for reporting it!
     
    JamesArndt, rczarnowski and Detniess like this.