Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

TextMesh Pro Plans For Hdrp Compatibility For Tmp?

Discussion in 'UGUI & TextMesh Pro' started by dgoyette, Apr 12, 2019.

  1. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    717
    Any news?
     
  2. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    450
    this is quite embarrassing...
     
    sebas77 likes this.
  3. ESludden

    ESludden

    Joined:
    Aug 27, 2012
    Posts:
    19
    We've just launched a game on Steam that uses Hdrp, and it still has this SDF issue in it. All our 'in world' TMP signage draws on top of fog and other transparent objects. Its flagged in our bug database as a 'Major' issue, and as the Lead Artist its rather annoying to say the least.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    I now have a baseline Unlit and Lit URP & HDRP shader graph working in version 11.0.0 of the URP and HDRP package. These are still missing the custom material inspector which will be necessary but still in a state where I could release them for testing and getting feedback.

    - These support Face + 3 Outline + Underlay.
    - Outlines can be offset to fake a 3D look as seen below.
    - Special mode to have the last Outline layer encompass the previous outline layers.

    upload_2021-1-29_15-28-56.png

    - Face and Outline texturing is not working yet and will require a new version of the TMP package with revised UV layout. Currently the UV coordinates for texturing are encoded in UV2 x and SDF Scale in y. In the current shaders, the decoding is handled in the vertex shader which is not yet possible in Shader Graph.

    - The current graphs require version 11.0.0 of URP / HDRP / Shader Graph. However, it will be possible to provide the same functionality in the version of URP / HDRP / Shader Graph in 2019.4 via a separate set of graphs for those specific versions of those packages.

    I will continue to work on the set of graphs for version 11.0.0 of Shader Graph and try to release those as preview early next week.

    Here is another example using multiple outlines with offset + bevel to create a simulate 3D look.

    upload_2021-1-29_15-52-32.png

    By baseline, I mean an initial set of graphs with all the bell & whistles. Then later down the road and if needed, we can look at creating variants of these trading features for added performance.
     
    Last edited: Jan 29, 2021
    sj631, ESludden, Ne0mega and 7 others like this.
  5. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    450
    yay, that is something! Thanks! I would really like to test those out.
    One question tho: couple of weeks before we discussed the starting version for it, and iirc version 10 was agreed upon. Yet you decided to base it on 11 which will make it unavailable for next LTS release. What made you chose this version disregarding our previous conversation?
     
  6. cxode

    cxode

    Joined:
    Jun 7, 2017
    Posts:
    269
    I might be misinterpreting Stephan, but this phrase seems to state that it will be available for 2019.4+:

     
  7. FloBeber

    FloBeber

    Joined:
    Jun 9, 2015
    Posts:
    166
    I'd like to know more about this too. URP 11 not being available in 2020.2.
     
  8. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    To clarify, I do plan on releasing versions of those new shaders for previous releases of Shader Graph back to 2019.4.

    There will be a set for 2019.4, 2020.x and 2021.x.

    Right now I am trying to wrap up the release of version 1.5.4, 2.1.4 and 3.0.4 of the TMP package where some changes will be included related to these new shaders.

    Once these new packages are available (something I was hoping to get done earlier this week and still in progress), I will release (here) the Shader Graph version 11.0.0 for testing and then work to manually recreate them for earlier versions of Shader Graph and then release those as well.
     
  9. zagreekie

    zagreekie

    Joined:
    Nov 20, 2017
    Posts:
    29

    will it be possible with this update to have Lit TMP text that receives shadows in URP? and is there any news on an ETA for this?
     
  10. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    The new releases described in my previous post should be available tomorrow.

    I will then take the next few days / weekend to work on the shaders and make a determination on Monday as to whether or not I can release those in advance of the next preview releases of the TMP package which would include the new material inspectors and necessary changes to other parts of TMP specific to these new shaders.

    I will provide an update by end of day Monday.

    Again, the plan is to first release an initial set for the newer versions of UPR / HDRP but to shortly thereafter follow up with releasing those for 2019.4 and versions of URP / HDRP in between.
     
    sj631 and ftejada like this.
  11. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,215
    Do the new versions support setting the render order of TMP? For example, I have some World-space canvases that currently don't render at all if you look at them through a "Before Refraction" transparent shader. And the main thing I've been talking about for a while now has been being able to set my HUD's TMP object to "After post-process". I wasn't sure whether those settings were included in the new shaders.
     
  12. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    717
    Can't you just render them on their own layer with a Custom Pass after post process?
     
  13. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,215
    I really have no idea... Do you know of any documentation around how you get TMP to render in a custom pass?
     
  14. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    Using the test scene you provided a while back, I was able to achieve the result you desired with it.

    The "After post-process" is an HDRP feature where those options will be available in the custom material inspector for the new shader graphs.

    If you have another "test scene / project" you would like me to test with please by all means provide it.
     
    dgoyette likes this.
  15. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,215
    No, that answers my question. Thanks. :)
     
  16. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    Still working on the shaders, will provide an update tomorrow.
     
  17. Liderangel

    Liderangel

    Joined:
    Jul 8, 2018
    Posts:
    101

    So, tomorrow huh?
     
    andreyefimov2010 likes this.
  18. cxode

    cxode

    Joined:
    Jun 7, 2017
    Posts:
    269
    Have a little more patience lol. Programming is really hard and it's easy to underestimate the time required. Stephan does amazing work for us, let's give him a couple days of leeway on this :)
     
  19. Fribur

    Fribur

    Joined:
    Jan 5, 2019
    Posts:
    141
    Agree. Couple of post up I posted the conversion of the mobile TMP shader to URP. Took me 3 full days during x-mas break. And it’s bare bone, no config GUI etc. Pretty sure all the variants for HDRP, URP, versions to support different shader graph, validation, dependencies and everything else that is surely going on would easily blow this time up 20 fold, 50 fold...
     
  20. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    Thank you.

    Putting aside the shader graphs themselves, evolving SRP and whatever work that entails, it is everything else as the world of text doesn't stand still with issues to address and equality important features to deliver often pulling me away from the shaders.

    I am doing my best to get these new shaders released as soon as possible while keeping everything else running and moving forward.
     
    ftejada, MrMahgu and cxode like this.
  21. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,473
    use @jbooth's better shader :)
     
    nehvaleem and jbooth like this.
  22. Liderangel

    Liderangel

    Joined:
    Jul 8, 2018
    Posts:
    101
    My bad, sorry, didn't meant to sound rude. I know it's a very complicated issue, it's just that we are 1 month away from the 2 year anniversary of this thread and working on a game for so long with the text clipping on top of meshes can get a tad annoying.
    But I wish Stephan all the luck and patience with this issue.
     
  23. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    717
    I wish there were ways for people like Stephan, the SpeedTree team or us to actually have a say in the company priorities.

    HDRP is great but things like customisable text and performant tree rendering are huge things that many, many games need (if not the majority of 3D games). This thread is two years old, that's enough time for someone to learn programming and replace Text Mesh Pro entirely with a Shader Graph based text system.
     
    PutridEx and ftejada like this.
  24. MrMahgu

    MrMahgu

    Joined:
    Oct 21, 2013
    Posts:
    3
    I find it odd that my shader graphs for text mesh pro come from the community. 2 Years to support a surface shader for the future pipeline.
     
    ftejada likes this.
  25. Liderangel

    Liderangel

    Joined:
    Jul 8, 2018
    Posts:
    101

    It's certaintly quite an odd priority for Unity honestly, since this is a major bug of a major feature, and 2 LTS versions have been released since this issue was brought to light.

    We actually started on 2019.2 (HDRP 6 Beta), now we updated to 2020.3 (LTS, HDRP 10 Verified), and the issue was always there. I'm surprised that any producers inside Unity never tried to create a very common World Space TMPro, they would instantly realize how important of a feature isn't working properly and tag it's relevance as High.
     
  26. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    Not there yet but getting closer...

    upload_2021-3-18_20-8-49.png
    URP Lit Shader

    upload_2021-3-18_20-17-31.png
    Camera view - HDRP Lit Shader


    upload_2021-3-18_20-17-38.png
    Scene view behind the text object.
     
    Zelgadis87, MrMahgu, ESludden and 5 others like this.
  27. ESludden

    ESludden

    Joined:
    Aug 27, 2012
    Posts:
    19
    Nice to see some text in HDRP! I'm wondering how it looks if you turn on Fog post processing?. One issue I have is that all text renders on top of Fog/Volumetric light with HDRP and TMP.
     
  28. MrMahgu

    MrMahgu

    Joined:
    Oct 21, 2013
    Posts:
    3
    Everything else in the Unity universe is released in preview but not TMP. Here have some pictures.
     
  29. ubik

    ubik

    Joined:
    Aug 20, 2012
    Posts:
    4
    This is the only missing feature in unity holding me back from going URP and getting some awesome lightning effects, keep up the good work Stephan.
     
  30. Liderangel

    Liderangel

    Joined:
    Jul 8, 2018
    Posts:
    101
    Perhaps we should open up a ticket, tag it as Critical/Urgent, vote it, so we can help Stephan have all the time in the world to fix it quickly.
     
  31. Zelgadis87

    Zelgadis87

    Joined:
    Nov 14, 2016
    Posts:
    6
    This looks awesome!!! Do you have any ETA on a preview release?
     
  32. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    At long last, here is the first preview of the new TMP SRP shaders which includes the URP & HDRP Lit and Unlit shaders.

    These are still in development and will require a new version of the TMP package along with new version of Unity before they are fully functional and officially released.

    Having said that, I have attached to this post a .UnityPackage containing these new shaders for you to play with and provide feedback as they are mostly functional even without custom material inspector.

    I have also created the following video overview for these new shaders to outline some of their functionality.



    Note: This first set of shaders requires the URP and / or HDRP packages version 10.4.0 for Unity 2020.2 / Unity 2020.3. I do plan to make these available for Unity 2019.4 as I get closer to releasing them.

    These shaders will be included in future releases of the TMP package which are expected to be version 2.2.0-preview.x for Unity 2019.4 and version 3.2.0-preview.x for Unity 2020.3 or newer. New packages will include the custom material inspectors along with other necessary changes to make these shaders fully functional.

    The shaders were designed in shader graph and editable.

    P.S. Video is still being processed...
     

    Attached Files:

    Last edited: Apr 27, 2021
  33. sj631

    sj631

    Joined:
    Dec 23, 2016
    Posts:
    22
    Any Update for 2019LTS?
     
  34. cxode

    cxode

    Joined:
    Jun 7, 2017
    Posts:
    269
    2019.4 and 2019LTS are the same thing.
     
  35. n1xx1

    n1xx1

    Joined:
    Jan 10, 2014
    Posts:
    1
    Hello! I was testing the preview shaders with TMP Version 3.0.6, and for some reason I can't get the Face texture working properly. It looks like the UVs the shaders expect are different than the ones TMP 3.0.6 provides. This was with the URP Lit version. If you need more info I will make a test scene and show the results.

    Thanks for the great work!
     
  36. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    As per my comments related to this in the video, texturing will not work until I release a preview of the new TMP package that includes the revised geometry layout. Currently, the texture UV coordinates are encoded in the X component of UV2 which are then decoded in the vertex shader. Since vertex shader operations are not supported by SRP, I have to move / revise the geometry layout to get around this limitation.

    Just for reference:
    Vector2 - UV0 (X, Y) are the UV coordinates of the glyph in the atlas texture
    Vector2 - UV2 (X) contains the encoded (X, Y) UV coordinate of the Face and Outline texture.
    UV2 (Y) contains the SDF scale.

    In the next release
    Vector4 - UV0 (X, Y) will remain the UV coordinates of the glyph in the atlas texture. (Z) will contain the texture array atlas index and (W) the SDF Scale.
    Vector2 - UV2 (X, Y) the no longer encoded UV coordinates of the Face & Outline texture.
     
  37. Liderangel

    Liderangel

    Joined:
    Jul 8, 2018
    Posts:
    101
  38. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
  39. Liderangel

    Liderangel

    Joined:
    Jul 8, 2018
    Posts:
    101

    I saw it, it's very cool to see it working! The voting is just so that however manages and produces your area sees the issue, raises it's priority and gives you all the time in the world to take this beta and work it all the way up to production ready.
     
  40. Fribur

    Fribur

    Joined:
    Jan 5, 2019
    Posts:
    141
    Stephan, I almost feel sorry for the "meh" response from the community here on this outstanding development: great work, and Thank you so much, and also for the excellent video!!! Will certainly replace my "x-mas project" with your shader (probably will strip them down for mobile use). Maybe you can take the silence from the community as sign that things are working very well: forums have a tendency to attract communication about issues and not communication about how well things work.
     
  41. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    Thank you for the post and kind comments :)

    All good on my end. Having been around the forum since 2011 or so, I certainly understand and appreciate that users are busy and most of the time only chime in to report potential issues.

    In terms of these shaders, I expect that I will get more feedback once I release them with the new preview releases and custom material inspectors.
     
  42. Liderangel

    Liderangel

    Joined:
    Jul 8, 2018
    Posts:
    101

    I had time to test the shader (both HDRP - Lit and HDRP - Unlit):




    As you can see, it does work, the text does render above the cube (by putting the Depth Test on the material properties at Always), but it blinks every time you move the camera. After testing a bit when you hit play it stops for a bit, but any time an inspector is updated, it blinks even on play mode.

    Any ideas how to fix it? Thanks!
     
  43. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    Please be sure to test with the most recent version of HDRP. If the issue persists and given this type of behavior would not be specific to these shaders but to the HDRP system itself, I would recommend submitting a bug report with project so the HDRP team can easily reproduce this.

    P.S. Once you have the Case #, please post it here and I will bring this to the attention of the HDRP team.
     
  44. Liderangel

    Liderangel

    Joined:
    Jul 8, 2018
    Posts:
    101

    I'm on Unity 2020.3.9f1 with HDRP 10.5, which should work. I'll submit the bug report, in the meantime if you and everyone else reading this can also try doing this (since after all the entire purpose of this post and thus shader was having text render on top of everything) to see if the issue is consistent or it's something on our end (tbf we tried this on 2 different projects on 2 different PCs).
     
    Last edited: May 30, 2021
    Erethan likes this.
  45. Liderangel

    Liderangel

    Joined:
    Jul 8, 2018
    Posts:
    101
    Case #1339730.
     
  46. Liderangel

    Liderangel

    Joined:
    Jul 8, 2018
    Posts:
    101
    Erethan likes this.
  47. drlecks1

    drlecks1

    Joined:
    Jun 22, 2015
    Posts:
    1
    Any update for 2019.4? I really need these lit shaders for my project! ;)
     
  48. ESludden

    ESludden

    Joined:
    Aug 27, 2012
    Posts:
    19
    I can confirm that our issues with TMP in Unity were resolved by using the updated shaders compatible with HDRP in Unity 2021.1.7

    I am grateful that Stephan had the time to look at this issue and for the work he does. I got the feeling that it was work done outside the normal remit of a daily work schedule, so thank you!
     
    DigitalBoy030 likes this.
  49. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,215
    Is this still coming to 2019.4 LTS? Any idea when that might be?
     
    mons00n and drlecks1 like this.
  50. Deleted User

    Deleted User

    Guest

    Any update?
     
    SkylorBeck and mons00n like this.