Hugo Locurcio 2a962929f3 Update demo files for Godot 4.2.1 (#1013) 8 місяців тому
..
fonts 905717d462 Add a 3D labels and texts demo 1 рік тому
screenshots 905717d462 Add a 3D labels and texts demo 1 рік тому
textures 2a962929f3 Update demo files for Godot 4.2.1 (#1013) 8 місяців тому
3d_labels_and_texts.gd 905717d462 Add a 3D labels and texts demo 1 рік тому
3d_labels_and_texts.tscn 905717d462 Add a 3D labels and texts demo 1 рік тому
README.md 905717d462 Add a 3D labels and texts demo 1 рік тому
curvature.gdshader 905717d462 Add a 3D labels and texts demo 1 рік тому
default_env.tres 905717d462 Add a 3D labels and texts demo 1 рік тому
icon.webp 63d1cd9a60 Use 128×128 WebP icons for all demos (#885) 1 рік тому
icon.webp.import 63d1cd9a60 Use 128×128 WebP icons for all demos (#885) 1 рік тому
label_3d_layout.gd 905717d462 Add a 3D labels and texts demo 1 рік тому
project.godot 2a962929f3 Update demo files for Godot 4.2.1 (#1013) 8 місяців тому

README.md

3D Labels and Texts

This project showcases the two main 3D text techniques supported by Godot: Label3D and TextMesh.

Both Label3D and TextMesh exist in 3D space and can optionally be occluded by other objects, but they serve different use cases.

Label3D: The Label3D node is a 3D node like any other. It draws text using one quad per character, which can optionally be set to work as a billboard.

TextMesh: Unlike Label3D, TextMesh can optionally have actual depth since it generates geometry to represent the text. TextMesh is not a node, but a PrimitiveMesh resource you use within a MeshsInstance3D node. Therefore, you won't see TextMesh in the Create New Node dialog.

Icons can also be displayed in Label3D and TextMesh using icon fonts, which can be generated from SVG files using serivces like Fontello. Note that while Label3D supports colored rasterized fonts (such as emoji), only monochrome fonts can be generated from Fontello. TextMesh and Label3D with MSDF fonts are limited to monochrome fonts too.

Both standard rasterized and MSDF fonts can be used in Label3D, while TextMesh will only support fonts that can be drawn as MSDF well. This excludes fonts that have self-intersecting outlines, which Godot currently doesn't handle well when converting them to MSDF.

In most scenarios, Label3D is easier to use and can look better (thanks to outlines and MSDF rendering). TextMesh is more powerful and is intended for more specialized use cases.

Language: GDScript

Renderer: Vulkan Clustered

Screenshots

Screenshot