Author Topic: Atlas blurred when I add font  (Read 12780 times)

lenneth78

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Atlas blurred when I add font
« on: June 03, 2012, 04:18:28 PM »
Hi,
I have a problem when I add an image that gives me the message "ImportSettings 'Assets/Textures/images Bases/Atlas GUI.png' has been modified but AssetDatabase.ImportAsset has not been called. Please fix the scripts code or Import the asset manually." , and the Altas becomes blurred.
After that when I remove the font, the atlas becomes clear.

Even when I remove images and fonts of Unity and put them back, it does not change.

strange since everything worked fine before and suddenly nothing will.

Any idea?

Otherwise congratulations for Ngui which is great.

thx

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas blurred when I add font
« Reply #1 on: June 03, 2012, 07:34:06 PM »
You need to save (CTRL+S) after each modification to the atlas, otherwise changes don't take. It's a Unity issue.

lenneth78

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Atlas blurred when I add font
« Reply #2 on: June 04, 2012, 02:29:43 AM »
Hi,

Thx it's better but I still have a blur effect (less than before) but always present.

I upload an image: left of an image on a plain with simple materials and at right sprite with Ngui.



I understand why there because I have no error message.  :'(

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas blurred when I add font
« Reply #3 on: June 04, 2012, 03:15:48 AM »
Did you make sure your sprite is pixel-perfect? Select the UIRoot and hit Alt+Shift+P

They are clearly different sizes in that picture.

lenneth78

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Atlas blurred when I add font
« Reply #4 on: June 04, 2012, 05:48:28 AM »
I tried, no change.
I tried with the tutorial 5 also. Same result as for my atlas (I recreated a new project in Unity and reimported Ngui), Sprites are blurred.
I took a screen of turoriel 5 with Unity for android and Game screen in 1024/600 (TegraTablet) before and after pixelPerfect.

Before



After



What I really do not understand is that everything worked well before and now I have this problem ... it returns me the brain

loopyllama

  • Guest
Re: Atlas blurred when I add font
« Reply #5 on: June 04, 2012, 06:16:31 AM »
because NGUI will sometimes change your texture filter settings from point to trilinear and it will sometimes turn on mipmapping. Click on your atlas texture after you think it becomes blurry, in the inspector make sure Texture Type is Advanced, make sure Generate Mip Maps is unchecked and most importantly make sure Filter Mode is set to Point.

Also for mobile devices click "Override for iPhone" and make sure the format is RGBA 32 bit if you want to turn off compression. This will eat up a ton more memory but you will get pixel perfect art.

Note: if this fixes your issue and you want to stop NGUI from changing your settings, search my previous postings for mipmapenabled and trilinear

lenneth78

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Atlas blurred when I add font
« Reply #6 on: June 04, 2012, 06:30:10 AM »
it's work,thk !!  ;D


tylo

  • Guest
Re: Atlas blurred when I add font
« Reply #7 on: June 13, 2012, 03:59:30 PM »
because NGUI will sometimes change your texture filter settings from point to trilinear and it will sometimes turn on mipmapping. Click on your atlas texture after you think it becomes blurry, in the inspector make sure Texture Type is Advanced, make sure Generate Mip Maps is unchecked and most importantly make sure Filter Mode is set to Point.

Also for mobile devices click "Override for iPhone" and make sure the format is RGBA 32 bit if you want to turn off compression. This will eat up a ton more memory but you will get pixel perfect art.

Note: if this fixes your issue and you want to stop NGUI from changing your settings, search my previous postings for mipmapenabled and trilinear

I had to register to say THANK YOU for pointing this out. I was running into the same problems and my fonts looked absolutely terrible.