Author Topic: Atlas with mipmapEnabled=true looks blur  (Read 8708 times)

favoyang

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 14
    • View Profile
Atlas with mipmapEnabled=true looks blur
« on: May 06, 2012, 02:35:55 AM »
I found texture atlas by default with mipmapEnabled=true. This caused the my UI layer looks blur. Is there any reason to keep it on?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas with mipmapEnabled=true looks blur
« Reply #1 on: May 06, 2012, 08:50:11 AM »
3D UIs look terrible if it's off.

Why would your UI look blurry? If you're working in pixel coordinates it will look the same regardless of what filtering you're using.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Atlas with mipmapEnabled=true looks blur
« Reply #2 on: May 07, 2012, 05:41:03 AM »
In 2d UIS turn it off, in 3D keep it on, for goodness sakes. :D

The only reason it would change to a different mipmap would be distance from the camera I think.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas with mipmapEnabled=true looks blur
« Reply #3 on: May 07, 2012, 10:33:42 AM »
Or if it's scaled weirdly (not pixel-perfect).

dlewis

  • Guest
Re: Atlas with mipmapEnabled=true looks blur
« Reply #4 on: May 14, 2012, 08:42:06 PM »
Any chance you would be able to make 'enable mipmaps' a setting in the atlas maker? Not only for people that have the problem with blurry text on 2D ui's but also for size (when mipmaps are enabled our texture atlas is 21MB, with them disabled they are disabled it drops to 16MB)?

loopyllama

  • Guest
Re: Atlas with mipmapEnabled=true looks blur
« Reply #5 on: May 14, 2012, 11:53:10 PM »
You can find the atlas texture on disk and uncheck generate mip maps and search the code base for mipmapenabled and comment out the two lines that come up.

Works great.

dlewis

  • Guest
Re: Atlas with mipmapEnabled=true looks blur
« Reply #6 on: May 15, 2012, 01:10:18 AM »
You can find the atlas texture on disk and uncheck generate mip maps and search the code base for mipmapenabled and comment out the two lines that come up.

Works great.

I've already found the code but it makes updating ngui painful when you have to make sure you save X number of changes and re-apply them (you can't even merge them!).

loopyllama

  • Guest
Re: Atlas with mipmapEnabled=true looks blur
« Reply #7 on: May 15, 2012, 10:04:40 AM »
I think if you pay 200 dollars you get access to more builds and somehow code merging becomes possible, but I am not sure about that. I do know that is currently the only change I make every update, although I hate how it always sets my pixel perfect UI from point to trilinear filtering every time I update a texture. If I get the time to track that one down I might have 3 or 4 changes every build  ;D
It is annoying but it is better than taking the time to build my own system. I would rather make a pretty and functional UI and concentrate on gameplay. I can handle a certain level of "I wish that...".


Edit: I found the trilinear setting. NGUIEditorTools.cs in method MakeTextureAnAtlas (string,bool) comment out the
  1. settings.filterMode = FilterMode.Trilinear;
and now whatever you set the atlas texture filter mode to will not change when you add/update a texture!
« Last Edit: May 15, 2012, 10:15:55 AM by loopyllama »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas with mipmapEnabled=true looks blur
« Reply #8 on: May 15, 2012, 01:51:56 PM »
I need the "take off the training wheels" option. The automatic texture mode changing is there to make sure that everything works as expected in 95% of the cases. It's the 5% that know what all the options do and want them to be different that get annoyed by this. :)

I'll add something.

FizzPow

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 83
    • View Profile
    • FizzPow Games
Re: Atlas with mipmapEnabled=true looks blur
« Reply #9 on: December 14, 2012, 12:24:58 AM »
Just bringing this back up because I would like an option to maintain my existing texture settings.  I am using mipmaps as a way to auto-generate atlas's for lower resolution devices and it works great, but I have to turn mipmaps back on every time I update the atlas.  Thanks!