Search Unity

TextMesh Pro - Advanced Text Rendering for Unity - Beta now available in Asset Store

Discussion in 'Works In Progress - Archive' started by Stephan-B, Feb 11, 2014.

Thread Status:
Not open for further replies.
  1. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    LaText or MathML supported? We want something to add mathematical equation in our project. If supported then you got a customer :)
     
  2. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    That is one of the things on my list of features to look into. No promises as to when I'll be able to add such functionality but it is definitely something I'll be looking into :)
     
    The-Oddler likes this.
  3. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    I will buy it once you add that feature. and I promise for that. :)
     
  4. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Stephan,

    Problems with Right Alignment:

    I'm really enjoying TextMeshPro and have been using it for the last few months in my game.

    I noticed in your recent videos on this forum that you incorporated the alignment options from Unity 4.6 into the TextMeshPro Font Settings. I'm glad you did this because I've been unable to figure out how to do a simple right alignment for a Timer in the upper right hand corner of the screen. As the Timer fills with digits I want it to fill from right to left so it always stays in view but the Line Justification and Anchor Position options don't seem to provide a simple right alignment. I tested this in Unity 4.6 by creating a Canvas, Text object, setup my Timer script and clicked the Alignment, Right Align button and the Timer text aligns to the right side of the text box and fills from right to left as expected.

    My questions are:
    - When do you expect your new version 1.45 to be available in the Asset Store to take advantage of the new Unity 4.6 features?
    - Is there a way to right align in TextMeshPro in the current version?

    Thanks
    Allan
     
  5. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    @chaneya
    I knew I should have cross posted this :)

    P.S. This applies to 0.1.45 as well.

    TextMesh Pro - Early Beta Access & Unity 4.6 (uGUI)
    Over the past few days, I have had several TextMesh Pro users inquiring about support for Unity 4.6 / uGUI and when such version would be available. Although I still have a fair amount of work to do on version 0.1.46 of TextMesh Pro, I have made available the version of TextMesh Pro I was using at Unite to Registered Users of TextMesh Pro.
    If you have already purchased TextMesh Pro and wish to take part / gain access to this alpha release of TextMesh Pro and help me in the testing process (ie. act as guinea pigs ;)) then make sure you register to the TextMesh Pro User Forum. Once your registration has been approved, send me a PM on the TextMesh Pro User Forum requesting access to this alpha release of TextMesh Pro.
     
  6. mellowanon

    mellowanon

    Joined:
    Nov 11, 2013
    Posts:
    2
    I'm thinking of buying, but I have two questions, and I'm fairly new to Unity:

    1. In the script API, it shows bounds as being read only. I'm guessing this is the boundary box where the text shows up. Is it possible for us to change boundaries in another way with scripts only?

    2. Is it possible to change the position of the text box with scripts?
     
  7. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    In version 0.1.44 which is currently available on the asset store, the text doesn't live inside a container so the bounds are simply the bounds of the mesh.

    In version 0.1.45 of TextMesh Pro a new Text Container is introduce which defines the area where the text lives. As a result, you then have control over this container and ultimately can have the text fit this container by using the new text auto-sizing feature also part of this new version.

    The Text Container can be controlled via scripting. Here is a video going over this Text Container and some scripting examples.



    As per my post above, you can get access to these version after you purchase TextMesh Pro and Register to the TextMesh Pro User Forum. Beta 0.1.45 is available as well as Alpha 0.1.46 with support for Unity 4.6.

    Absolutely. The text container still uses a transform like all other objects in Unity. Moving this transform moves the text object around. In addition, the relevant properties of the TextMesh Pro object as well as material properties can all be controlled via scripting.

    Take a look at this new video which is sort of a recreation of the demo I was giving at Unite in Seattle about two weeks ago. This should give you a better overall understanding of TextMesh Pro.



    Should you have any further questions, please feel free to ask :)
     
  8. hypnoticshark

    hypnoticshark

    Joined:
    Sep 20, 2012
    Posts:
    20
    We just purchased this asset and its great! We would love to have the ability to use it for other things as well such as general shapes (rounded rectangles, triangles etc.). We would like to replace a lot of the hud with this method as it gives a much sharper result than using a bitmap.
     
  9. sschaem

    sschaem

    Joined:
    Feb 14, 2014
    Posts:
    148
    For monchrome vector art, the best way is to make your own 'windings' type font.

    In my UI prototype I use a bunch of the unicode defined characters, this makes it very convenient to get dynamic resolution support. Check " Symbols and Punctuation" at uniocode.org , its a tresure trove of vector art.
    http://www.unicode.org/charts/

    PS: my avatar is a TTF character, screen grabbed from Unity :) (rendered in by TMPro)

    Here is another (resolution independent) one from the same TTF

    sign2.jpg
     
    Last edited: Sep 11, 2014
  10. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    If you are looking for a way to add those shapes 'windings', here is a link to a post from another TextMesh Pro user which references one of those tools.
     
    hypnoticshark likes this.
  11. hypnoticshark

    hypnoticshark

    Joined:
    Sep 20, 2012
    Posts:
    20
    That is awesome! Thanks!
     
  12. sschaem

    sschaem

    Joined:
    Feb 14, 2014
    Posts:
    148
    The link is pretty cool!

    Built a TTF in seconds with a few symbols and rendered them in TMPro
    glypha.png
    Here, the same exact glyph zoomed up with a bevel. (and some TMPro text in the bubble) - 2 draw call.
    glyph.png

    and a closeup in scene view with some fatter bevel (click to view full res) glyphc.jpg
     
  13. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    TextMesh Pro Hits #8 in Editor Extensions
    Just wanted to share the good news and take this moment to thank you for your support and for using TextMesh Pro :)
     
  14. FabXRCE

    FabXRCE

    Joined:
    Jun 5, 2014
    Posts:
    2
    I just bought your extension and loving it so far :) The level of features compare to vanilla TextMesh is just... whooaaa!
    Thanks for the hard work! I may come back soon with a few questions tho.
     
  15. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Thank you!

    Answering questions is what I am here for :)

    In the event I am sleeping (which happens from time to time) please be sure to register to the TextMesh Pro User Forum where you can also post your questions but more importantly find several videos that should help you get the most out of TextMesh Pro as well as potential solutions to any issues you may run into.
     
  16. pbhogan

    pbhogan

    Joined:
    Aug 17, 2012
    Posts:
    384
    Hi Stephan—this asset looks really, really great. I saw you have the ability to do teletype style animations. Have you thought about adding the ability to do custom per-character size / position offset / color / alpha? This allows custom animations like scaling characters to pop in, or bounce or whatever. It's pretty useful for things like dialog bubbles to add a little spice to certain words or phrases or the entry/exit animations.
     
  17. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Thanks :)

    I haven't had a chance to add those yet but the TextMeshPro.textInfo Class which also includes sub Structures like meshInfo, lineInfo[] and characteInfo[] information about the entire text object which can then be used to do the things you describe or layout text along some curve for instance.

     
  18. hippoforalkus

    hippoforalkus

    Joined:
    Mar 14, 2013
    Posts:
    1
    Hi Stephen,

    I thought it might be worth noting that your library can cause long load times on first run for certain android devices. In particular, I noticed that on a galaxy tab 3 it caused my game to take ~4 mins to load, however once I deleted the non-mobile shaders from the Resources directory, that went down to ~20 secs
     
  19. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    What version of Unity are you using?

    In Unity 4.4 and older, shaders were compiled and included code for all platforms regardless of the target platform. When using ShaderKeywords which creates multiple variants of the shader to enable or disable some features, this resulted in larger shaders but more efficient shaders.

    In Unity 4.5, this was changed to only build shaders on demand which results in smaller shaders with the same performance benefits when using ShaderKeywords.

    The TextMesh Pro non-mobile shaders do use ShaderKeywords which in Unity 4.4 and older results in larger shaders which take longer to compile and load. There are ways to address this by specifying which platforms to exclude via #pragma in the shader code but before look into this, let me know what version of Unity you are using.
     
  20. hypnoticshark

    hypnoticshark

    Joined:
    Sep 20, 2012
    Posts:
    20
    Hi Stephan,

    We have been trying to get this to work with ngui and haven't had any luck so far and kind of lost. how do you get the text to work with ngui and ngui's depth sorting? we have a lot of overlapping stuff in ngui here and there, so the depth sorting is important for us. Any help would be appreciated.

    Thanks
     
  21. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Have you looked in the Extra Settings panel, you will see the options to set sorting layers and groups. Those should help with that.
     
  22. hypnoticshark

    hypnoticshark

    Joined:
    Sep 20, 2012
    Posts:
    20
    I shall continue to play around with that, still having issues with it here and there though. Just a bit of feedback / very nice to have thing with this tool. We love the quality of the distance field this generates. The more we use the more we wish there was an option to just input a texture and generate a distance field from that. We have so many uses for it and we are using an external third party tool do our distance field and the quality is just not there. We wouldn't mind paying for such an add on. It would also enable us to integrate everything much quicker and replace a lot of ngui elements a lot faster.
     
  23. hypnoticshark

    hypnoticshark

    Joined:
    Sep 20, 2012
    Posts:
    20
    as we would like to replace the hud, the texture thing would allow us to use 9 slicing with ngui. Currently this is not possible if we include the shape in a font atlas.
     
  24. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    This feature / other add-on has been requested several times and I agree that it would be pretty cool. I just need to find enough time to get that going. I still have several features I want to add to TextMesh Pro which is keeping me busy.
     
  25. Sulfield

    Sulfield

    Joined:
    Sep 17, 2014
    Posts:
    2
    Hey, today i bought the textmesh pro plugin and so far I'm loving it, great work, exactly the stuff I need for my project!

    However, for some kind of reason TMpro plugins won't be batched anymore as soon as the text length exceeds 45 characters. I'm wondering where this arbitrary limit is coming from. Is this because of the way unity deals with batching internally or is this some kind of constraint caused by the TextMesh Pro plugin?

    This shouldn't be a problem as I do only need to batching on a per-word basis, so 45 characters should be enough, but I do not know if this limit applies to mobile devices as well, or if it is lower. I need to plan this stuff into my project, as I would like to keep my draw call count as low as possible. In the worst case I would have to split up terms automatically if they exceed a certain length. Are there any other pitfalls?
     
  26. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Glad you are loving it :)

    Dynamic batching has limitations on how many vertex attributes the object can have which I believe you might be running into. Having said that, Let me take a look to make sure nothing is wrong here.

    Based on Unity's documentation
    "Batching dynamic objects has certain overhead per vertex, so batching is applied only to meshes containing less than 900 vertex attributes in total."

    I think 1 draw call per object won't really impact much on mobile with the exception of old devices as devices have gotten so much faster.
     
    Last edited: Sep 17, 2014
  27. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Vertex Color Gradient
    This video provides a short overview of TextMesh Pro as well as showing the latest implementation and support for Vertex Color Gradients in TextMesh Pro.



    Note that you will be able to animate the (4) vertex colors independently of each other using Unity's Animation component.
     
  28. TheOpenEarth

    TheOpenEarth

    Joined:
    Mar 8, 2014
    Posts:
    2
    A way to assign different textures to instances of the same font would be very useful
     
  29. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    By different Texture do you mean on the Face or Outline of the text? If that is the case you can already do that by assigning that other texture to the "_FaceTex" or "_OutlineTex". This would result in creating an instance of those material but still be using the same font asset.
     
  30. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Here is another great example of how great text can look in Unity using TextMesh Pro.

     
  31. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Animated Overlay FX
    Here is a short video showing some more examples of this new features. The font is Impact SDF with some bevel, soft shadow, gradient vertex color and some bump mapping and of course an Overlay map.

     
  32. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Took a short break from writing code to mess around with the TextMesh Pro logo example scene that comes with the product.

    Here is an image of the text using the surface shader but just with default settings on the material.


    Now the same text object but with a few tweaks on the material properties.


    It is simply amazing how much of a difference moving a few sliders in the material editor can make to an otherwise plain text object :)
     
  33. srenshaw

    srenshaw

    Joined:
    Feb 12, 2014
    Posts:
    14
    Hi,

    First of all - what an awesome asset!

    Before I buy I need to check if it works with Playmaker. I'm currently using Playmaker to set the text property of a 3D text object to a string variable using the 'Set Property' action. Would I be able to use Playmaker to populate the text input box in TextMesh Pro in the same way, and if so, would I also be able to set other TMP parameters using Playmaker?

    Thanks,

    Steve.
     
  34. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Oh and let's slap an Animated Overlay FX on top of it ;)



    P.S. I wish animated gif's didn't dither the colors.
     
    Last edited: Sep 22, 2014
  35. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Thanks Steve :)

    If Playmaker can set properties of objects like TextMesh.text for instance then the same should work with TextMeshPro.text.
     
  36. srenshaw

    srenshaw

    Joined:
    Feb 12, 2014
    Posts:
    14
    For anyone interested in using TextMesh Pro with Playmaker, I can confirm that the text can be set using the 'Set Property' action in Playmaker - perfect! :) In fact, it looks like many of the parameters can be set by Playmaker in the same way, although I haven't had chance to test them yet.
     
  37. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Text Overflow Controls
    Here is a preview of the new Text Overflow controls in TextMeshPro. These controls now include Overflow, Truncate, Ellipsis and Masking.

     
  38. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    TextMeshPro Title Creation Process
    In this video, I demonstrate how I created this nice looking title and caption text using TextMesh Pro.

     
  39. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Animated Environmental Map
    Here's another example of this new feature that will be in the next release of TextMesh Pro.



    Now see it animated :)

     
  40. FabXRCE

    FabXRCE

    Joined:
    Jun 5, 2014
    Posts:
    2
    Nice teasing stuff you got there (Overflow Controls oh yeah!). Do you have an ETA for the 0.1.45 then? :)
     
  41. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Version 0.1.45 is pretty solid and has been available to registered users who wish to further test it on the TextMeshPro User Forum for maybe two weeks. However, while working on the Unity 4.6 integration, I have also been making additions to the normal TextMeshPro component so I have to figure out how I want to deploy all these new shinny features.

    If it wasn't for backwards compatibility where version 0.1.46 makes references to Unity class that don't exist in Unity 4.3 - 4.5, I would just release 0.1.46 with both updated components and skip 0.1.45.

    P.S. I could always add version conditionals but that feels messy.
     
  42. IOZO

    IOZO

    Joined:
    Jun 26, 2010
    Posts:
    55
    Hello,

    Congratulation for TextMesh Pro, I like it very much but for my project I need the unity 4.6 UI integration.
    I registered to the TMP User Forum, but I'm still waiting for your validation to get access to 0.1.45.

    Could you please verify if you got my request and give me access to the new features.

    thx.
     
  43. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I just approved a few more user registrations so I presume your registration was part of the group. Since I am not certain which of those users you were, just login to the forum and send me a PM requesting access to the Alpha / Beta for Unity 4.6.
     
  44. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    That is really amazing. So when do you expect the next update to the asset store?
     
  45. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I am hoping to have a new Beta ready for testing by the end of the weekend or sometime Monday.

    Here is another example of the Animated Env Map :)

     
  46. ade76

    ade76

    Joined:
    Apr 9, 2014
    Posts:
    19
    Hi

    I was just wondering if it is possible to use text mesh pro with itween....in partciclaur to fade in and out?

    I just bought text mesh pro and love it but have noticed that it fading via itweeen doesn't seem to work. Is there a w ay round this? As I'm trying to use text mesh pro as little score pop ups when u kill enemies and ideally want them to fade in and out
     
  47. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    You have full control over the color and alpha. Take a look at the example scene "Benchmark Floating Text" which is included with TextMeshPro. Specifically, take a look at the TextMeshProFloatingText script which controls text objects of different colors and fading over time.
     
  48. ade76

    ade76

    Joined:
    Apr 9, 2014
    Posts:
    19
    Hi

    Many thanks for response. Have looked the the example and see what you mean. Is possible to fade element using itween? as right now i was going to retrofit some "traditional" text mesh elements with text mesh pro and they are animated using itween:)
     
  49. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Most of the TextMeshPro properties match their TextMesh counterparts so whatever tools were used to change those TextMesh properties should work the same way with TextMeshPro.

    One thing to keep in mind (not 100% related to this but kind of) is scale. If you are going to modify the scale of TextMeshPro objects, you have to make sure to keep uniform scale on them.
     
  50. ade76

    ade76

    Joined:
    Apr 9, 2014
    Posts:
    19
    Hi

    yes i have itween working with text mesh pro if the material is set to bitmap. But doesn't work if distance field. I'm a bit of a noob
     
Thread Status:
Not open for further replies.