Search Unity

Typogenic - Advanced Text Rendering [FREE]

Discussion in 'Assets and Asset Store' started by Chman, Jul 2, 2014.

  1. WishesMachine

    WishesMachine

    Joined:
    Aug 3, 2014
    Posts:
    10
    This is from Samsung Galaxy S4.Typogenic fonts looks great.
     
  2. WishesMachine

    WishesMachine

    Joined:
    Aug 3, 2014
    Posts:
    10
    There is no light in scene.Materials have Typogenic/Unlit Font shader.Cast Shadows,Receive Shadows,Generate Normals,Use Light Probes unchecked.Character size 6,all spacings 0.
     
  3. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    Yeah that's weird. I don't have this tablet so I can't really debug what's going on. Could you try playing with the font texture settings ? Like the filter mode, anisotropy, compression...
     
  4. WishesMachine

    WishesMachine

    Joined:
    Aug 3, 2014
    Posts:
    10
    Sure but i don't have tablet right now.But i will post results after trying your suggestions.Thanks for help.
     
    Chman likes this.
  5. WishesMachine

    WishesMachine

    Joined:
    Aug 3, 2014
    Posts:
    10
    Sorry for late post.I could not get my hands on a physical copy of Samsung Galaxy Tab 2 10.1 2012.But I was able to do some tests by sending apk to a friend via e-mail.

    Things i have tried and not worked:
    - generate mipmaps (with or without).
    - filter mode trilinear ,bilinear etc.
    - different anisotropy settings.
    - alpha is transparent (with or without).

    Even texts not close to any other object.I thought maybe it was a z-fighting issue.I tried
    - use 24 bit buffer(with or without ,nothing changed).
    - Camera's near clipping plane to 0.01 from 0.3.
    and "setting near clipping plane to 0.01" make things worse.
    Then i think finally i got a clue but i never had a change to test with different camera's clipping plane settings because my friend have busy schedule.
    I suspect it's a z-fighting issue.If i can managed to do more tests i will post again.
     
  6. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    Thanks for looking into it !

    I think you're on the right track. It looks like a depth buffer precision issue with this specific hardware. I'm not really sure what I can do to "fix" this on Typogenic' side but I can think of a few alternative solutions :

    The easy one would be to push the near clip plane up and make sure the far one isn't set to impossible values (like 2000+). But this might not work with your project. A better solution would be to setup a second camera for your HUD with tight clipping planes.
     
  7. Skullbot

    Skullbot

    Joined:
    Jul 12, 2014
    Posts:
    15
    Cool asset here. I have some suggestions for it too !

    - Make it possible to behave like billboards (facing camera everytime)
    - Fade-in / out animation (opacity, or anything fancy you could think off :D)
    - Distance (from Camera) threshold to hide the text, and maybe ability to use the fade-in/out animation for this

    I would like to use it to display 3D text over objects in-game, and even if it looks cool right now, the said features are still needed for that. But still, that's awesome for a free asset !

    Keep up the good work ;)
     
  8. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    These 3 generic features won't make it into Typogenic because they have nothing to do with Typogenic. They should be very simple components you add to your text objects on the scene.
    1. Use a billboard component, like this one.
    2. Should be done as a component as well, you just need to change the text opacity (from the Typogenic Text or Material) either in a script or using the Animation panel.
    3. Same as above, it's a simple component that gets the distance from the camera and changes the opacity.
    :)
     
  9. Skullbot

    Skullbot

    Joined:
    Jul 12, 2014
    Posts:
    15
    Oh ok, thanks for the tips !
    I though it was much harder than attaching a script to the existing component ^^
    Works like a charm now, and thanks for the fast reply ;)
     
  10. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
    is this now deprecated with uGUI?
     
  11. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    No, not really. Typogenic doesn't have the same purpose.

    The UI Text component is good for... Well, standard UI text and labels in UI components. Typogenic is good for highly stylized text in 3D with or without shadows, click detection on individual character and infinite scaling through the use of distance field fonts (the text will stay smooth no matter what its scale or how close to the camera it is). Which one to use will depend on your needs :)
     
    rakkarage likes this.
  12. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    A new version is available on the Asset Store (and Github) !

    Changelog :
    • Better click support in 3D space (thanks to Michael McCollum).
    • Added Typogenic Manual to the help menu for quick documentation access.
    Don't hesitate to fork the project and do pull requests on Github if you want to contribute to Typogenic :)
     
  13. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
  14. banzai777

    banzai777

    Joined:
    Apr 27, 2013
    Posts:
    17
    Is there any way to have 2 different options use the same shader but have different "thickness" settings? Do I have to create a duplicate shader every time I want an unlit font with different line thickness? Thank you!
     
  15. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    Thickness is a material setting, so... Yes, you'll need to create a new material for each thickness value you need (the shader isn't duplicated, only the material). If you want to use multiple materials in a single Text object, read this section in the doc.
     
  16. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Found a little bug:
    When a TypogenicText-Object is selected in Hierarchy its color is not displayed correctly in Runtime.
     
  17. Felipetnh

    Felipetnh

    Joined:
    May 3, 2012
    Posts:
    8
    Hey man... Just to let you know, this is awesome! Thank you for your work!

    I just have a question...
    I'm testing my game on two devices:
    - LG G2 (KitKat 4.4.4)
    - Galaxy Tab 2 (Jelly Bean 4.2.2)

    The text works fine in my LG G2, but it keeps "flickering" in the Galaxy Tab 2.
    Do you know what might be happening and how to fix it? Are there any limitations of hardware/software for it to work properly?

    [EDIT]
    I thought it could've been because of my font, but I tested with the Arial font there is in the package, and still the same error occurs.

    [EDIT2]
    It happens even on your demo scenes when they run in the Galaxy Tab 2.
    It looks like there are some kind of gizmos around every single letter, and that gizmos keeps flickering all the time.
     
    Last edited: Nov 29, 2014
  18. Vanlandi

    Vanlandi

    Joined:
    Aug 25, 2014
    Posts:
    2
    Any idea if/when this will work with Unity 4.6 UI system? Thanks.
     
  19. m.wroblewski

    m.wroblewski

    Joined:
    Jun 30, 2014
    Posts:
    1
    I have the same issue on some Samsung Devices. I find the solution to change shader because its using:
    #pragma target 3.0 and using function fwidth
    I've changed this to #pragma target 1.0 and replace this function with abs(distance)
    after this I must manipulate with Smoothness and Thickness to restore previous view of font but it works.
    I've attached the rewritten shader.
     

    Attached Files:

    Arkade likes this.
  20. banzai777

    banzai777

    Joined:
    Apr 27, 2013
    Posts:
    17
    I've encountered a strange problem. I'm using the included News Cycle font and whenever a 6 is used, it appears well below it's proper place. It doesn't happen with Arial. I've reimported the asset but the problem remains. I'd like to stick with News Cycle, if possible. I'll go through the process to import another font but in case it happens again, do you know what's going on here and how to fix it? Thanks! You've made a great asset here.
    Screenshot demonstrating the issue:
     
  21. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    I just wanted to say thanks and this is really fantastic. Considering the font rendering in the new UI is still kinda terrible this is a great solution to replace it.
     
  22. Felipetnh

    Felipetnh

    Joined:
    May 3, 2012
    Posts:
    8
    Thanks for your answer... It kind of worked here.
    I couldn't tweak the options to make it look the old version though. =/
    Any other solutions?
     
  23. deviantDork

    deviantDork

    Joined:
    Feb 12, 2014
    Posts:
    5
    Hi Chman,

    thanks a lot for this great asset!
    I just started using it and from all the solutions I tried, this is definitely the best working one!

    When deploying on a Nexus 7 (2012), I encountered the same problem as WishesMachine: I'm seeing the Mesh Renderer outlines.
    Deploying on a Nexus 5 shows no such issues.

    Since I have the device here for testing, I was wondering if I could be of any help with figuring the issue out and finding a solution?
    Unfortunately I have no solid idea of how to approach this - could you tell me what to try out?

    Just to see what happens I tried the change suggested by m.wroblewski (replacing fwidth in the shader with abs). After that the outline issue is gone! But naturally the result is not as intended and, at least for me, also not satisfactory fixable by playing around with smoothness and thickness.

    Thanks in advance!
     
  24. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    541

    I do have the same issue with OceanMobileOptimized community ocean shader.
    It runs fine on another android project,
    but imported in another project, were some old shader are stored, it breaks up with the same error.

    It might have something to do with a conflict between that shader and some other shader you are using in your project.

    Try the text system in a new fresh project, and see if it goes away.
     
  25. tellemstevedave

    tellemstevedave

    Joined:
    Jul 15, 2013
    Posts:
    21
    Great stuff. I'm also curious when this stuff will be ported to the new UI (RectTransforms, Canvas etc...)?
     
  26. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    I have a black outline around my letters and don´t know why.
    In Littera I have all effects disabled.
     
  27. iviachupichu

    iviachupichu

    Joined:
    Feb 6, 2015
    Posts:
    28
    Excellent asset! Very easy to set up an the results are beautiful. No problems in Unity 5 so far. =D

    You might have Outlines enabled in the Material properties.
     
  28. Xorxor

    Xorxor

    Joined:
    Oct 15, 2014
    Posts:
    24
    I just started playing with Typogenic and it is really awesome! I've used SDF before and Typogenic is really easy to use and straightforward. Would it be possible to stroke the inside of the font instead of the outside? From a UI point this could either be done using a negative number in outline or a separate control for Inlines or something like that. Any thoughts? Thanks so much and I really appreciate that this is not only free but open! Nice work!
     
  29. Xorxor

    Xorxor

    Joined:
    Oct 15, 2014
    Posts:
    24
    I really just needed a stroke centered on the edge so I smoothstep up and then smoothstep down.

    half inlineAlpha = smoothstep(_Thickness + _OutlineThickness/2. - smoothing, _Thickness + _OutlineThickness/2. + smoothing, dist);
    half outlineAlpha = smoothstep(_Thickness - _OutlineThickness/2. - smoothing, _Thickness - _OutlineThickness/2. + smoothing, dist);
    half strokeAlpha = outlineAlpha - inlineAlpha;
    half4 outline = half4(_OutlineColor.rgb, _OutlineColor.a * strokeAlpha);
    finalColor = outline;
     
  30. Xorxor

    Xorxor

    Joined:
    Oct 15, 2014
    Posts:
    24
    Ideally either the shader would support the stroke being centered, inside, or outside of the the font edge or thickness. If I do this I'll post up.
     
  31. Torninator

    Torninator

    Joined:
    Jun 17, 2014
    Posts:
    11
    Is it possible to get Typogenic Text working on top of Unity 2D sprites?

    I've got it running with Unity 5 and it was really easy to set up, just won't appear in front of my sprites. I don't see any options around sorting layers in the typogenic text script.

    Edit: I got it working by manually setting `sortingLayerName` and `sortingOrder` properties on my MeshRenderer component, in script
     
  32. o0Charly0o

    o0Charly0o

    Joined:
    Jul 22, 2013
    Posts:
    2
    Hi all, this asset is very good but have this problem , I also happened to me , I've played many options and export the apk many times to try on my Samsung Galaxy S ( i9000 ) and I think I have given to the problem , only flickers when activated antialiasing-smoothness option on shader. Please try it, I installed my project on a Kindle Fire tablet and works well antialiasing- smoothness option, but on the samsung galaxy s flick . I tried to change the function that says m.wroblewski and still can use anti-aliasing , does strange things now antialiasing makes a kind of "alpha " and makes clear the text, but not round the saw teeth .

    Sorry for my english, hope I explained .

    Hopefully if together we can fix this problem , it would be great to use all the features of this asset without problems.

    Thank you.
     
  33. o0Charly0o

    o0Charly0o

    Joined:
    Jul 22, 2013
    Posts:
    2
    Hello again, I found this :

    http://stackoverflow.com/questions/14048927/fwidth-tegra-3-glsl?rq=1

    it seems that the " fwidth " gives problems to more people.

    I think it should solve this problem, the antialiasing is very important, if you can not use, this asset is lost.

    update:

    i test just now on a samsung galaxy s3 mini and work perfect the antialiasing-smoothness option.
    The s3 have installed the original samsung rom, and the older samsung galaxy s have a custom rom, this can be the problem?

    thanks all.
     
    Last edited: May 5, 2015
  34. rerwandi

    rerwandi

    Joined:
    Dec 8, 2014
    Posts:
    544
    I got an error when importing in Unity 5
     
  35. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    I can't reproduce this error. It works fine here and a few others are using it on Unity 5 too. What's your Unity version and your build target ?
     
  36. rerwandi

    rerwandi

    Joined:
    Dec 8, 2014
    Posts:
    544
    I'm using unity 5.0.0f4 Personal Edition and targeting PC, Mac & Linux Standalone

    It's fixed now.
    I just deleted 'Path.cs' file from one of my plugins and now its working!

    Gonna try it soon and edit my review :D
     
    Last edited: Jun 8, 2015
  37. IsaiahKelly

    IsaiahKelly

    Joined:
    Nov 11, 2012
    Posts:
    418
    Haven't tried this asset yet, but it looks fantastic. Just out of curiosity, is this something that could be merged into the official Unity UI system? Font rendering in the new UI could definitely be improved.
     
  38. ITurchenko

    ITurchenko

    Joined:
    Jun 11, 2013
    Posts:
    1
    Can I use Typogenic for rendering colored images as bitmap font?
    Let's say, I have texture with colored number plates and each one represent one letter.
    When I tryed to use Typogenic, I get white (or other single colored) rectangles.
    Did I use wrong tool or there is some parameter in Typogenic which I missed?

    EDIT: Looks like I found answer: material shader should be "UI/Default".
     
    Last edited: Jul 8, 2015
  39. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    760
    How easy is it to replace Unity 4.6 text elements with Typogenic ones in an existing project? Can a typogenic text field be put into a UI canvas and work properly?
     
  40. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Not sure what demo 4 is supposed to be doing. Maybe it isn't working properly? (Unity 5.1.0f3)

    BTW, I've loved the idea of this package for a long time now and I'm finally getting to use it. :)
     
  41. moondust-games

    moondust-games

    Joined:
    Jul 21, 2013
    Posts:
    24
    @Chman Firstly, thanks for making Typogenic free, it's very useful. I had problems with updating Text Meshes on ios but this works perfectly.

    Can I ask one thing please - is there a CPU/GPU saving for using Typogenic over the built-in Unity Text Mesh? I now have a mixture of both throughout my game and wondered if it's worth converting them all to Typogenic meshes. Thanks.
     
  42. frankcyli

    frankcyli

    Joined:
    Jun 3, 2015
    Posts:
    4
    I can't get Typogenic to work in Unity 5.1. None of the demos are showing any text.
     
  43. frankcyli

    frankcyli

    Joined:
    Jun 3, 2015
    Posts:
    4
    The version I am using is 5.1.2f1.
     
  44. ToastDispatch

    ToastDispatch

    Joined:
    Aug 11, 2015
    Posts:
    1
    Just downloaded and installed your asset from the Asset Store, looks like it's just what I'm looking for!

    However, when importing it into my project (Unity 4.6), I can't seem to use it.

    I don't see GameObject > Create Other, in my menubar, and dragging the script onto an empty game object Unity throws the error "cannot add component because it doesn't exist".

    I was able to edit the demo just fine when using it in an empty project, but the scripts in the demo say "The associated script cannot be loaded. fix any compile errors and assign a valid script" when being added to my project.

    The only other asset I'm using is RAIN AI.

    Any help would be greatly appreciated.
     
  45. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    @Chman I have a scenario where I need to have overlapping text on a wall. But I need to adjust the draw order of the text on the wall. Do you know how to do that with your Tyopgenic Text?
     
  46. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    Yep, looks like it's a bit broken in Unity 5.1+. The demo was supposed to show dynamic lighting applied to the text (Demo 6 is also broken). All other demos seem to work fine here (Unity 5.1.2).
    It means there's an error in a script somewhere, in one of Typogenic scripts or one of you own (check the console). Unity won't compile new scripts until all errors have been fixed.
    It's 3D, so... Offset it a tiny little bit :p

    FWIW, I think I'm going to deprecate the package currently available on the store. It's outdated compared to the Github version and I don't really have time to do any more work on this asset at the moment (nor provide extensive support). It's fully open source so I don't mind forks or pull requests :)
     
    Arkade likes this.
  47. doublegumbo

    doublegumbo

    Joined:
    Oct 24, 2013
    Posts:
    53
    Great plugin - however I do have one question --- The color of the Typogenic text isn't always accurate, tending to skew a bit bright compared to the color I've actually selected. This seems to be because its influenced by the color multiplier in the shader panel. In order for me to get the text color looking how I want, I need to futz with the color in the color multiplier, along with the color in the Typogenic text panel. Is there a way I can simply get a 1:1 color result without having to deal with the color multiplier?

    thanks
    -g
     
  48. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Why is this nice thing deprecated from the Store?
     
  49. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    See two posts above. ;)
     
  50. savgrace

    savgrace

    Joined:
    Jul 14, 2015
    Posts:
    5
    Man, SERIOUSLY! THANKS A LOTTTTTTTTT! So much work put into this and our project now has GORGEOUS font! You have donation page? lol