Blur when Text is in World Position away from Camera

When the text is in the world position away from the camera, it causes the text to blur. I just want it to apply no effect / blur for camera distance and render it exactly like if it was on screen space, but in world. Currently, if you go to far away from the camera, it will blur.

Is there any way to fix this?

What text component are you using? TMP or UI.Text?

We are using TMPro latest preview version.

By blur, do you mean visual artifacts around the text? Like a feint square around it?

If so, the is the result of the Ratio of Sampling Point Size to Padding being too small. The solution is to regenerate the font asset to have a ratio of about 10%.

2. I see visual artifacts around the edges of characters. How do I get rid of them?
These artifacts can be caused by material properties like Dilation, Outline, Underlay, etc. As these property values get near their maximum range, parts of adjacent characters in the font atlas texture can bleed into each other. The font Asset Creator inserts padding between characters to prevent this from happening. To make these visual artifacts go away, re-create the Font Asset with a larger padding value. Note that the padding value affects the range of those properties but also affects the sampling quality of the Font Asset. See this topic for more details. See the following updated video about Font Asset Creation which provides information about padding and how it affects material properties and their range.”

For most fonts and use cases, a sampling point size of 90 is good with a padding value of 9. For some East Asian fonts, you can get away with a smaller sampling point size like 48 or even smaller and still have the text look good. Rarely does the sampling point size need to exceed 90 point size.

The Ratio of Sampling Point Size to Padding determines the effective range of material properties such as Dilation, Outline, Shadow, etc.

11. How can I increase the range of text effects like dilation, outline, and underlay?
The range of these effects is determined by the padding used when creating the font atlas. The larger the padding, the larger the effect range. Of course more padding means less room for character data. So there is a trade-off between character quality and effect range. Use the smallest padding that works for you. Note that the padding is specified in pixels, so if you double the texture size you also have to double the padding to keep the same range. See here and here for more details. See the following updated video about Font Asset Creation which provides information about padding and how it affects material properties and their range.

If i use the exact same setting for padding, and change the object from world space to screen space (while keeping it visually EXACT the same, only changing the space but still visualizing the same thing) it does not blurs (yes increasing the padding solves it but the camera is too far away to be an solution). i want to know if theres an way to completely disable all those effects like it is on screen space.

Are you using Post Processing FX?

Can you post an image of this blurring you are describing?

BTW: The blurring / visual artifact visible when the text is small is an issue related to the Sampling Point Size to Padding ratio being too small. If your font asset has a ratio of Sampling point size to padding that is less than 10% or 5%, you should regenerate it to use a larger ratio as not doing this will lead to rendering issues.

yes it is surely related to sampling point size and padding, its the squares that appears on the characters, the thing is that simply changing to screen position (while it looks exactly the same) solves completely the problem, so i believe some effect is in place when it is world position that causes it, i just want to completely disable it. Something to be noted is, to reduce the issue, setting the Additional Shader Channels of the canvas it is being rendered to TexCoord1 (only that option), makes it almost good, but stills not the same as putting it into screen space. Theres literally no way to scale the font up to the point size would be needed as the camera is really far away from it, i just want it to behave like it is on screen space without applying any kind of filter or whatsoever. (And no, i dont use any post FX)

Hello @Stephan_B

I’m not sure if you read the last reply. This issue still exists in the latest version of Unity and TMPro. It is an issue I think is important in game developing.

This is an image of how it looks in the screen space / overlay:

This is the same image now in world space:

To reproduce, take any image, put some text in it. Then change it from World → Overlay. The Overlay will not blur the text. The World will. The reason why game developers need certain images in the world space as opposed to the overlay, is due to many reasons on how the game is designed.

Please take a look at this and offer any solution. We would be very grateful.

In fact, I think this is the same issue here: Texts are not sharp (ingame with screen space camera)

Can you post an image of your font asset inspector showing the Face Info and Generation Settings?

Sampling point size to padding ratio is fine.

Check if setting the Perspective Filtering to Zero in the Debug section of the material inspector makes any difference.

If it do not, can you provide me with the steps to reproduce this behavior? Perhaps submit a bug report with the project or whatever I need to reproduce it.

It seems that changing from Distance Field to Distance Field SSD solves the issue on the material shader. This solution is satisfactory for now.

The fact that changing the shader to the SSD version resolved the problem point to an SDF Scaling issue where between these two different camera modes, the SDF Scale being passed to the shader is incorrect.

I will still try to reproduce the issue as this should be addressed.