Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

SDF Quality

A topic by vostok4 created Nov 28, 2018 Views: 57 Replies: 1
Viewing posts 1 to 2

I'm having trouble getting any good SDF quality out of Super Text Mesh, and am looking for advice on how to fix it.

I've followed the guide and generated an SDF texture with the free asset on the store, using a font size of 128 in the Font asset settings, and a 2, 2, 0 for the inside/outside/postprocess distance settings in the actual SDF generation tool.

What comes out always looks really bad on screen, like, worse than a normal font.

Here is a closeup of SDF in TextMeshPro:

and here is STM:

Those waves and the filtering really creates very rough output (TMPro on top, STM on bottom):

And this is TMPro SDF vs just the regular font mode in STM:

Unfortunately the final quality of STM isn't as good as TMP in general (I believe this is due to an unlit shader overall,  and the underlay in TMPro seems better filtered, although its hard to judge since I'm doing something clearly wrong in STM.

Are there any ideas how to fix things?


Huh, I never see SDFs turn out that wiggly... then again, the SDF font I mainly test with (itim) doesn't have many straight edges, so the default settings I suggest might not be optimal for all fonts. Is it possible to use an SDF font generated by TMP with STM? I've never actually bothered to see if the systems are compatible, but now that TMP is included with Unity, that's an option to consider. 

The SDF generator I suggest, from what I gather, should be the same code base as what TMP uses anyway? You might have to try upping the font quality even further, or making the inside/outside be larger or smaller (I can't think of which one would produce a sharper image)

I *do* see a small amount of that same "wobbliness" on the TMP text, so it's gotta just be the SDF generation, that's what I'm thinking anyway?

That's my best guess for now! Please give these ideas a shot!