text3d
A block of text drawn in the 3D pass on a quad, pixels_per_unit font pixels per world unit; billboard turns it to the camera.
On this page
3d · render · 25 properties · 3D
A block of text drawn in the 3D pass on a quad, pixels_per_unit font pixels per world unit; billboard turns it to the camera.
In a scene, text3d is the node key that applies it. A script reaches each property below as a field on node.text3d: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.text3d.get() and node.text3d.set(table).
Properties
| property | type | default | description |
|---|---|---|---|
billboard |
bool | true |
Turn to face the camera every frame; off leaves it in the node's own plane |
cast_shadow |
bool | true |
Whether it casts a shadow from the lights that cast. Through a material whose surface cuts the glyphs out, the shadow keeps their shapes; otherwise each glyph shadows as its whole quad |
color |
color | [1,1,1,1] |
Tint, as channel floats or #rrggbb / #rrggbbaa |
font |
asset · font |
— | The face it draws in, and how: a face file such as fonts/Inter.ttf, or a font asset. Empty takes the theme's default font |
font_size |
float | 32 |
Height in font pixels, before pixels_per_unit sizes it in the world At least 1. |
font_style |
enum | normal |
Upright, the family's italic face, or the upright face slanted; a family with no italic is slanted either way One of normal, italic, oblique. |
font_weight |
int | 400 |
Stroke weight, 400 regular and 700 bold Range 100–900. |
light_layers |
flags | [] |
The light layers this is lit on: a light3d lights it when their light_layers share one; empty is every layer One of 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32. |
line_break |
enum | word_or_glyph |
Where a wrapped line may break: between words with a too-long word cut anywhere, between words only, or anywhere One of word_or_glyph, word, glyph. |
markup |
bool | false |
Read the text as markup: bold, italic, colour, alignment, wave and inline images |
material |
asset · material |
— | The material every layer draws with, reading the glyph atlas as its texture; empty takes an inherited material component, else the built-in one. Its [surface] says whether the glyphs are cut out (alpha = "mask"), which sides of a text3d draw and whether the scene hides it |
max_height |
float | 0 |
Font pixels the lines stop at; zero has no limit At least 0. |
max_lines |
int | 0 |
The most lines a block keeps; zero keeps every line At least 0. |
max_width |
float | 0 |
Font pixels the lines wrap at; zero runs the text on one line At least 0. |
pixels_per_unit |
float | 100 |
Font pixels to one world unit, sizing the block the way a sprite is sized At least 0.01. |
receive_shadows |
bool | true |
Whether shadows land on it; off lights it as if nothing stood between it and every light |
render_layers |
flags | [] |
The layers this is drawn on: a camera3d draws it when their render_layers share one; empty is every layer One of 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32. |
segmentation_id |
int | 0 |
The id render.snap_aov("segmentation") colours this node by; nodes sharing one share a colour. Zero takes one of its own, from 1 up At least 0. |
tab_width |
int | 8 |
Spaces between tab stops Range 1–64. |
text |
string | — | The text drawn; text_key wins over it |
text_align |
enum | center |
Where the block sits across the node's origin, and its lines within it: start and end follow the text's direction, left and right do not, justify stretches every full line One of start, center, end, left, right, justify. |
text_key |
string | — | A key in the project's strings, re-read every frame so a language change shows at once |
text_style |
asset · text_style |
— | How it is dressed past its font: line height and spacing, the lines drawn with the glyphs, an outline and a shadow. Empty draws it plain |
truncate |
bool | false |
End a block cut short with an ellipsis; needs max_width, and cuts at max_lines or max_height when either is set, else at one line |
truncate_at |
enum | end |
Which part of a cut line the ellipsis stands in for One of end, start, middle. |
Asset types this component references: font, material, text_style.