Search Unity

Mip Maps on UI Sprites? Good or bad?

Discussion in 'UGUI & TextMesh Pro' started by AM_1, Dec 28, 2014.

  1. AM_1

    AM_1

    Joined:
    Nov 18, 2013
    Posts:
    7
    For 3D textures, I believe it's generally better to turn on mip maps for performance reasons and for looks when viewing from far distances. Does this also apply for mip maps on sprites in the new UI?

    In the old OnGUI UI system and in the even older GUIText/GUITexture system, there was no such things as mip maps, but every time I import a new image in the new UI in 4.6 I keep seeing a "Generate Mip Maps" checkbox.

    Will generating mip maps for sprites help/hurt performance? Will they affect how good/bad the UI looks?


    Thanks,
    Arka M.
     
    siddharth3322 likes this.
  2. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    In general they make it look worse, especially if you're using bordered sprites. You should probably just use it with 3D stuff, or very large images.
     
    honor0102 and AM_1 like this.
  3. AM_1

    AM_1

    Joined:
    Nov 18, 2013
    Posts:
    7
    Thanks, just wanted to make sure I was doing everything correctly :).
     
  4. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    584
    I have been turning Mipmaps on, as it seems to look better at various resolutions. I think turning it off, you have to make it pixel perfect to the screen size. I try to design all my interfaces to scale from iPhone to iPad to Full screen desktop and Mipmap seems to work better for me.
     
    Allan-MacDonald likes this.
  5. BMayne

    BMayne

    Joined:
    Aug 4, 2014
    Posts:
    186
    We turn them all off for every art asset as they look bad and mess some things up. This might have to do with the fact that we have 3 assets for each image (HD,UD,SD) which we hot swap based on the device.
     
    honor0102 likes this.
  6. outtoplay

    outtoplay

    Joined:
    Apr 29, 2009
    Posts:
    741
    Be nice if when creating a project in 2D...the Mipsmaps setting was off by default, or these settings could be set in the Prefs. Having to do it over and over is a drag. Like Audio files, far more likely to not be '3D' than to be.
     
  7. BMayne

    BMayne

    Joined:
    Aug 4, 2014
    Posts:
    186
    You can fix this pretty easily by extending the AssetPostprocessor class. In there you can choose how assets are imported.

    http://docs.unity3d.com/ScriptReference/AssetPostprocessor.OnPostprocessTexture.html