Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Build 20 Mipmap on Sprites

Discussion in 'UGUI & TextMesh Pro' started by mog-mog-mog, Oct 4, 2014.

  1. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    By default mipmap is turned on with Sprite.
    I am importing a sprite of 100x100 and it truncates the sprites if I turn mipmap on. Can someone please explain me what's going on?

    Note: If I increase size to 128x128, it works fine.

    Import Setting: Import-Setting.png



    Image in use:
    Image-in-use.png
     
  2. PeterD

    PeterD

    Joined:
    Feb 6, 2013
    Posts:
    120
    Same problem I reported a while back. The defaults for the sprites now seem to screw up the UI when you import new assets. Oddly all the existing assets in my project, which I guess would have retained their original settings from beta 19, don't exhibit this issue.

    I found that turning off mip-mapping solves the issue for me.

    edit: As near as I can tell mipmapped sprites are returning incorrect size information to the ui as the sprites look fine in editor sprite preferences view when you click on them.
     
    habsi70 likes this.
  3. grantimus

    grantimus

    Joined:
    May 25, 2013
    Posts:
    15
    If you are using mipmapping, it's best to keep your image dimensions to a power of two. For example 64x64, 128x128, 256x256, etc. This will ensure proper mipmap generation, blending, etc.
     
  4. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,266
    Is your platform setting in the Build Settings set to a platform that only uses POT textures? I noticed this issue after switching to Android in my project; it went away after switching back to Standalone.
     
  5. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    This is on Android and IOS. I believe recently Unity 4.6 B20 changes the default value of Sprites MipMap from "Off" to "On". After i switched mipmap off, it works as expected.