Author Topic: Upgraded from 3.7.9 to 3.9.8 and images now appear to have compression artifacts  (Read 2451 times)

[MR]asilva

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
After too long of a wait, I have finally been able to update to the latest NGUI from 3.7.9.  Unfortunately, after doing so, my large background images have some pretty severe compression artifacts that did not exist before.  I noticed many changes in the logs relating to linear color space (which we are using) as well as changing from Color32 to Color - I'm guessing one of those changes may have done this, but I can't believe that I'm the only person this has happened to after upgrading.  Is there anything that can be done about this?  I understand having to do the color correction and that's not a problem, but the artifacts are preventing me from staying on 3.9.8. :(

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Which part are you calling an artifact? One image just looks brighter than the other to me. The latest NGUI correctly reproduces colors in linear space while previous versions did not.

[MR]asilva

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Reposted images with annotations.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
IIRC linear colors have lower resolution when it comes to dark colors. Try creating a brighter texture and then simply applying a color tint to it or bypass sRGB sampling by checking it on texture import settings.

[MR]asilva

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
After a bit of research and lots of trial and error, we have finally figured out what the problem here was.  You were correct about the lower res for dark colors - this thread was fairly informative on more details for anyone who's interested: http://forum.unity3d.com/threads/bug-with-bypass-srgb-sampling.282469/ 

We tried bypassing the sRGB sampling but all that did was make things brighter.  We were about to give up on our hopes of upgrading to the latest NGUI when an artist said "maybe it has something to do with the color tint we're applying?".  Turns out it was the alpha part of the color tint - it was set to ~45 - we bumped it up to ~140 and it now looks like it did before the upgrade (which we can now keep!).  This was the only change that was needed, we are not bypassing sRGB (unless importing as a sprite does that automatically, but I don't think it does). 

Just wanted to post this here in case anyone else runs into this issue.