Generator node
Text as Image
Renders a string into a GPU texture using any installed macOS font family and style, with nine-way anchor alignment, rotation, and live text input. The text content can be typed in the inspector or driven by a cable, so labels, readouts, and titles update in real time. Composite the result with a Canvas node to put it on screen.
Inputs
| Port | Type | Default |
|---|---|---|
| EnableOff clears the image this node produces, leaving nothing for the canvas to composite. | bool | true |
| TextThe string to draw. A connected number arrives formatted with two decimals, so counters and timers can be wired straight in. | string | Grafit |
| SizeFont size in Grafit units — 0.1 is about a twentieth of the short edge. Not clamped, but the glyphs are rendered crisp only up to roughly 4. | float | 0.1 |
| XHorizontal position of the text block in Grafit units, 0 being screen centre. Not clamped. | float | 0 |
| YVertical position of the text block in Grafit units. Not clamped. | float | 0 |
| ScaleExtra multiplier on top of Size, handy for animating a word in. Not clamped; 0 collapses the text to nothing. | float | 1.0 |
| RotationTurns the text around its own centre, in degrees, positive being clockwise. Any value works — it just keeps rotating. | float | 0 |
| ColorColour and opacity of the glyphs. Alpha 0 renders nothing while still reserving the same size. | color | — |
| H AlignWhich part of the text sits at X — Left, Center or Right. Values outside the list fall back to Center. | int | 1 |
| V AlignWhich part of the text sits at Y — Top, Middle or Bottom. Values outside the list fall back to Middle. | int | 1 |
Outputs
| Port | Type |
|---|---|
| Image | image |
| Width | float |
| Height | float |
Live Preview
How It Works
Text as Image rasterizes the string on the CPU using the macOS text engine (Core Text / CoreGraphics): the text is drawn into a high-resolution bitmap with subpixel positioning and high-quality antialiasing, uploaded once to a Metal texture (with mipmaps), and cached. On the GPU, each frame simply draws that texture onto a quad — positioned, scaled, and rotated in Grafit coordinates (origin at viewport center, shorter edge = [-1, +1], positive rotation = clockwise). The result is written to the node's offscreen texture with premultiplied alpha; near-transparent fringe pixels are discarded to keep edges clean on transparent backgrounds.
The bitmap's resolution adapts to the Size input: the internal render size is 256 px × clamp(Size, 0.5, 4.0), drawn at 2× for Retina. In practice text is sharp across the useful size range, but pushing Size (or Scale) far beyond 4.0 magnifies a capped-resolution bitmap and will soften — this is bitmap text, not a distance-field font.
Rasterized textures are cached by text + font + size bucket + color, so a static label costs nothing per frame; only a change to any of those triggers a re-render.
Font selection does not use ports: the font Family and Style (Light, Regular, Bold, Italic, …) are chosen in the node's Settings tab, listing every font installed on the system. The default is SF Pro. Changing the font re-rasterizes the texture immediately.
Alignment decides how the text block hangs off the X/Y anchor point:
H Align | Meaning | V Align | Meaning | |
|---|---|---|---|---|
| 0 = Left | X is the left edge of the text | 0 = Top | Y is the top edge of the text | |
| 1 = Center | X is the horizontal center | 1 = Middle | Y is the vertical center | |
| 2 = Right | X is the right edge of the text | 2 = Bottom | Y is the bottom edge of the text |
The Width and Height outputs report the measured text-block size in Grafit units for the current string, font, and Size — perfect for sizing a background plate behind the text. When Enable is false (or the string is empty), the output texture is cleared to transparent.
Parameters in Depth
| Port | Default | Meaning |
|---|---|---|
Enable | true | Master switch. Off clears the output texture. |
Text | "Grafit" | The string to render. The inspector provides a live multi-line text editor (every keystroke updates the output). A connected Float value is auto-formatted with two decimals. |
Size | 0.1 | Font size in Grafit units (0.1 ≈ 1/20 of the shorter viewport edge). Also controls the internal raster resolution (clamped ×0.5…×4). |
X, Y | 0, 0 | Anchor position in Grafit units; how the text hangs off it depends on the alignment inputs. |
Scale | 1.0 | Uniform multiplier on the rendered quad. Unlike Size, it does not re-rasterize the text — cheap to animate, but large values soften the bitmap. |
Rotation | 0 | Rotation in degrees, positive = clockwise, around the aligned anchor. |
Color | White (1,1,1,1) | RGBA text color, baked into the rasterized texture (a color change re-renders it). |
H Align | 1 | 0 = Left, 1 = Center, 2 = Right (segmented control in the inspector). |
V Align | 1 | 0 = Top, 1 = Middle, 2 = Bottom. |
Interactions: Size and Scale both make text bigger, but Size re-rasterizes at higher resolution (crisper, slightly more expensive on change) while Scale just stretches the existing texture (free, ideal for smooth animation). Alignment happens before rotation, so a right-aligned label rotates around its anchored edge-center, not the text center.
Use Cases
- Live data readout — any float output →
Textfor an instant two-decimal display; or format first withString Combine("BPM: " + value) for labeled telemetry. - Song/scene titles —
String Splitter/Switchselecting from a set of strings →Text, withLFO→Coloralpha for fade-in/fade-out title cards. - Clock or countdown —
Timer→Math Expression→JSON StringifyorString Combine→Textfor on-screen time displays. - Text on a plate — wire this node's
Width/Heightoutputs (viaMath, adding padding) into a Rectangle node'sWidth/Heightto auto-size a background card that always fits the label. - Kinetic typography —
LFO→ScaleandRotationfor pulsing, swinging words;Audio Beat Detection→Enableto flash words on the beat. - Keyboard-driven captions —
Keyboard→Switch→Textto punch different captions live during a performance.
Tips
- Generators never draw directly to the viewport: connect
Imageto a Canvas node (which is also where opacity, blend modes, and 3D placement live). - Animate
Scale, notSize, for smooth continuous zooms — every distinctSize/text/color combination rasterizes and caches a new texture, so rapidly sweepingSizechurns the cache. - Fast-changing text (counters, timestamps) re-rasterizes on every new string; that is fine for readouts, but avoid feeding it high-frequency noise (smooth or quantize the value first, e.g. with
SmoothorMath). - Font Family and Style live in the Settings tab of the node, not the inspector's parameter list — easy to miss.
Coloris baked into the texture; for per-pixel effects (gradients across text, glows) run theImageoutput through Gradient-masked compositing, Gaussian Blur, or Invert Image.- Use the text as a stencil: feed
Imageinto a Canvas node'sMaskinput to reveal video or generative visuals through the letterforms. - Newlines typed in the inspector's text box are passed straight to the macOS text engine, giving multi-line blocks.
Open Text as Image in the interactive catalog →
Text as Image is one of 381 nodes in Grafit Pro.
Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.