Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Text Mesh Pro - The Ultimate Text Solution for Unity - Powerful & Flexible - Advanced Text Rendering

Discussion in 'Assets and Asset Store' started by Stephan-B, May 29, 2014.

Thread Status:
Not open for further replies.
  1. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    ** Please post TextMesh Pro related questions in the Unity UI & TextMesh Pro section of the user forum. Be sure to add the TextMeshPro prefix to these posts.

    Hello Everyone!

    After months of development, I am pleased to announce that TextMesh Pro! is now available in the Asset Store. :)

    Developing TextMesh Pro has been a rewarding and challenging experience thus far. I hope that TextMesh Pro will live up to expectations and I will certainly continue to strive to make sure it does. I look forward to your feedback and answering any questions you may have. So without further ado, let's take a look at what TextMesh Pro is and what it can do for you. :)


    - Stephan B.

    IMPORTANT NOTE: The latest beta releases of TextMesh Pro with support for Unity 4.6 and the new UI as well as beta releases for Unity 5.0 are available to all registered users of the product on the TextMesh Pro User Forum. Once your registration to the forum has been approved, you will find the latest beta releases in the "TMPro - Alpha & Beta Releases" section of the forum.


    INTRODUCING

    Three TextMesh Pro objects as seen in the Unity Editor.


    What is TextMesh Pro?
    TextMesh Pro! is the ultimate replacement for Unity's built-in Text Mesh Component (a.k.a. 3D Text). It was designed to provide users with a more powerful and flexible solution for their text creation layout needs while remaining easy to use and with improved performance.


    Advanced Real-Time Text Rendering
    Text is an important part of any game or project and as such shouldn't your text always look amazing? TextMesh Pro uses an advanced text rendering technique known as Signed Distance Field "SDF" text rendering. The combination of SDF text rendering and a set of advanced custom shaders delivers substantial visual quality improvements over normal bitmap fonts while giving users amazing flexibility when it comes to font styling texturing. Of course, TextMesh Pro also supports and works with bitmap fonts.



    "S" Letters shows some of the dynamic changes that can be applied to a single SDF font asset. With the exception of the first bitmap "S", all visible text including the captions is an example of SDF based text rendering.


    Amazing Flexibility & Quality
    Besides the amazing visual quality improvements made possible by our advanced text rendering, another huge benefits is that we can virtually get an unlimited number of visual styles treatments from a single SDF Font Atlas and they look great at any point size. In addition, SDF font atlases are typically smaller in size than their bitmap based counterparts.



    Close up - These two letters are using the same SDF Font Atlas. They are simply using two different materials.




    Real-Time dynamic text font styling texturing.


    Custom Editors & Improved Text Formatting
    Starting with a larger text input box to a more comprehensive list of Rich Text <tags> which include underline, superscript, subscript or size to dynamic character spacing or word wrapping as well as support for kerning, TextMesh Pro! has you covered.



    TMPro Inspector Material Editor Panel



    Example showing superscript, subscript and center justification.



    Partial list of some of the Rich Text Tags available in TextMeshPro.

    Built-in Font Asset Creator
    Want to use some new TrueType or OpenType font but need to create a font atlas for it? Not a problem with TextMesh Pro!. Just import your font in Unity. Open the built-in Font Asset Creator and within 30 seconds your new font asset is ready.


    Built-in Font Asset Creator. No need for any external tools. Create normal bitmap font assets or SDF font assets with the built-in Font Asset Creator.


    Intuitive User Interface
    TextMesh Pro! features several custom inspectors editor panels. They were created to give users access to what they need while keeping things simple.


    Shown TextMesh Pro!'s custom editor material inspector.


    Scripting Interface
    Need to create or modify text objects via scripts? All of Unity's components offer a scripting interface and so does TextMesh Pro! All of the relevant properties of TextMesh Pro! can be accessed via script.


    Example of TextMesh Pro! object creation via script.



    TextMesh Pro! Main Features
    • Easy to use with simple UI featuring custom inspectors and editor panels.
    • Supports both Bitmap & Signed Distance Field font atlases.
    • Built-in Bitmap & SDF font atlas creation tool.
    • Most accurate & highest quality SDF Text Rendering tool.
    • TrueType OpenType font support.
    • 2D Text objects can be created in the Editor or dynamically via scripts.
    • Greatly improved performance over Unity's 3D Text and TextMesh
    • Optimized to avoid Runtime Memory Allocations and keeping the Garbage Collector away.
    Formatting Styling Options
    • Dynamic font sizing. SDF font atlas renders sharp and great looking text at any sizes.
    • Rich Text support. Per character tags include color, bold, italic, underline, superscript, subscript, size, tab, space and position.
    • Text Anchoring - The usual 9 positions.
    • Text Alignment - Left, Center, Right and Justified.
    • Control over Character, Line and Paragraph spacing.
    • Automatic word-wrapping with control over word or space tracking.
    • Kerning support along with Kerning Pair editor.
    • Multiple Texturing Mapping options.
    Material Presets & Built-in Custom Shaders
    • Custom Context menu to enable easy creation of material presets and managing of materials.
    • Optimized shaders designed for OpenGL ES 2.0 compatible devices. (iphone 3gs and later)
    • Basic Bitmap text shader
      - Face vertex color
      - Face Texturing with multiple mapping options
    • Basic SDF text shader
      - Face vertex color
    • Advanced SDF text shader
      - Face vertex color
      - Face texturing with multiple mapping options
      - Border texturing
      - Border thickness softness control
      - Beveling + Glow control
    • Advanced Surface SDF text shader
      - Real-time lighting shadow casting
      - Plus same features as Advanced SDF text shader

    Contact Information Useful Links

    Once again, should you have any questions, please feel free to ask. It will be my pleasure to reply to you.
     
    Last edited by a moderator: Oct 3, 2018
    Sycoforge likes this.
  2. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    TextMesh Pro Surface Shader Web Demo

    This scene shows a few TextMesh Pro text objects. The Logo is using the Surface Shader and as such it is affected by scene lighting. The caption text below this logo is using the normal distance field shader.

    $TMPro - Surface Shader Demo Image 1.JPG

    The text on the right wall (on the left since I am being the logo object) is being generated via code and using the TextMeshPro.maxVisibleCharacter property which allows a user to control how many characters will be displayed. Please note that word wrapping is used.

    $TMPro - Surface Shader Demo Image 2.JPG

    The level text in the background is also being generated via code. It is also using a Surface Shader. The _GlowPower property is being animated using an animation curve.

    $TMPro - Surface Shader Demo Image 3.JPG

    The frame counter in the top right as well as camera controls in the bottom right are is also TextMesh Pro objects using Overlay mode.




    Here is a link to the web demo of this scene.
     
    Last edited: May 30, 2014
    Sycoforge likes this.
  3. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    TextMesh Pro - Quick Start Guide
    In this video, I go over some of the basics of TextMesh Pro which includes:
    • Asset Package Content
    • How to create a new TextMesh Pro object.
    • TextMesh Pro UI Panel.
    • Font Asset creation using the built-in Font Asset Creator.
    • How to assign this newly created font asset to a new TextMesh Pro object.
    • Basics of the Signed Distance Field Shader.

     
    Last edited: Jun 1, 2014
  4. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Awesome - congratulations to the release!!!

    I'm buying this right now. And I'll be adding this to the list of packages supported by ScoreFlash (btw, currently also working on NoesisGUI support and it's coming along nicely) :)
     
  5. Stephan-B

    Stephan-B

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

    I look forward to seeing our products working together. If you need anything, let me know :)
     
  6. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Just modified the (mostly) Surface Shader Web Demo to feature some scrolling text with (soft) vertical mask ...

     
  7. zipper

    zipper

    Joined:
    Jun 12, 2011
    Posts:
    89
    I bought this the day it came out.

    It is so flippin awesome!!!!

    This is one of a very few select plugins i consider must have.
     
  8. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Thank you for the kind words.

    In terms of "awesome!!!" ... We are just getting started. Given time and a little help from Unity in terms of getting additional features like additional Vertex Streams, Render Textures available in Unity Free Pro and highly optimized way to update textures at run-time for instance, this awesome could turn into Amazing!!!! Hopefully TextMesh Pro will do well enough to make all of this possible :)
     
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Don't forget the 5 star review, guys ;)
     
  10. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Here is a glimpse at a the new TextMesh Pro - UGUI Component along with the new Margins feature that will become available with the release of Unity 4.6.

    In this image, you can see the margins represented by the yellow lines. These margins define where the text live within the RectTransform.


    Text is using the Justified mode.


    Margins provide better control over your text when used in conjunction with clipping or masking. Example showing soft masking as we change the VertexOffsetY material property in the Material Editor.


    Text is Left Justified. Soft Masking + VertexOffsetY to move text outside RectTransform bounds.



    Lastly, here is a video showing and describing these new features.

     
    Last edited: May 31, 2014
  11. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Unlimited Style Variances
    In TextMesh Pro, the appearance of your text is control dynamically by changing material properties. There is no need to use Photoshop or to alter in any shape or form the font asset (atlas) or to create additional font assets. From one single TextMesh Pro SDF Font Asset, an unlimited number of style visual permutations are virtually possible.

    Using the following TrueType Font a new font asset was created using TextMesh Pro's built-in Font Asset Creator. Here is an example of what this font looks like without changing any material properties.




    Next we add some Outline Thickness to get the following results. Again, we are using the same Font Asset.




    Next, we add a shadow using Underlay with some offset X Y value.




    We now add a texture on the face of the text.




    Let's add a texture to the Outline along with some beveling.




    Lastly, let's add some Glow inside the face of the text.




    In my next post, I'll show some examples of how we can actually animate these dynamic material properties.
     
    Last edited: Jun 1, 2014
  12. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Perhaps a little close up of the letter "Z" of Red Zone might be interesting to look at...


     
  13. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Kerning
    While working on this Red Zone example, I ended up experimenting with another font called Snap it! As you can see, I changed the bevel and glow colors however, as I looked at the text, it looked like it could use some kerning.


    The image below shows the text with Kerning disabled.




    Here is the same text after adding a few Kerning Pairs. It is a subtle change but it does make a difference.




    Here is a video showing this whole process

     
  14. sschaem

    sschaem

    Joined:
    Feb 14, 2014
    Posts:
    148
    As the Z closeup above shows, the rendering is resolution independent.
    You can zoom in, and the text will retain all of its detail.
    Great when you are targeting multiple devices, as you can be sure it will always render your text sharp and clear.

    This also apply to plain text as the web demo below highlight.

    This scene is made of a single text Mesh Pro object with the camera set to cycle its position in 3d space..
    No CPU usage or allocation of any kind is going on, the font scaling is solely performed on the GPU.

    In this case we use the mobile optimized shader (shader model 2.0, opengl es 2.0) and render the face and soft drop shadow in a simple pass.

    http://digitalnativestudios.com/textmeshpro/web-demos/Zoom_Demo.html
    (This web demo is 164K)

    Here is a PNG of this scene in Unity.
    scene.png

    One detail : All position are sub pixel accurate, and with full kerning support you are guarantied correct typography at any size. No more weird spacing, get full consistency on all devices/dpi.
     
    Last edited: Jun 3, 2014
  15. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    Nice job man
     
  16. arklay_corp

    arklay_corp

    Joined:
    Apr 23, 2014
    Posts:
    242
    Impresive work! just one question: how does it behave with 2dtoolkit?
     
  17. Stephan-B

    Stephan-B

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

    I do not know since I have never used 2DToolKit. TextMesh Pro is a replacement for Unity's 3D Text / Text Mesh so as long as 2D Toolkit works with those we should be fine.
     
    Last edited: Jun 3, 2014
  18. arklay_corp

    arklay_corp

    Joined:
    Apr 23, 2014
    Posts:
    242
    Thanks for the answer Stephan, I will give it a try and let you know and the community know
     
  19. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Thank you and I look forward to your report.

    Please make sure you register to the TMPro User Forum which will make it easier for me to help you out should you run into any issues between TextMesh Pro and 2D ToolKit.
     
  20. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Creating TextMesh Pro objects via Script

    Often people are curious as to how you would create a TextMesh Pro object via scripting. Here is a video a did a little while ago going over this process.

     
  21. Doddler

    Doddler

    Joined:
    Jul 12, 2011
    Posts:
    269
    Is it possible with text mesh pro to specify an alpha value using the rich text format? For cases where one would want to fade in characters perhaps one at a time? Also, how realistic would it be to use TextMesh Pro with very large atlases, such as the case of asian characters?

    And, I suppose importantly, what shader version must be supported for this?
     
    Last edited: Jun 3, 2014
  22. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Currently, you can use color tags in hex format. "The color is <#ff8000>Orange</color>." was used for the text below.



    The current color tags don't support alpha but support for alpha could easily be added by either adding an additional hex pair to the color tag like <#00FF00ff> which is fully opaque green or by adding a new tag <alpha=128> to control just alpha or both.

    In terms of pulling off the fading effect. Let me begin by showing this recent addition which was requested by a user on the TMPro Forum last week which enables control / animating how many characters should be displayed. This functionality was also expanded to allow control over lines to be displayed.




    In terms of fading one character at a time, I don't think that you would want to insert tags for each as manipulating strings too friendly with GC. Similar to the effect above, I would want to control this via scripting but I would have to think about a nice clean way of implementing it.


    This is an area where Signed Distance Field is very nice as Font Assets are generally smaller in size (texture size) vs. bitmap counterpart.

    TextMesh Pro SDF Font Assets look great at any point size. The full ASCII set for many simple fonts can easily fit in a 64Kb (256 X 256) whereas the bulk of all other fonts in a 256Kb (512 X 512). Although we could technically fit over 10,000 characters into a larger atlas, very few games / products require all those characters. I added the ability for the user to supply a list of the characters that need to be included in the Font Asset which makes this more manageable. Please see the following post in our WIP Thread which provides more information on this topic.
     
  23. sschaem

    sschaem

    Joined:
    Feb 14, 2014
    Posts:
    148
    OpenGL ES 2.0

    And you can pack 5000+ characters in a 4MB (2kx2k) texture with the following fidelity (render to any DPI, any sizes)

    Arial ASCII set in 64K
    arial.png

    arial3.jpg
     
  24. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Animating Material Properties in TextMesh Pro
    Most material properties can be animated in TextMesh Pro via scripting. Below we have an example of animating the "_GlowPower" to create a pulsing effect.



    Again, it is important to note that these visual effects are all real-time and fully dynamic. The Font Asset used is still the same that was used to create the first Red Zone examples. The only difference is that we are using different textures and material settings.
     
  25. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Love your asset. The text looks fantastic and excited you're part of the 4.6 beta. It's obvious you've put GOBS of time into it, and yet, as I typically pay $10-$30 for assets, it's a problem of expectations. Similar to how mobile users expect our games to be Free. I'm not willing to take a $65 risk on what is probably a passing curiosity that isn't required by my project. I've made other purchases that performed poorly on mobile, or added many hours of frustrated distraction.

    In the end, I did not purchase your asset and wanted you to know why.

    Gigi.
     
  26. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I understand. We all have different perception of how much something might be worth to us and how much we are willing to invest / risk to ultimately find out.

    In terms of the value of TextMesh Pro, putting aside the fact that it will make all your text look significantly better. Provide you with enhanced text layout options, kerning, etc... For me just the amount of time I had to spend in external tools to create & texture my fonts would have been worth it.

    Our mobile shaders were highly optimized for those mobile platforms. Even our shaders that are not labeled as mobile still perform great. Even our non-mobile Surface shader which is really designed for desktop applications, still only requires OpenGL ES 2.0.

    In all performance tests, TextMesh Pro has outperformed or matched the performance of Text Mesh using Unity plain text shader.

    I certainly appreciate the time you took to share your thoughts.

    Regards,


    Stephan
     
  27. Doddler

    Doddler

    Joined:
    Jul 12, 2011
    Posts:
    269
    I bought the asset, and am really loving it. The text rendering is incredibly solid, looks visually great, and has lots of different options. There are some things I'd like to bring up though.

    - I would love a way to control the alpha value of individual text characters.

    - The ability to automatically shrink the text font size to fit if text exceeds the maximum length or line count would also be very nice... though I imagine this could be done manually.

    - Using the <pos> command with a negative value causes rather unpredictable results. I only bring it up because I tried it to see if I could use it to put a symbol on the left side of the margin and it caused really strange things.

    - It's difficult to add a meaningful amount of underlay just using the shader for small text (where the shadow would need to be offset by a considerable amount to be visible), though duplicating the layer seems like a fairly reasonable alternative.
     
  28. Stephan-B

    Stephan-B

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


    I am expanding the color tag to include a 4th hex pair for alpha. So now you will be able to use <#ffff0080> where 80 is the alpha value.

    Although this would work to control fading of individual characters, I think it would be a pain to change all those individual per character color tags. I would like to add some method of controlling this in the API. I am still thinking about how to get it done nicely.

    This feature will comes along when Unity 4.6 is released along with additional features. Take a look at this video preview of some of those new features as well as this other video.

    The <pos> tag represents an absolute position like a hard tab stop. I doesn't behave strangely with negative values. Let me look into that :)

    EDIT: I isolated this issue and the fix will be in the next release.

    I just added a new tag <space=000.00> which add x amount of space before the next character.

    The Range that you have for Glow or Underlay is limited by the Padding / Spread that is used to create the font asset. Most of the time, a padding value of 5 is fine for most use. So if you need more range on your Glow or Underlay for instance create a new SDF Font Asset with padding of 8. You'll see you get a lot more range.

    So why not use padding of 8 or 10 all the time. This padding affects how large (point size) the font can be to fit inside a texture (512 X 512) for example. The larger the point size, the better sampling to compute the Signed Distance Field from.

    It is a balancing act between those things. If I needed a Font Asset to be small 64 kb (256, 256) for the whole ASCII set, and wasn't planning on really using Glow or much Underlay offset, then I would simply reduce the padding down to a smaller value.

    What I have found is that a texture size of 512 X 512 with a padding value of 5 works great for most fonts with good range on Glow and Underlay for instance. The beauty of it all is that you can experiment with this and find the combinations that works best for you or any given font.
     
    Last edited: Jun 4, 2014
  29. sschaem

    sschaem

    Joined:
    Feb 14, 2014
    Posts:
    148
    You control how much range you have for underlay, glow, outline and dilate in the material editor from the amount of spread available in the font.

    Here is the max range of the underlay with a spread of 2 and 4 using a 256x256 Atlas.
    spread.png

    Spread does reduces the resolution available for the glyph.
    In this example this result in a native point size of 37 vs 29.
    The trade of to get that extra range is almost 30% less resolution.

    But no a bad trade of in this case, both look good at those sizes.
    (You will need to really zoom in to start to see 'tessellation')

    So the guideline is : Try to use the smallest size atlas, with the smallest spread.
    Increase the spread if needed to extend the range of the : outline, dilate, glow, underlay features
    If the text look tessellated, jump to the next atlas size 256x256 -> 512x256 -> 512x512

    This will ensure you get the best resolution and range for your font.

    Having said that, it can make sense to render in two pass VS one pass.
    You can then use a material for your main typeface with a small spread,
    and use another low res version with a large spread for special effects.
    (super soft shadow, wide glow, ..)

    glow2.png

    Another example using 2 layers (Same Arial font as above)
    hook.png
     
    Last edited: Jun 5, 2014
  30. Doddler

    Doddler

    Joined:
    Jul 12, 2011
    Posts:
    269
    Ah great call on the padding, I didn't realize the padding was related to the max size of underlay. The atlas I'm working with is... a bit huge (2400 characters) so it takes a very long time to generate so I hadn't tried a higher padding. Oddly, most of the processing time occurs before the progress bar moves, and appears single threaded. Also, don't try to set 'auto' size for 2400 characters, it will not end well. :p

    Thanks for the help!
     
  31. sschaem

    sschaem

    Joined:
    Feb 14, 2014
    Posts:
    148
    2400! what language ?

    And a large atlas with a decent spread will be heavy on your CPU.
    If you drink coffee, time to go brew another pot :)

    The long pause is the time taken to open the font.
    Then the progress bar track the SDF generation of each character,
    That part if fully multithreaded using Grand Central on OSX and OpenMP on Windows.

    Speeding up this offline process was not a priority, its been quality over speed for asset creation.
    But maybe a 2.0 feature request ? :)
     
    Last edited: Jun 5, 2014
  32. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Glad to know it got through it :)

    Those fonts are a beast to open / load. I was shocked when I imported one of the Han Simplified into Unity and I had time to go eat a sandwich before it was done. It took like over 30 minutes.

    Good call.

    BTW: Instead of generating all 2400 characters, look into using in Character Set - Characters from File. That way you can parse the text in your game and only generate those characters plus some most common ones. This might help reduce this down to a smaller set.
     
  33. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Texturing Options
    A feature of TextMesh Pro that is often overlooked is the ability to control how a texture is applied to the characters, lines or paragraph of text.

    In this first image, we apply a simple grid like texture on the face of the characters mapped per character horizontally & vertically.




    Next the same texture is still applied per character horizontally but per line vertically.



    For the remaining images, you can read the caption. All these images were captured from within Unity's Editor. All texture is created by TextMesh Pro.






    Now switching it up with a different texture so you can appreciate the flexibility. Again all these options are Real-time & Dynamic.










    And finally back to the first grid like texture applying the texture per paragraph both horizontally & vertically.

     
  34. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    TextMesh Pro vs. TextMesh Web Demo
    This is as plain as it can get. A simple line of text being updated each frame using the same Arial font.


    Top text is TextMesh Pro. Bottom is Unity's Text Mesh.

    When the count reaches 1000, while still using the same TextMesh Pro Font Asset, we switch to a different material preset and then back later on.
     
    Last edited: Jun 6, 2014
  35. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I needed to take a short break so I decided to play around ...

    Using the font Impact, I created this plain looking text object in TextMesh Pro.




    I then created a material preset which I preemptively called Gold and began to tweak the various material properties.




    It is amazing how dramatically different a font can look after you have thrown a few textures, bevel, shadow and some little bump mapping on it. I'll post the a screenshot of the Material Panel later on so you can all see the settings.
     
  36. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The creation of this Gold Material
    Related to my post above, I wanted to show how this Gold material was created from the plain Impact SDF Font Asset. Once again, we are re-using the same (base) Impact SDF Font Asset. This is simply a new material with modified properties.


    Here is an image of the text using this new Gold Material preset.




    Close up on just the letter "G" reflecting the final settings of this material.




    Lastly, an animated GIF of the process for creating this new material preset.




    Let me know if you have any questions.
     
  37. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Shocked more people aren't trying out what is actually, simply the best text in any engine.
     
    runonthespot likes this.
  38. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Thanks Hippo!
     
  39. runonthespot

    runonthespot

    Joined:
    Sep 29, 2010
    Posts:
    305
    I quite agree. I have an interface with an infinite zoom style, and this asset has just made it seem 100x more polished.
     
  40. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Spread the word folks, leave a solid review :)
     
  41. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    That was the goal :)

    When I was working on my own game, I just hated the whole workflow and how much time was wasted having to create new font atlases every time I want a different look for those fonts. Having to mess around with the bitmap font and scaling to make them look decent at a given size / zoom was also a pain. Those are some of the reasons, I created TextMesh Pro in the first place. I wanted a more flexible tool that would make is much quicker and easier get the look that I wanted without having to use external tools like Photoshop (which I am so horrible at btw :) ).
     
  42. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I will be buying a copy once we get to the text part of our game properly (if anyone's wondering, I was a beta tester, so that's how I know it's really good).
     
  43. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    As per Doodler's request, Color tags can now include a 4th hex pair to control alpha per character.

    So for instance, "I am <#ffff0040><b>transparent</b></color> text." produces this...

     
  44. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Text Alignment - Justified
    Based on user feedback, I made some modifications to the text alignment - justified option to improve the handling of line endings and paragraphs.

    Here is an example showing the text nicely justified as expected. In TextMesh Pro you can control the blend of word spacing vs character spacing for justified text. This example uses a blend of 50 / 50.

    You will also notice the use of the color tag as well as the size tag to increase the size of the first letter of each paragraph. I am also using the maxVisibleCharacters property to reveal each letter at a time.


     
  45. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Performance Comparison (Unity's Text Mesh vs. TextMesh Pro)
    This is somewhat of an extreme stress test as it is unlikely that you'll even have 5000 text objects on screen at once but just in case, you can count on TextMesh Pro to deliver in terms of visual quality and performance.





    Here is a still image of Unity's Text Mesh.




    and now a still of TextMesh Pro. Notice how much cleaner & more professional the text is using TextMesh Pro.

     
  46. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Thank you Hippocoder for your great support and to everyone who gave TextMesh Pro such great reviews :)
     
  47. zyzyx

    zyzyx

    Joined:
    Jul 9, 2012
    Posts:
    226
    Hi,
    I'm sorry if this was asked earlier but I could not find any answer to this.
    How does Textmesh Pro perform with large amounts of Text like EULA on mobile?

    Thanks!
     
  48. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    TextMesh Pro performs better than Unity's built-in Text Mesh / 3D Text in all respect / platforms using our Mobile SDF Shader.

    In terms of displaying large quantities of text like an "End User License Agreement" which is a static text object (ie. the text doesn't change from frame to frame) you are mostly dealing with fill rate and lots of vertices & triangles. Unity's EULA contains 20767 visible characters which would require an excess of 65,535 vertices which is Unity's limit. Obviously you could break this up into more than one object but then why push that much geometry around to display an EULA?

    Personally, I would look into baking this EULA into a texture (1 Quad) and just displaying / scrolling through that. I haven't considered using TextMesh Pro to render the text to a texture but that could be interesting (when I find the time).
     
  49. zyzyx

    zyzyx

    Joined:
    Jul 9, 2012
    Posts:
    226
    Thanks for your quick reply!
    Since this amount of text is usually not displayed as a whole wouln't it be possible to have some kind of virtualizing functionality so only the quads visible are actually generated and/or reused?
     
  50. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Interesting questions :)

    Any reason why you want to generate geometry to display this EULA instead of a texture for instance? EULA text is typically pretty plain looking and not sure anyone would care to zoom-in on that legal stuff.

    In terms of handling displaying just portions of the text, (thinking out loud) ... Since TextMesh Pro is very efficient in terms of generating the text, outside of me doing anything, you could control what text is provided to display. Ie. break this up into pages. You could then expand this to use the Masking feature and control the _VertextOffsetY to scroll up / down through these pages.

    I'll just have to give this some thoughts.
     
    Last edited: Jun 10, 2014
Thread Status:
Not open for further replies.