Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Lightmapping is much slower and looks worse.

Discussion in 'Unity 5 Pre-order Beta' started by Jde, Dec 22, 2014.

  1. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    What I meant by delay is that Enlighten in Beta 18 was too touchy, so much so that I can move something ever so slighty and it freezes up the editor
     
  2. bakanekofr

    bakanekofr

    Joined:
    Feb 28, 2014
    Posts:
    122
    I don't know if this was asked before, but any chance for "Beast" to be re-integrated in Unity 5? Calling it "Legacy Lightmaping" or something like that.

    I don't need realtime GI, and the new lightmaping looks worse and is much slower than Unity 4...
     
    protopop likes this.
  3. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    They already said no, so hopefully they can get enlighten straightened out.
     
    bakanekofr likes this.
  4. mtalbott

    mtalbott

    Joined:
    Dec 21, 2011
    Posts:
    125
    I'll probably get banned or something for saying this but... Is enlighten starting to feel a lot like the new "new GUI".
     
    p87 likes this.
  5. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Not to me. It seems like something that looks and works really great, if you have a very small scene.

    I'm just hoping they can figure it out. Went to lightmap a scene with Beta20 on Friday, and came in this morning (Tuesday), and its still in "Layout systems 2/11". Shows that it's used 127 hours of CPU so far in the activity monitor.
     
    Meltdown likes this.
  6. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    @Jaimi please send us your scene if possible, so we can have a look at it and use it to validate our performance tweaks against.
     
  7. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    It's attached to case 658208
     
  8. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    @Jaimi That is unusual :( Is your geometry simple for your level?
     
  9. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    It's a scene with a terrain and quite a few models. I've tried various scenes with terrains and they all do the same thing - stall at "layout systems 2/11". Terrains with a resolution of 513 up to 2049. The one I posted in the case above is one from Manufactura K4 (from the medieval package). But I've tried my own, and others from various packages. Probably took about 10-20 minutes to light map with Beast before, so 3 days is more than excessive. :) Fortunately it's a known issue. I hope they can get the time down to Beast levels. Terrains really look nasty without light mapping - trees look like they float.
     
  10. homerender

    homerender

    Joined:
    Sep 14, 2012
    Posts:
    189
  11. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    So I tried final gather out today using my test scene (the one in the images at the beginning of this thread) and after waiting for a couple of hours I gave up. Looks like it's broken. It gets stuck on "11/14 Bake Indirect".

    This is the last thing in the editor log (repeated 9 times)...

    Receiving unhandled NULL exception
    Launching bug reporter
    Obtained 24 stack frames.

    The bug reporter is not actually launched even though that suggests that it is. Also, the editor remains responsive and I can cancel the bake. Bug 667449.
     
  12. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Can you post your settings? I am getting stuck if my ray count is too high, 1024 is very high... hell, the engine freezes on my cornell box.
     
  13. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    Sure, these are my settings...

    Final gather rays are only 256.
     
  14. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Why do you have your indirect res so low? And also, for better effect, your ambient source should be your sky box :)
     
  15. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    I've set the indirect low in an attempt to speed up bake times (as suggested by Kuba). The whole point of final gather is to get good results with low indirect resolutions (though it still takes around 10 minutes, with final gather off, even at that low a resolution).

    I'm not interested in the effect of the ambient lighting right now. I'm keeping it simple for testing purposes (and to keep it easily comparable to Beast).
     
  16. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    @Jde the final gather happens at Baked GI resolution, so you can try and lower that. Also, you can try baking a smaller scene... Please post your findings here and if possible submit a bugreport with your scene.
     
  17. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    @Jde would you like to use my Cornell Box Asset? It's perfect for testing
     
  18. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Here is a shot of my Cornell Box using just luminous polygons... no lights whatsoever. I am using a low baking resolution and a high FG ray count... looks almost very natural. The bright spot in the ceiling is the luminous polygon lighting my scene :) Screenshot 2015-01-28 12.50.08.png
     
    Cynicat likes this.
  19. seattlebluesky

    seattlebluesky

    Joined:
    Sep 2, 2014
    Posts:
    170
    FWIW I'm having the exact same issue on Mac OS X 10.10.2 with Unity b21 at the Bake Indirect mapping stage.
     
  20. seattlebluesky

    seattlebluesky

    Joined:
    Sep 2, 2014
    Posts:
    170
    And the bug reporter never launches. I suspect the bug reporter itself is also throwing an exception. Doh!
     
  21. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    it's always more than welcome to share a Cornell box :D
     
    KRGraphics likes this.
  22. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Here you go guys... this is the Cornell Box that I have been using to test out my lighting for my models. The materials will be missing, so use the U5 Standard Shader. Also add a Global Reflection Probe to the scene (reflection probes will get you 90% of the way for lighting your models.)

    Enjoy.
    https://www.dropbox.com/s/5qf7smgzst2r23g/Cornell Box Package.unitypackage?dl=0

    I should ask this here... will colour bleed be in the final version of Enlighten...? i have noticed that I get colour bleed on close objects but in reality, colour bleed occurs EVERYWHERE.
     
    shkar-noori likes this.
  23. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    Reducing baked resolution or baking a smaller scene would defeat the purpose of the test. I'm not interested in fast bakes at any cost.

    Anyway, I suspect this problem with final gather is a 'completely broken' problem rather than a 'slow' problem. I've submitted a bug for it (667449).
     
  24. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    When you have final gather at very high samples, it DOES take a while... just imagine this with a bigger level...
     
  25. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Some more FG goodness :) and promoting Unity. It took a while to render this but it looks pretty damn good... on higher ray counts, it will take time, even on this simple level test. Screenshot 2015-01-28 19.29.33.png
     
    Cynicat likes this.
  26. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,372
    KRGraphics likes this.
  27. God-at-play

    God-at-play

    Joined:
    Nov 3, 2006
    Posts:
    330
    Sadly monte carlo style isn't in yet, but Final Gather is. I made the simplest test scene with a plane, cube, and directional. Assuming you bake right after launching Unity, it works, otherwise it gets stuck (Case 667829). When it does work, I had the same issue as the OP where it's many times slower than Beast, which itself was very slow compared to other baking software.
     
    KRGraphics likes this.
  28. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I mentioned already that you have add stuff.
     
  29. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Monte Carlo is slow as balls though :(... I've been doing tests where I use a low baking res like 128, and a high FG Ray Count... I wish there was an indicator though on progress, like diagnostics...
     
    shkar-noori likes this.
  30. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    We have reproduced this and we are working on a fix. Thanks for reporting!
     
    seattlebluesky and KRGraphics like this.
  31. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    Great! No problem.
     
  32. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I just had this issue as well... and I just let it bake overnight...and I woke up, and it was done... and the results looking freaking sweet... if the white spots on the floor are caustics (or lack thereof), that is even sweeter.
     

    Attached Files:

  33. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    Since I just began Testing Unity 5 Beta for WebGL Platform and Noticed how bad the Light Mapping is... can we Bake Lights in Unity 4.6.1 then just Upgrade the Project from there? Can we do this as a Work around?
     
  34. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    Scenes I baked with Beast still open in the latest Unity 5, I just get an "Upgrade To Enlighten" button in the lighting window. So that might be a workaround.

    You might even be able to keep a separate 4.6 project just for baking lightmaps, and manually copy the scenes/lightmaps over to the Unity 5 project after every bake! Probably a bit extreme though.
     
    jonkuze likes this.
  35. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    I think it's a bit extreme to wait hours for bad quality lightmaps in Unity 5 right now compared to the work around idea, i mean someone mentioned above the lights didn't bake on his scene for 3 days! thats nuts... i'm not even going to bother with Enlighten if that's the kind of issues we are facing with it for now.
     
    KRGraphics likes this.
  36. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    After some experimenting, I have not experienced that... then again, I am not using terrains yet but it's all about quality tradeoff. I have found that lower baked resolution is pretty fast... and once you start using FG, you will see some grain... that is normal. The hard part is getting rid of said grain. Also with terrain, I do remember that the terrain will tesellate based on distance.
     
  37. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Speaking of lightmap, i believe people already get and reporting this, but i just want to verify.
    Using directional specular and final gather introducing a weird white line artifact.
     
    KRGraphics likes this.
  38. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    Ive not been able finish any final gather bakes so I wouldn't know. I've not seen anyone else complain about that though so I'd say submit a bug for it.
     
  39. DFT-Games

    DFT-Games

    Joined:
    Jun 24, 2010
    Posts:
    454
    I let it run and it finished in little less than 4 days :(
     
  40. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467

    I've already confirmed this...
     
  41. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    I don't have time to test it, but is it really that bad? Is it only a problem with terrains? If you're not using terrains for example, does it bake in a reasonable amount of time and with a reasonable quality?
     
  42. seattlebluesky

    seattlebluesky

    Joined:
    Sep 2, 2014
    Posts:
    170
    In my experience with Unity Beta 21 the baking is more stable on my Windows 7 64-bit desktop than Mac OS X 10.10.x. Your mileage may vary.
     
  43. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Hi! We have fix for final gather getting stuck coming soon. We also have a speedup for clustering coming soon, probably in beta 23. That should speed things up when baking terrains and large meshes. Keep an eye on the release notes.
     
    seattlebluesky and Roni92 like this.
  44. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    Probably, cause b22 didn't do much of it, and please catch up with the 4.6 UI.
     
  45. seattlebluesky

    seattlebluesky

    Joined:
    Sep 2, 2014
    Posts:
    170
    Baking completes now on Mac OS X 10.10.2 with Beta 22. Great!
     
    KEngelstoft likes this.
  46. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I'm still on 10.9.3, and baking never really goes anywhere for me still. Still sticks on "Layout systems 2/11". Terrain trees still are borked with the white halo on everything.
     
  47. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    Just tested final gather again in Beta 22. No change, still broken. Same errors in the editor log.
     
  48. seattlebluesky

    seattlebluesky

    Joined:
    Sep 2, 2014
    Posts:
    170
    I'm not using terrains. I read on the forums that terrain baking is improved in some future release.
     
  49. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    The final gather fix didn't make it into that release so that is expected. The version we build tomorrow will have the fix for sure, along with a new baking speed improvement for terrains, so keep an eye on the release notes.
     
    protopop likes this.
  50. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    642
    It's a shame that this option is going away. It still seems like it may be the better option for (mobile) developers who won't be using any of the fancy/expensive new GI functionality, and just want basic lightmapping.

    It could also be a showstopper for those wanting to move an existing project into 5.0 without it affecting the appearance of their lighting.
     
    protopop likes this.