This is a small extension that makes 3D text with Unity's TextMeshPro possible. It uses raymarching and a geometry shader to work around the limitations of TMP at the moment.
[^1]: Tempering with the SDF values in the distance makes raymarching more difficult, I need to find a good way of evaluating the shortest distance. [^2]: I currently don't have access to any VR device and, therefore, cannot optimize for it right now.
Graphics API | Built-in | HDRP | URP |
---|---|---|---|
DirectX 11 | :heavy_check_mark: Compatible | :heavy_check_mark: Compatible | :heavy_check_mark: Compatible |
DirectX 12 | :heavy_check_mark: Compatible | :heavy_check_mark: Compatible | :heavy_check_mark: Compatible |
Vulkan | :heavy_check_mark: Compatible | :heavy_check_mark: Compatible | :heavy_check_mark: Compatible |
OpenGL Core | :heavy_check_mark: Compatible | :warning: Invalid | :heavy_check_mark: Compatible |
OpenGLES2[^3] | :x: Incompatible | :warning: Invalid | :x: Incompatible |
OpenGLES3 | :heavy_check_mark: Compatible | :warning: Invalid | :heavy_check_mark: Compatible |
Metal[^4] | :wavy_dash: To Be Tested | :wavy_dash: To Be Tested | :wavy_dash: To Be Tested |
[^3]: Support for OpenGLES2 is currently NOT planned. [^4]: I currently don't have access to any Mac and, therefore, cannot test it for Metal right now.
If the shader doesn't work for a compatible combination try to reimport the shader file first! When the issue persists contact me!
Window>Package Manager
+
dropdown button in the top-left corner of the package managerAdd package from git URL...
https://github.com/Ikaroon/TMP3D.git
as url and confirmThis method will always install the current state of the git. To get a released version head to the release page!
To understand how to setup a TextMeshPro for 3D you can check out the sample in the package. For downloading that follow these steps:
Window>Package Manager
Text Mesh Pro 3D Support
in the section Ikaroon
Samples
Import
next to Solid Text
Assets/Samples/Text Mesh Pro 3D Support/<version>/Solid Text/Scenes/Sample_TMP3D
If you still need help, here are some steps how you setup a TextMeshPro for 3D. There are two ways of creating a TextMeshPro 3D.
The Automatic way:
3D Object>Text - TextMeshPro (3D)
Create 3D Font Asset Variant
if it's not a 3D font already (The button will be disabled otherwise)The Manual way:
Font Asset Creator
from Window>Text Mesh Pro>Font Asset Creator
TextMeshPro/3D/Unlit
3D Object>Text - TextMeshPro
NOT from UI>Text - TextMeshPro
this is not supported yet.Script>Ikaroon.TMP3D>TMP3D_Handler
Work on this project happens in my freetime and, therefore, I cannot promise if and when certain features are added. I am considering to open this up for contribution but for now you can manipulate the code as you please. This project is MIT licensed and may be used freely. (Check the license file for more information)
When you find a bug you can create a bug report on Github! I will try to cover them as quickly as possible.
If this project helped you, you can treat me to a coffee if you want :coffee:
If you need support with this package please contact me: support@marian-brinkmann.com