Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question Poor quality of sprites from Sprite Asset

Discussion in 'UGUI & TextMesh Pro' started by StoneWillFall, May 12, 2024.

  1. StoneWillFall

    StoneWillFall

    Joined:
    Nov 9, 2017
    Posts:
    7
    Hi,

    I am using TMP_Sprite Asset with icons from my Texture 2D object.
    Unfortunately, the quality of sprites in TextMeshPro - Text (UI) object is quite poor, especially for small font size.
    Additionaly, on different texts the same icons look really different.

    Here are sample icons from my texture in TMP_Sprite Asset:
    upload_2024-5-12_14-1-33.png
    And here are those icons in the TextMeshPro component with font size 16
    (top from left 149, 94, 150; bottom from left 148, 147):
    upload_2024-5-12_13-49-59.png upload_2024-5-12_13-50-13.png upload_2024-5-12_13-50-27.png upload_2024-5-12_13-50-50.png
    The problem is especially visible on objects 150 and 148.

    Can I somehow increase the quality of those sprites in Text?
     
    Last edited: May 12, 2024
  2. StoneWillFall

    StoneWillFall

    Joined:
    Nov 9, 2017
    Posts:
    7
    Anyone got any tip? If I set the font size to 28 it looks perfect, but with 16 it looks really bad.
    And I don't think this is just a problem with the small image - I opened the same image and scaled it down to a similar size, and it looks much better than in the game and definitely much more consistent:
    upload_2024-5-24_20-9-50.png
    So the problem is with the rendering in Unity or the way I configured/imported the Sprite Asset
     
  3. StoneWillFall

    StoneWillFall

    Joined:
    Nov 9, 2017
    Posts:
    7
    I made some experimenting on the texture.
    Changing "Filter Mode" to Bilinear or Trilinear makes it look better.
    Enabling "Generate Mip Maps" makes it less deformed but instead more blurry.