Blurry-ish text but not exactly that.

Hello,

I’m facing something weird - I display numbers, using TextMeshProUGUI, which are children of really scale-down GOs but you can pinch to zoom the whole scene. Numbers on really scaled-down GOs look blurry but not really, meaning that if you pay attention the number seems to be sharp but it’s like TextMeshPro “add” a colored rectangle behind (I guess) the number using the same color but with a slight alpha.

I attached a screenshot to illustrate what I try to describe and another one to show the font configuration.

Any idea how I can prevent that or at least increase the quality ?

Thanks


Ok. The “colored background” was entirely my fault because I activated the “bold” option. Now the numbers looks better but not perfect. I’ll try to tweak point sampling and padding and see what happens.

This visual artifact is the result of the Ratio of Sampling Point Size to Padding being too small. Typically, you want a ratio of about 10% between the Sampling Point Size and Padding. For instance, if the Sampling Point Size is 90 then you would want a padding value of 9.

So the solution is to regenerate your font asset to increase your padding to about 10%. This Ratio by the way determines the effective range of material properties such as Outline, Underlay, etc. As such with a larger ratio, the outline or underlay offset (shadow) at a value closer to 1 will have more range.

Hello,

Thanks for the answer. I tried that but was not enough to get acceptable visual quality - so I thought to simple force mesh update when scaling happens and it works out.

Thanks again.

What is your new sampling point size and padding?

Your current font had a sampling point size of 229 which is very large thus resulting in more texture space being needed whereas the padding was just 5. Most likely you can use a sampling point size of about 90 with padding of 9.

In theory you should not have to use ForceMeshUpdate() when changing the scale but perhaps the results of the pinch-zoom action are not detected so TMP doesn’t update the SDF Scale which is why ForceMeshUpdate() would work.

What version of TMP are you using?

Hello,

I’m using Unity 2019.3.9f1and TextMeshPro 2.0.

I did try with a sampling point of 100 and a padding of 10 but it did not fixed the issue. I had to call ForceMeshUpdate(). I think it’s because I scale up/down a root GO and not directly the text GO owner. I might be wrong and if you have an another solution that calling ForceMeshUpdated during scale operations let me know :slight_smile:

Thanks.

The latest version of TMP for Unity 2019.3 is 2.1.0-preview.13. Preview 14 should be available later tonight. Please test with Preview 13 to see if you get the same behavior as the scale change on the parent should be handled automatically.

1 Like