What's a good TextMesh replacement?

Hello everyone.

Are you aware of any (free) solutions that offer about the same amount of functionality as the inbuilt TextMesh, but do expose the actual mesh so that it can be combined?

To be honest, I don’t get why there’s no TextMesh.mesh to begin with, since that’d save a lot of trouble. Or is there a way to access the mesh I’m not aware of.

If not, I’m left with the option to buy one of the font systems on the asset store or -more likely- create my own.

Does anyone know where I could start?

Yeah, I just tried TextMesh for a model of a wooden signpost. I use the default fontmaterial it gave me, and the text is visible. Too visible. It’s visible from behind the signpost or through the signpost, no matter what my Z offset is. It gets the (i) notice from the shader that the mesh has no normals.

It seems like a half-implemented thing, because so many games are perfectly content with a hand-managed text atlas solution. If you’re trying to do Japanese text supplied by a database or by the user, it needs the management that TextMesh almost does for you.

you could try 2D toolkit’s TextMesh

I can see your trouble. It really would not take that much to make TextMesh a really great tool.

TextMesh(es) are drawn over everything. Everything, No problem for me but for some reason when I animate it, it doesn’t render on Android.

Well, I guess I’ll try to see how far I can get on my own. It’s for studies, so spending money is out of the question / not really the point of the exercise.

http://lukasz.dk/2011/05/01/pixel-perfect-bitmap-font-in-unity/

This looks like a good reference. If I can get the texture coordinates from it, I’m left with just the procedural mesh generation.

No dynamic font support, of course, but I’m not typesetting, I’m building mobile apps

That was suprisingly straightforward.

The BitmapFont resource I linked is fantastic. I just needed to map the texture coordinates to the generated mesh’s uv and that’s it.
Of course there’s no line-breaks or any other stuff yet.

Not if you change the shader to one that doesn’t draw over everything.

–Eric

That’s a lovely tantalizing clue, but I can’t see how to change this.

The textmesh has a material “Font Material” which is assigned the “GUI/Text Shader” and a hidden bitmap for the text atlas. The GUI shader does seem to make sense that it would ignore Z Buffer and draw through all. Selecting other materials would need to have the text atlas assigned, but this atlas does not show up anywhere. Writing my own shader would not change that.

So let us please know the step we’re missing, to get plain old out-of-the-box TextMesh to use a shader that isn’t Z Buffer ignorant?

Thanks, meh11. Seems overly complicated to manage all these settings manually, but I appreciate that someone’s already documented the method.

Over the past few months, I have been working on a tool designed to be a replacement for TextMesh which includes lots added functionality.

The tool is not ready yet but I am within a week or two from posting in the Work in Progress section to begin showing it off and get additional feedback. I will have a video showing the functionality and features of this new tool.

In the meantime, here is an image from within the editor.

P.S. You won’t need Photoshop anymore. You can zoom in all you want and doesn’t that first E or the word Pro seem bigger than other letters…

That looks sweet. I assume the letters are actual geometry?

Thanks :slight_smile:

They are still 2 triangles per character. Although you can use normal bitmap font atlases, the tool takes full advantage of distance field font atlases which you can generate within the tool set in seconds from any TTF font. No more need for external tools.

Are you talking about this?

I have never heard of it. Looks interesting

Yes. The white paper published by valve explains the idea well.

Great. I will definetely have to look into that as well.

Your tool will probably turn into a paid asset, right?

It will.

Looking forward to hearing from you when your WIP thread is up.

Cool thanks.

As long as I resit the temptation to add anymore features, that WIP and video should be up within a week or so :slight_smile:

How do you integrate font files (.ttf and others) directly? The Unity Font class is hardly any useful, but I’ve seen that feature in other tools as well, for example Easy Font (by “seen”, I mean “read their OP”)