Search Unity

TextMesh Pro Blurry Text

Discussion in 'UGUI & TextMesh Pro' started by Rewaken, Oct 1, 2018.

  1. Rewaken

    Rewaken

    Joined:
    Mar 24, 2015
    Posts:
    128
    I am using Screen-Space Camera as a render mode on canvas but the Textmeshpro text is looking blurry. I think it might be due to canvas scaler setting. Following is the result I am getting in unity and Canvas settings.



    https://imgur.com/a/nPlJw2S
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    This looks like either a scaling issue (ie. not using uniform scaling on the text object or any of its parents) or ScaleX and ScaleY in the debug section of the material inspector not being set to a value of 1 or the Gradient Scale also visible in the Debug section of the Material inspector not being set to padding + 1.

    The issue could also be related to the Canvas "Additional Shader Channels" not being set properly where Texcoord1 is not set.
     
  3. Rewaken

    Rewaken

    Joined:
    Mar 24, 2015
    Posts:
    128
    Hello thanks for the reply. I solved this issue by disabling HDR on camera
     
  4. Saraswati_JCI

    Saraswati_JCI

    Joined:
    Dec 20, 2018
    Posts:
    9
    TextMesh Pro Looking Blurry:
    I am building unity WebGL build and it looking very blurry. Is there any solution to resolve this?
    Note: It is looking good in the editor and for the iOS build.

    Thanks in Advance.
     
  5. Saraswati_JCI

    Saraswati_JCI

    Joined:
    Dec 20, 2018
    Posts:
    9
    TextMesh Pro Looking Blurry:
    I am building unity WebGL build and it looking very blurry. Is there any solution to resolve this?
    Note: It is looking good in the editor and for the iOS build.

    I am using unity version 2019.2.16f1

    Thanks in Advance.
     
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Are you using a Canvas Scaler or some type of scaling on the text objects?

    Check if switching to the SSD versions of the TMP shaders resolves the issue. SSD shaders are included in the TMP Essential Resources included in the latest release of the TMP package. SSD shaders have the suffix SSD.
     
    ltomov likes this.
  7. Saraswati_JCI

    Saraswati_JCI

    Joined:
    Dec 20, 2018
    Posts:
    9
    upload_2020-10-12_16-9-2.png

    Stephan_B As you suggested I have tried with SSD shader also. But still, fonts are looking blurry.
    I am using textMeshPro version 2.1.1

    I am using these settings on canvas scaler. And screen size is also the same as the reference Resolution size
    upload_2020-10-12_16-12-31.png
     
    MilenaRocha likes this.
  8. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    It should not be blurry when using the SSD shaders as those do not require SDF scaling.

    Can you provide a screenshot of the material inspector of that text object along with another showing the font asset and its creation settings?
     
  9. Saraswati_JCI

    Saraswati_JCI

    Joined:
    Dec 20, 2018
    Posts:
    9
    upload_2020-10-13_12-15-40.png

    upload_2020-10-13_12-16-53.png

    upload_2020-10-13_12-17-34.png

    upload_2020-10-13_12-25-44.png

    Stephan_B
    Please find the above screenshot. Let me know if any corrections needed.

    Thank you
     

    Attached Files:

  10. Saraswati_JCI

    Saraswati_JCI

    Joined:
    Dec 20, 2018
    Posts:
    9
  11. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Please re-generate the font asset to increase the ratio of Sampling Point Size to Padding. Currently your sampling point size is 105 with padding of 5. Increase this ratio to about 10% and let me know if the issue you are seeing goes away?

    P.S. You can switch to using the Mobile Distance Field shader. Ie. not the SSD version.
     
  12. Saraswati_JCI

    Saraswati_JCI

    Joined:
    Dec 20, 2018
    Posts:
    9

    Hi Stephan_B
    I have re-generated font asset by increasing sampling point and padding by 10%. But still, text in Web GL build is looking blurry. :(


    upload_2020-10-14_17-49-36.png

    upload_2020-10-14_17-50-10.png

    upload_2020-10-14_17-50-37.png
     
  13. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    With an updated Sampling Point Size to Padding and using the SSD versions of the Shader, the text should render correctly. So something else is causing this behavior.

    Can you submit a bug report with the included project / repro scene for me to look at?

    Please provide the Case # once you have it.
     
  14. Saraswati_JCI

    Saraswati_JCI

    Joined:
    Dec 20, 2018
    Posts:
    9
    Hi Stephan_B

    Thanks for your quick reply. :)

    As you suggested, I have reported bug and they have suggested me to use unity version 2018.4 LTS or above 2019.3 version. So I have upgraded my unity in 2020.1.10f1 and it is looking good now.
     
    Nolex likes this.
  15. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,977
    @Stephan_B I am using 2019.4LTS and having the exact same issue in WebGL
     
  16. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Issue is likely the result of some scaling possibly the result of using a Canvas Scaler where the text objects aren't aware of the scale change resulting in incorrect SDF Scale. See my reply to your other post.
     
  17. rzer

    rzer

    Joined:
    Aug 26, 2014
    Posts:
    3
    Also check anti-aliasing setting on base camera. FXAA anti-aliasing got the same result.
     
    ScottAdams and chrisheld like this.
  18. chrisheld

    chrisheld

    Joined:
    Apr 15, 2013
    Posts:
    8
    This fixed it for me.

    Thank you,
    Chris
     
    ScottAdams likes this.
  19. ScottAdams

    ScottAdams

    Joined:
    Nov 23, 2016
    Posts:
    72
    I too had the same issue!

    Just noticed FXAA was forced on in game, and also in our main menu. Shutting it off in the menu made things look a lot better!
     
    CreativeKinase and Stephan_B like this.
  20. edin97

    edin97

    Joined:
    Aug 9, 2021
    Posts:
    58
    Might help someone so I'm posting :

    Fixed my blurry font by : Window -> TextMeshPro -> Font Asset Creator

    Chose your "Source Font File" (which is your normal font you want to transform to TextMeshPro), then change :
    Packaging Method : Optimum
    Atlas Resolution : 4096x4096
    Render Mode : SMOOTH

    Press Generate Font Atlas, Save, then try it out.

    It worked for 5 of my blurry fonts, might take more memory idk, but it's better than having blurry text
     
    PrimalCoder, moilamar and Mr_Htet like this.
  21. HernandoNJ

    HernandoNJ

    Joined:
    May 13, 2018
    Posts:
    75
    In my case, when entering play mode, and the game tab was too small, the TMP or common Canvas UI text were too blurry.
    I increased the game tab size to max and the TMP text got normal.
    Please @Stephan_B , help us to solve this bug. It's been there for years.
     
  22. OmarVector

    OmarVector

    Joined:
    Apr 18, 2018
    Posts:
    130
    Reducing the atlas resolution actually removed the blurring. bec I'm using font size 16, when the atlas resolution was 4K, it was super blurry, when I did down it to 512x512 , looks clean to me now
     
    kennychowtbs likes this.
  23. impfactory

    impfactory

    Joined:
    Aug 1, 2017
    Posts:
    3
    in my case, go text mesh pro component, go bottom material inspector, debug- sharpness
     
    Neil-Corre likes this.
  24. CedricLehr

    CedricLehr

    Joined:
    Apr 5, 2017
    Posts:
    13
    I was having the problem in VR. Closing the game tab solved the issue.
     
  25. Newb_Ninja

    Newb_Ninja

    Joined:
    May 19, 2022
    Posts:
    14
    This happened to me and I simply reimported the asset and it fixed it.
     
  26. SP5068

    SP5068

    Joined:
    Sep 9, 2023
    Posts:
    1
    I dont know if any of you are still experiencing this, but for me, you need to go over to the "Game" tab and tick "Low Resolution Aspect Ratios".