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. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I will need more information to identify the source of the potential issue. Please make a post on the TextMesh Pro user forum in the thread for Beta 5.2 Beta 1c.

    Ultimately, I need to understand how to reproduce the issue in order to figure out what might be happening. A Repro case is always best. I presume you might be using masking?

    P.S. There are a lot of issues right now in Unity 5.2 which unfortunately affect TextMesh Pro due to it having to work with the New UI and those affected systems. I am hoping the first Unity 5.2 patch will address some of the issues affecting us. Personally, i am recommending users wait for a few 5.2 patches before upgrading to Unity 5.2.
     
    Last edited: Sep 17, 2015
  2. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Could you make a post on the TextMesh Pro user forum in the Unity 5.2 beta thread and provide some detailed information that would enabled me to reproduce this? A repro project / scene is always best.

    P.S. I tried messing around with the UI.Mask and several text objects but can't reproduce this. Those are internal Unity errors since I don't use / call this function but I would still like to figure out what is causing it. Should also file a bug report with Unity on this but we will need a Repro Case.
     
  3. NeonTanto

    NeonTanto

    Joined:
    Jun 19, 2013
    Posts:
    156
    So... I will play around UI.Mask object (without Image component) about hour. Text Mesh Pro doesnt have this bug. But this bug have standart UI elements. If I add Image component to object with mask - all work correct. I think you dont need sample project, because its bug of standart elements, not text mesh pro.
     
  4. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Ok. You are saying it is another Unity 5.2 bug and not TextMesh Pro related. Correct?
     
  5. NeonTanto

    NeonTanto

    Joined:
    Jun 19, 2013
    Posts:
    156
    Yep. I cant reproduce this bug only with text mesh pro, and can reproduce this bug without it.
    P.S.Sorry for my bad english.
     
  6. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I guess we wait for a Unit 5.2 patch.

    P.S. What is your native language?
     
  7. NeonTanto

    NeonTanto

    Joined:
    Jun 19, 2013
    Posts:
    156
    C# =) or russian if you ask about human language.
    Its not critical bug. I think that unity guys just forget add [RequireComponent(typeof(UI.Image))] to UI.Mask because with them all works as expected.
     
  8. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    C# .. That was funny :) Your English is fine and certainly 100% better than my Russian.
     
  9. NeonTanto

    NeonTanto

    Joined:
    Jun 19, 2013
    Posts:
    156
    Stephan... do you planed add inline sprite with distance field shader? For text and sprites with one style, for example.
     
    Last edited: Sep 18, 2015
  10. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    What do you mean specifically? The text elements currently use the distance field shaders (or bitmap) and the sprites use their own sprite shader (UI/Default). Are you looking for the sprites to also use distance field?
     
  11. NeonTanto

    NeonTanto

    Joined:
    Jun 19, 2013
    Posts:
    156
  12. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Once the Multi Font & Material support feature is released, you will have the ability to use multiple font assets per text object. As a result, you will be able to use a Font Asset for your text and then a separate Font Asset which contains shapes and symbols (like Font Awesome) or any other fonts. You will create the Font Asset the same way as you would a normal font comprised of characters using the Distance Field 16 or 32 option and then use the <font="font name"> tag to use that font with icons / shapes.
     
  13. NeonTanto

    NeonTanto

    Joined:
    Jun 19, 2013
    Posts:
    156
    I know it =) but in my opinion you must think about work with distance fields from atlases or plain textures. May be not in this asset. Its not only about inline images, its about all UI form (nine pathes images, sliders and others UI elements). With your aproach you may give to people simple and high res UI extension. Distance fields can be multicolored (4 channels) thats why its may be usefull for UI.Images with simple sharp forms.
     
  14. Linus

    Linus

    Joined:
    Feb 22, 2012
    Posts:
    112
    Many errors after upgrading to 5.2.1f1

    Consider waiting to update unity if using this asset until Stephan has had a chance to update the scripts.


    Errors
    Assets/TextMesh Pro/Scripts/TextMeshProUGUI.cs(835,21): error CS0619: `UnityEngine.UI.Graphic.OnFillVBO(System.Collections.Generic.List<UnityEngine.UIVertex>)' is obsolete: `Use OnPopulateMesh instead.'

    Assets/TextMesh Pro/Scripts/TMPro_UGUI_Private.cs(17,26): error CS0535: `TMPro.TextMeshProUGUI' does not implement interface member `UnityEngine.UI.IMaskable.RecalculateMasking()'

    Sample of the warning types
    Assets/TextMesh Pro/Scripts/TextMeshProUGUI.cs(832,33): warning CS0672: Member `TMPro.TextMeshProUGUI.OnFillVBO(System.Collections.Generic.List<UnityEngine.UIVertex>)' overrides obsolete member `UnityEngine.UI.Graphic.OnFillVBO(System.Collections.Generic.List<UnityEngine.UIVertex>)'. Add the Obsolete attribute to `TMPro.TextMeshProUGUI.OnFillVBO(System.Collections.Generic.List<UnityEngine.UIVertex>)'


    Assets/TextMesh Pro/Examples/Scripts/TMP_TextSelector.cs(82,54): warning CS0618: `UnityEngine.CanvasRenderer.SetVertices(UnityEngine.UIVertex[], int)' is obsolete: `UI System now uses meshes. Generate a mesh and use 'SetMesh' instead'


    Assets/TextMesh Pro/Scripts/InlineGraphicManager.cs(242,43): warning CS0618: `UnityEngine.CanvasRenderer.SetVertices(UnityEngine.UIVertex[], int)' is obsolete: `UI System now uses meshes. Generate a mesh and use 'SetMesh' instead'

    Edit: Temp fix can be done by:
    Code (csharp):
    1.  
    2.   protected override void OnFillVBO(List<UIVertex> vbo)
    3.   {
    4.   //Debug.Log("OnFillVBO");
    5.   //  base.OnFillVBO(vbo);
    6.   Mesh newmesh = new Mesh();
    7.   List<Vector3> vectors = new List<Vector3>();
    8.   for ( int i = 0; i < vbo.Count; i++ )
    9.   {
    10.   vectors.Add( vbo[ i ].position );
    11.  
    12.   }
    13.   newmesh.SetVertices( vectors );
    14.   base.OnPopulateMesh( newmesh );
    15.   }
    16.  
    and this to TMPro_UGUI_Private.cs

    Code (csharp):
    1.  
    2.   public  void RecalculateMasking( )
    3.   {
    4.  
    5.   }
    6.  
    Most likely not proper fix, but it gets the scripts compiled again and text seems to appear correctly in scene.
     
    Last edited: Sep 23, 2015
  15. jposey

    jposey

    Joined:
    Aug 14, 2014
    Posts:
    16
    Your Temp fix code won't compile. Easy fix, but found it strange you pasted code that doesn't compile due to capitalization inconsistency "newmesh" vs. "newMesh".
     
  16. Linus

    Linus

    Joined:
    Feb 22, 2012
    Posts:
    112
    Aha, thanks, updated my post. I edited the post since I had at first forgotten to uncomment a line.
     
  17. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    A release of TextMesh Pro for Unity 5.2 is available on the TextMesh Pro user forum. Always check the TextMesh Pro user forum as a release for Unity 5.2 has been available for a few weeks already.

    Make sure you register to the user forum to get access to those latest releases.
     
    toxtronyx likes this.
  18. Kea

    Kea

    Joined:
    Nov 12, 2012
    Posts:
    23
    When you release a <sprite> tag MeshRenderer support for Unity 4.6 ?
     
  19. BonyYousuf

    BonyYousuf

    Joined:
    Aug 22, 2013
    Posts:
    110
    It's been few month since I have bought this plugin. I am still waiting for the final version. My game is made with Unity 5.2 and I could really use this plugin now. I was hoping to try out the beta today. How close is it to the final version? Can I release my game with this version for production?
     
  20. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    That is what I am working on right now so it should not be long anymore. I was demoing that feature at Unite last week.

    Unity 5.2 is still requiring attention but I believe I have most of the issues ironed out so I should be able to keep focusing on the newer features.
     
  21. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The only reason TextMesh Pro is still in Beta is because I personally wanted to include certain features like Multi Font & Material support and the Text Input Field before taking it out of Beta. I could have taken it out of beta months ago.

    There is now real difference between the version on the Asset Store and on the user forum. In terms of Unity 5.2, there are still a lot of issues as Unity is still renaming API functions from one patch to the other. So until Unity 5.2 stabilizes, I'll keep the release of TextMesh Pro on the user forum since I can be more responsive and adapt to Unity's changes that way.
     
  22. thingiebox

    thingiebox

    Joined:
    Feb 23, 2013
    Posts:
    21
    Hi Stephan,
    I just purchased your Text Mesh pro! I spoke to you at Unite Boston about supporting a large number of languages.

    I am getting missing characters when creating a Font Asset with some Japanese text with Arial. It's the arial font asset that comes with your project. I believe Arial does support Japanese, Chinese etc. Why would I be getting missing characters?

    Since you are a font expert :) , do you know what open source font I could use that could take care of the following languages? These are the ones Unity has trouble rendering with dynamic font:
    Arabic, Hebrew, Japanese, Thai, Simplified Chinese, Traditional Chinese, Punjabi, Hindi, Bengali.

    Thanks!
     
  23. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The Arial.tff font does include most languages but since not everyone needs all those characters, the Arial SDF Font Asset only contains the extended ASCII set. Using the Font Asset Creator in TextMesh Pro, you can create a new Arial SDF Font Asset that would include the characters you specifically need.

    Please see the following videos on the TextMesh Pro User Forum which cover font asset creation.

    http://digitalnativestudios.com/forum/index.php?topic=105.0

    http://digitalnativestudios.com/forum/index.php?topic=122.0
     
  24. thingiebox

    thingiebox

    Joined:
    Feb 23, 2013
    Posts:
    21
    Thanks for the swift reply!

    The videos are helpful! If I do need to import my own font for Japanese or Chinese, after I create the relevant font assets with a custom set of characters, do I still need to have those large .ttf font assets in the Unity project? The JP and Chinese ones are 16MB each.
     
  25. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Once the Font Asset is created, the font .ttf or .otc are no longer needed.
     
  26. thingiebox

    thingiebox

    Joined:
    Feb 23, 2013
    Posts:
    21
    That's perfect! Thanks!
     
  27. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Release 0.1.52 Beta 2 of TextMesh Pro for Unity 5.2 is now available on the TextMesh Pro User Forum.

    Assuming all goes well with this release, I will be updating the Asset Store releases within the next 7 days.
     
  28. snlehton

    snlehton

    Joined:
    Jun 11, 2010
    Posts:
    99
    Hi, while TMP produces superior results compared to the Unity's own bitmap font rendering, TMP doesn't work that well with small fonts. This has to do with the padding, because if I enable the Extra Padding option in the text, everything looks good.

    Why doesn't TMP add an extra padding of 1 always regardless of the font size? Because of the bilinear filtering, you kind of need to have the padding there in order to prevent sharp, cut off edges. This is needed for SDF and bitmap fonts alike.

    Here is a comparison of a small font with regular TMP without extra padding and a default extra padding of 1 inserted in the TMPro_ShaderUtilities.cs:

    http://www.tiikoni.com/tis/view/?id=4263b1c

    The extra padding option in the TMPro text component is great, but it's unnecessarily large padding (4 when only 1 is needed) and in order to have that setting in every text field I need to remember to manually set the option to every field. Quite not practical.
     
    Last edited: Oct 9, 2015
  29. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The amount of Extra padding required can be more than just 1 pixel due to material properties like Dilation, Outline, Underlay, etc affecting the size of each character. Extra Padding is mostly required for small text and not for larger text.

    In the TMP Settings file where you can already define which Font Asset will be used by default and other settings, I am adding the ability to define the default settings of properties like Word Wrapping, Kerning and Extra Padding.

    In terms of the Extra Padding size, that can certainly be adjusted.

    In terms of improving the visual quality of small text, switching to Linear Color Space will also provide some good improvement. As per Unity, they are recommending that users migrate to a Linear color space workflow so that should be something to consider going forward.
     
  30. sschaem

    sschaem

    Joined:
    Feb 14, 2014
    Posts:
    148
    The padding is not in screen space, but in texture space.
    So a padding of 1 can represent many screen pixels as SDF data is mostly up-sampled.
    And as designed, extra padding should only be required for case where reduction go past 50%
    (important: The SDF need to be created with padding if the 'extra padding' option is used.)

    Usually the optimal size for SDF character is ~30pt as it will cover 6% to 600% its original resolution.
    And extra padding is only required for size <50%

    So if you find yourself having to always use extra padding, you might want to inspect your SDF pt size to see if your SDF pt size fit your usage model.

    Having said that, extra padding is only required because today's HW only support non conservative rasterizing and TMPro shaders are made to be compatible with model 2.0 HW
    But a geometry shader could be used to re-compute the geometry to support conservative rendering.

    The pic below explain a little whats going on. Check the (a) case triangle left and right edge.
    Only the colored pixel will have the pixel shader invoked.
    and so will not render correctly for shader that require the full coverage of the geometry.

    This is happening at the last stage of the HW rasterization, where triangle coordinated are clamped.
    Ultimately what we want is case (b) (note: this unrelated to any form of bi-linear filtering)

    http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter42.html
    https://developer.nvidia.com/content/dont-be-conservative-conservative-rasterization

    Now having said all that, if all your matrix are static, you can compute conservative geometry on the CPU that is static.
    And this would be compatible with all platform unity supports.

    And like I hinted, if your target system can run geometry shaders you can implement this dynamically on the GPU.
    (But if any of your target platform does not, you are back to using padding, and having to support multiple code path dynamically)

    But since this is only needed when SDF are down scaled below 50% , extra padding seem like a viable solution since it work on all unity supported platforms and create minimal to non existent overhead.

    side note: TMPro uses pixel perfect alignment when bitmap font are used, this is performed in the vertex shader.
    Making the bilinear filter perform exactly the same as a point filter. 1 screen pixel = 1 texel
     
    Stephan-B likes this.
  31. snlehton

    snlehton

    Joined:
    Jun 11, 2010
    Posts:
    99
    But that's exactly what's needed. To make sure that the bilinear sampling always ends up blending the pixels to "zero alpha" pixels. Right?

    But if the glyph edges are at the edge of the triangle, then filtering doesn't have room to make it smooth. It doesn't matter if the font is scaled or not. But you mostly see the visual artifacts on small fonts.

    I don't think this issue is related to the conservative rasterization but to bilinear filtering (yes, they're not related). See my image below.

    That's what we're doing. Seemed to do the trick. It would be awesome if I could set the extra padding in the font definition and not in the text instance, though. No source code mod needed, then.

    Yes, if you're never using scaling or rotating. Soon as you do, that filtering issue bites.

    Here is a letter 'T' using Unity's build-in UI text (font is Arial). Notice how the upper edge of geometry is cropped tightly to the letter it self, giving no room for the filtering to blend it to transparent. When you rotate a graphic like this, there is a lot of aliasing going on, especially when the font is small. Try rotating this kind of font in the Editor and see it yourself.

    http://www.tiikoni.com/tis/view/?id=d999c12

    Hope this makes sense...
     
  32. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    Hi,
    Regarding the 'Ellipses' overflow, is there any way on how to make TextMeshPro use the character '.' (ASCII: 46) three times instead of the single '…' (ASCII: 8230)?

    It's because none of the fonts I'm using have the horizontal ellipses character in them, but they all have the period character. I also noticed that not even all the fonts included with the TextMeshPro package have the … character in them, like Bangers SDF.

    This is the Warning I get:
    (Sorry if this has been asked before!)
     
    Last edited: Oct 9, 2015
  33. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The issue with using (3) periods is because you suddenly change the length of the text by inserting 3 characters which also have different width. I can certainly look into that option again but it is not optimum.

    You can certain look at using a tool like FontForge to add the missing glyph to your fonts.

    On a somewhat related note, once the new Multi Font & Material support is available, you will be able to define fallback fonts where TextMesh Pro will look through those fallback font in the event a character is missing from the currently assigned font. As long as you fallback font contains that ... character, you should be fine with that new feature.
     
    dreasgrech likes this.
  34. sschaem

    sschaem

    Joined:
    Feb 14, 2014
    Posts:
    148
    The picture that you linked show badly generated UV for this model/texture.

    The geometry and UV for the SDF mesh are computed to handle 'infinite' zoom and 50% reduction
    (without the need of extra padding)

    Here are some point I will re-iterate

    - Extra padding is only useful for below 50% point size reduction (SDF vs on screen)
    - Extra padding in any other case will result in identical rendering , enabled or disabled.
    - Since SDF are mainly used when upscaled (the core benefit), extra padding should rarely be needed/used.
    - If you find a need to always have to use extra padding,
    your SDF is to high resolution for your usage model, and its a waste of resource.
    You can reduce your SDF resolution.

    Extra padding is only needed for <50% reduction because the geometry already take into account that the rasterizer is non conservative and expand the geometry by half a texel.
    The geometry is actually built using floating point coordinates, using sub pixel positioning of each leters including kerning info, so this fact (conservative rasterazing) is crucial for correct rendering. and thats why the text is crisp and scale seamlessly even with kerning, at any resolutions. (padding required below 50% :)

    Now, if what you observe is not what I describe, you should file this as a bug.
     
  35. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    New Text Object Default Settings
    In the next release, you'll have the ability to define the default settings used by new text objects. This will be done via the TMP Settings.

    upload_2015-10-9_15-27-43.png
     
  36. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    I want to add glow effect to my every text objects in game. For that I want each text's glow with different colour. But setting this thing I am facing problem. If I change glow colour of one text then all other texts glow colour is also changed.

    Like following Image I set glow to text :

    Screen Shot 2015-10-10 at 8.47.52 pm.png

    Same component I want to set for all other texts but only with different colour in that I am facing problem. Please share your suggestion with me.
     
  37. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Glow like all other settings in the Material Inspector are material properties and as such are shared between all the objects which use the same material. In order to have several objects using different material settings, you will need to create material presets where each have their unique settings. See the following video on how to create material presets.



    Via scripting the same can be achieved by using Material Instances where you are essentially creating unique materials for each object. Via scripting, you can also dynamically change material properties like Glow to make it pulse for instance. There are a few threads on the TextMesh Pro user forum covering this informatiom.

    Shared materials and Instanced material is a concept that all Unity users should get familiar with.
     
  38. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    @Stephan B, Thanks for your reply. I got my problem's solution easily.
    Heads off to you for your awesome plugin. I really like this.
     
  39. snlehton

    snlehton

    Joined:
    Jun 11, 2010
    Posts:
    99
    Awesome! This is a default setting, not an override? Meaning that I would still need to go through each existing text instance and enable the extra padding?

    A setting like "Minimum Extra Padding" / "Extra Padding Override" would have been a tad more useful, as with this I could easily enforce extra padding to all of my text using some particular font if needed.

    But this change already makes my life a bit easier so thanks :)
     
  40. snlehton

    snlehton

    Joined:
    Jun 11, 2010
    Posts:
    99
    Well this is what Unity's built-in font rasterizer does, and unfortunately it seems to be the de-facto way of generating the font glyphs (BMFont + NGUI does the same). It's super annoying as it's affects quality quite a much and it's even really easy to fix! So I'm really glad to see that TMP is taking this matter seriously!

    Ah ok so TMP is already adding some small padding for the fonts? I will then try to scale down the SDF to see if it alone fixes the issue.

    No, everything seems to be working as you're describing. The only problem was that I needed to always add the padding to my small texts and it seemed like a bug.

    BTW, how about adding an option to apply extra padding when TMP detects that the font is being used with < 50% reduction? Is that possible? Probably not, as how would TMP know in what resolution the font is going to be rendered...

    But maybe some simple font size based extra padding. So that if I put 21 as extra padding threshold, so my size 14 font instances would use it :)

    Anyway, thanks for taking time to explain things to me multiple times. Highly appreciated! All this cements my belief that TMP is THE font solution for Unity!
     
  41. sschaem

    sschaem

    Joined:
    Feb 14, 2014
    Posts:
    148
    I'm with you on trying to hide all this mechanics, but its not trivial because of the matrix stack. (camera, projection, world)
    But it sure would be nice to remove 'extra padding' :) (it is a very cryptic work around)

    For now, short of a geometry shader (emulate non-conservative rasterizing of a quad), users need to set 'extra padding' during the design phase (when visually needed).

    Another thing you might consider, if a given piece of text doesn't scale up/down by like 10x is to create a "Small" version of your font. If 14pt is the smallest size (on a low ppi display like an 'old' PC monitor), try creating the SDF at 20pt.
    It should handle 14pt without needed any 'extra padding', and look good probably upto 120pt

    If your font cover a super wide range of size, you could potentially create a "Small UI" and "Large UI" font.
    Small ui version cover 12pt to 120pt, and the large cover something like 40pt to 400pt

    This can be better then using large padding during SDF creation, and then turning on "extra padding" for small text and off for large text.
    (note: font creator padding != extra padding. One control the range of the SDF, the other affect the geometry of the mesh on screen)

    Also the smallest the padding (also referred has gradient range) the better.
    Because its a normalized floating point value encoded as an 8bit int.
    The larger the padding/range the less precision it will be encoded in.

    When I personally create SDF, I use the smallest padding possible and the smallest point size possible. Its amazing what you can get out from even a 256x128 texture with a padding of 0 :)
     
    Last edited: Oct 13, 2015
    snlehton and Stephan-B like this.
  42. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,269
    How does the sharpness of small text compare in TMP vs Unity UI? I find Unity UI text is poor compared to OS-native text rendering or even NGUI bitmap text (if at correct resolution).
     
  43. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    There are two paths in terms of Font Asset creation and rendering in TextMesh Pro. You can create Bitmap font assets using the included Font Asset Creator or the preferred and most flexible method is using Signed Distance Field font assets and rendering which provides for the ability to dynamically style the text by adding dilation, outline, shadow, bevel, glow, etc by modifying material properties.

    Both methods have their pros and cons. When it comes to small text (8 to 14 point size) Bitmap fonts created at the correct resolution using hinting will look best whereas the Signed Distance Field counter part will come close but not as good in some cases. However as the point size increases, the SDF Font Asset becomes a lot more advantageous and flexible as only one Font Asset is required for any point size / resolution which can be dynamically styled by using Material presets.

    Both NGUI and TextMesh Pro use FreeType to raster the font atlases. When using Bitmap fonts at the correct resolution, the results should be the same. Since sharpness and rendering quality can be somewhat subjective, I can create an example for you if you provide a link to a font you would like me to use and at what point size along with sample text.

    P.S. You can also PM this information to me if you preferred or email me.
     
  44. comixplay

    comixplay

    Joined:
    Sep 27, 2013
    Posts:
    104
    Hi Stephan,
    Great asset, thanks for that.

    I have a question - I want to make a text glow on mouse enter.
    Is there any way to do that? I don't see any "glow" methods exposed in the event trigger
    Thanks
     
  45. dizzlebomb

    dizzlebomb

    Joined:
    Sep 21, 2009
    Posts:
    9
    Hi Stephan,

    Our team is using Text Mesh Pro now, and I don't think we're on the latest version at the moment. In terms of lighting affecting the TMPro elements, does any real scene lights ever affect it? I've seen the light direction and specular settings options right in the elements, but we were wondering about them being affected by the real scene lighting. Thanks--
     
  46. comixplay

    comixplay

    Joined:
    Sep 27, 2013
    Posts:
    104
    Got it... it's in the material...I should make a new material and switch between the original and new materials
     
  47. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The way to do this is to create a Material Preset (see the following video which cover Font Asset Creation and Material Preset) and then create a simple script that is called when MouseOver occurs which simple assigns the Material Preset (with glow) to the object.
     
  48. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The included TMP Mobile Surface and Distance Field Surface Shaders are affected by scene lighting.

     
  49. Nickolay I

    Nickolay I

    Joined:
    May 26, 2015
    Posts:
    3
    Can I use TextMesh without Canvas? Cause I have project that using previous version of Unity.
     
  50. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Yes. There are two TextMesh Pro components. One located in the "Create - 3D Object - TextMeshPro Text" menu which replaces the old Text Mesh and the other found in the "Create - UI - TextMesh Pro Text" menu.
     
Thread Status:
Not open for further replies.