Search Unity

Why Is Unity 5 Baked GI Consistently Very Over Saturated?

Discussion in 'Global Illumination' started by RedVonix, Feb 25, 2016.

  1. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    We are porting a game from Unity 4 to Unity 5. The lightbaking was perfect in 4, but unfortunately we have to throw all of that out for Unity 5. We're in the process now of updating everything to Enlighten. However, whenever we bake a scene using Baked GI, the lighting is always very overexposed. It doesn't matter what scene, or what project - it's always way, way too bright.

    Check out the attached images. BEFORE shows just that - before baking. BAKED shows the post-baking. I would expect them to look nearly identical, but the reality is the BAKED image is so overexposed that most of the shading detail is gone and the scene just looks terrible.

    I've also included images of the Lighting settings and LightmapParams that I'm using. It's worth noting that regardless of what settings I use in either of those panels, the end result is _EXACTLY_ the same. It doesn't even change a little bit... which seems exceptionally odd to me.

    Thank you in advance for any help anyone can give!!
     

    Attached Files:

    Last edited: Feb 26, 2016
  2. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    Oversaturated, or overexposed? I always experience the latter in my projects. If it is the same problem, there are a lot of people experiencing this. I also believe there might be a fix coming in 5.4
     
  3. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    Oh wow, LOL... yes, overexposed. I think I was yet to consume my coffee yet when I wrote that. ;)
     
  4. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,755
    (as of the latest beta for 5.4 not a lot has changed on that front...)
     
  6. upperclasslemon

    upperclasslemon

    Joined:
    Mar 8, 2015
    Posts:
    7
    I'm guessing you are targeting mobile/gamma lightspace? Then definitely yes as spryx says it is the overexposure problem that has been raised by many people since 5.0 dropped. Here's hoping it is in 5.4, it's been almost a year waiting for this to be fixed so we can upgrade to 5.
     
  7. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557

    The bug fix says 5.4.0. Hopefully it makes release. I test each beta to see if it has been fixed. I'm not holding my breath on this one though.
     
    AcidArrow likes this.
  8. FuRy

    FuRy

    Joined:
    Apr 16, 2013
    Posts:
    28
    Yeah wouldn't hold my breath with every fix comes a heap of new problems. At this point it's just becoming very frustrating.
     
  9. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    Not mobile, but console (specifically Xbox One currently). Though I wouldn't be surprised if there are similarities there in terms of that.
     
  10. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    The gamma baking issue #681444 was "resolved as of 5.4.0", but is now active again... So it really looks as though it will not make 5.4.0. :(
     
  11. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    I think it's time to go back to Beast. Beast worked. It worked really well. And by forcefully removing it, a lot of developers have had to put in a tremendous amount of extra development time, or flat out cancel projects / platform ports. Let's get Beast back, and at the very least give a toggle switch to go between Beast and Enlighten.
     
    bluescrn likes this.
  12. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    Don't get me wrong, Enlighten is great for realtime GI. Autodesk is a competitor now, so I can't see them integrating Beast back into the product. I do believe that some work is being done on a path based lightmapper. You can read more about it here:
    https://twitter.com/pigselated/status/697057451800203264

    I just wish we didn't have to wait so long for proper gamma lightmapping...half a version later, that is silly.

    Well... at least if the issue isn't solved by 5.4, I can celebrate its birthday. It will be one year old on 3/17 :p
     
  13. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    Its active again because 5.4 wasn't an option for a lot of users. There is a team working to orchestrate a "happy ending" for everyone :) Magic pumpkins don't always happen overnight, but know there are folks working to make it happen. <3
     
    spryx likes this.
  14. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    Unfortunately we are about cancel four console ports of a game because of this. We are losing enough money and time as it is due to the loss of Beast, then this on top of that will almost certainly cause us to switch to UE4 for future titles.
     
  15. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    @holliebuckets
    I understand it takes time. Half of my post is joking, the other half is serious ;) And I have a lot of projects to complete before then. I know that it isn't a small issue. Thanks for the update.
     
  16. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    That's a bit of a bummer to hear, considering the team has been working with you (and your project specifically) over their weekend :( but that is your choice in the end.
    :) I will try to keep you updated as concrete decisions are made. That is the best I can offer :)
     
    hippocoder likes this.
  17. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    Well, we haven't cancelled yet. But we have halted all work until we know what will happen with this as right now it is the single deciding factor on if we finish the ports or not.
     
    holliebuckets likes this.
  18. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    642
    You're not alone. If you've got lots of baked lightmapping, moving to Unity 5 is a total nightmare, and still a potential showstopper. I'm working on a fairly large mobile project that is stuck in 4.x due to the lighting system change.

    Even if everything works (and lightprobes definitely aren't up to the 4.x standard), it can involve a *lot* of art time to re-light every level. It's certainly not just a case of clicking 'bake' and waiting - the results are clearly very different, you need to almost relight the scenes from scratch.

    IMHO, Unity should have tried to provide a better upgrade path for 4.x users before discontinuing 4.x. That could have meant keeping Beast as a 'legacy mode', or providing a tool to import 4.x scenes without losing lightmaps/probes. Also prioritising fixes related to baked lighting/gamma mode, as it's taken almost a year to get a poor/incomplete fix for lightprobes
     
    Last edited: Mar 1, 2016
    RedVonix likes this.
  19. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    *shrieks* but I was promised when I was little!

    Beast etc:
    Generally GI wise I can survive without beast if I'm allowed to crank the quality up, however this takes forever. Need to be able to throw compute units or hardware at it if optimising isn't a thing...
     
  20. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    You need to drop the mic after that post. You've articulated the issue far better than I did.
     
  21. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,755
    That's impossible though.

    1. Because as you get higher quality and res the render time increases exponentially.

    And more importantly

    2. Enlighten starts producing wrong results when the res is high enough. Even if you could throw power at it, it just doesn't work (disclaimer this behavior was tested with 5.2 not sure if it still happens as often as it used to)
     
  22. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    UPDATE:
    There is a plan of action for a solution, but no timeline as of yet.
    A workaround script (more immediate timeline) to bake as in 4.x and use these results in 5.x. is in the works, but will be temporary. hopefully that is not confusing/misleading

    I will continue to keep tabs and check in with this thread. The wait can be frustrating, thank you for being understanding while the team works to get you all going.
     
  23. greenmonster

    greenmonster

    Joined:
    Jan 18, 2013
    Posts:
    26
    This would be an absolute godsend. Please keep us posted! Would this be available within a week?
     
  24. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    I wasn't given an exact timeline. When I get more info I will be sure to pass it on :)
     
    RedVonix likes this.
  25. mattSydney

    mattSydney

    Joined:
    Nov 10, 2011
    Posts:
    171
    Come on it is hardly "overnight" Unity 5 is nearly a year old and after spending $1500 on upgrading from Unity 4 which worked perfectly to 5 which still cannot be used for any serious mobile development, you can understand why myself and many others are disappointed to say the least.

    Lightmapping still doesn't work which is a necessity for mobile dev. Mixed lighting doesn't work. Android performance is still buggy. Every release brings more bugs or reintroduces "fixed" ones.

    I'm not blaming the devs they are doing what they can. Unity 5 has been a feature creep and QA nightmare. It has been a total disaster and should still be in beta, or at least state not suitable for mobile development without serious time spent optimizing outside of Unity
     
    holliebuckets and AcidArrow like this.
  26. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    We have a submission deadline with Xbox One and Sony for end of May. The nanosecond you have a baking script available, I would be more than happy to test it to see if we will be able to hit those submission dates. Thank you!
     
    holliebuckets likes this.
  27. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    big thumbs up. I will pass that info on to the team internally as well!!
     
  28. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    The frustration is very real. Now we need to fix it, where fix != just a band-aid.
     
  29. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    Hey folks! We're getting kind of close to our console submission deadlines. Are there any updates regarding this issue?

    Thank you!
     
  30. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    @DCalabrese watch for a reply to your email :) I pinged the team, they said to watch your email.
     
  31. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,755
    So, is this happening or not? It has been a few months already.

    If it is happening, will if happen before or after this enlighten artifact is fixed?
    artifact.jpg
    (this has been around since Unity 5 betas, cool, huh?)

    I have given up on getting decent GI from anything geomerics (and by extension, Arm, I guess) related, so I could really use a script that loads Beast lightmaps, that is a very outdated technology, but has the advantage that it's usable, which I happen to value highly.
     
    ChayChay likes this.
  32. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    That banding looks like an artifact of RGBM encoding. It's technically incorrect to bilinearly filter those values and decode when there's a jump in the multiplier (so in the alpha channel). So a different Enlighten output format could totally help in this case. I will try a different output format like r9g9b9a5... Thanks for submitting a bug report about it btw :)
     
  33. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,755
    For the record, bug 657956 was reported in December 2014.

    In any case, thanks for taking a look at it.