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.
- Solid, unlit shader (3D)
- 3D character properties and animation
- Outline support
- Bold text support
- Italic text support
- Debug rendering
- Steps: Showing shader complexity
- Mask: 3D uvs
- Text Creation Helper
- Multiple Raymarching Algorithms
- Simple: Equal sized steps
- Temporal: Optimized for Temporal Antialiasing
- SDF: Using TextMeshPro's distance values
- Strikethrough text support
- Underline text support
- Face texture support
- Documentation
- Solid, surface shader
- Solid, unlit shader (UI)
- Sprite support
- Bevelled text1
- Full fledged freeform text using textures1
- Translucent, unlit shader
- VR optimizations2
| Graphics API | Built-in | HDRP | URP |
|---|---|---|---|
| DirectX 11 | ✔️ Compatible | ✔️ Compatible | ✔️ Compatible |
| DirectX 12 | ✔️ Compatible | ✔️ Compatible | ✔️ Compatible |
| Vulkan | ✔️ Compatible | ✔️ Compatible | ✔️ Compatible |
| OpenGL Core | ✔️ Compatible | ✔️ Compatible | |
| OpenGLES23 | ❌ Incompatible | ❌ Incompatible | |
| OpenGLES3 | ✔️ Compatible | ✔️ Compatible | |
| Metal4 | 〰️ To Be Tested | 〰️ To Be Tested | 〰️ To Be Tested |
If the shader doesn't work for a compatible combination try to reimport the shader file first! When the issue persists contact me!
- Open the package manager in Unity from
Window>Package Manager - Select the
+dropdown button in the top-left corner of the package manager - Select
Add package from git URL... - Enter
https://github.com/Ikaroon/TMP3D.gitas url and confirm
This 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:
- Open the package manager in Unity from
Window>Package Manager - Select
Text Mesh Pro 3D Supportin the sectionIkaroon - Expand
Samples - Click
Importnext toSolid Text - Now open the scene from
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:
- Create a TextMeshPro in a scene from
3D Object>Text - TextMeshPro (3D) - Replace the FontAsset with another font
- Click
Create 3D Font Asset Variantif it's not a 3D font already (The button will be disabled otherwise) - You have now access to 3D text!
The Manual way:
- Create a new FontAsset by using the
Font Asset CreatorfromWindow>Text Mesh Pro>Font Asset Creator - Expand the created Asset and select the Material
- Change the Material's shader to
TextMeshPro/3D/Unlit - Create a TextMeshPro in a scene from
3D Object>Text - TextMeshProNOT fromUI>Text - TextMeshProthis is not supported yet. - Add a TMP3D_Handler component from
Script>Ikaroon.TMP3D>TMP3D_Handler - Apply the FontAsset to the TextMeshPro component
- You have now access to 3D text!
Work on this project happens in my freetime and, therefore, I cannot promise if and when certain features are added.
When you find a bug you can create a bug report on Github! I will try to cover them as quickly as possible.
Footnotes
-
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. ↩
-
Support for OpenGLES2 is currently NOT planned. ↩
-
I currently don't have access to any Mac and, therefore, cannot test it for Metal right now. ↩

