Overview
Renders a NineSlice asset as a window image of the requested dimensions. Only the edges and center resize, leaving the corners intact, so the same asset can produce both a name box and a full-screen window.
Usage tips
- Complete the workflow with
nine_slice_pack: pack defines the asset, render sets its dimensions. Attach multiple Render nodes to batch-produce UI at different sizes. Repeatis the standard choice for pixel-art borders.Stretchcan elongate patterns and damage the pixel-art look.- Promote width / height to input pins 📌 to animate a window opening.
Related nodes
nine_slice_pack— the asset counterpartblend— overlays text and iconstext_rasterize— generates text to place in the windowPrimary uses: message windows, UI panels, button backgrounds, name boxes, and status frames
This node accepts a NineSlice asset and renders it at the specified width and
height. It preserves the corners and resizes only the edges and center, keeping
pixel-art borders clean in a large window.
Edge scale methods
| Value | Display name | Description |
|---|---|---|
Document |
Asset setting | Uses the setting stored by NineSlice Pack. |
Repeat |
Repeat | Tiles the edge part. Best for pixel-art borders. |
Stretch |
Stretch | Stretches the edge part to the output dimensions. |
Center scale methods
| Value | Display name | Description |
|---|---|---|
Document |
Asset setting | Uses the setting stored by NineSlice Pack. |
Repeat |
Repeat | Tiles the center part. |
Stretch |
Stretch | Stretches the center part to the output dimensions. |
Transparent |
Transparent | Leaves the center undrawn and transparent. |
Minimum-size handling
A nine-slice generally cannot be smaller than the sum of its left and right borders or its top and bottom borders. Choose how to handle smaller requests.
| Value | Display name | Description |
|---|---|---|
Clamp |
Expand automatically | Expands an undersized request to the smallest renderable size. |
Warn |
Warn and expand | Expands to the minimum size and writes a note to warnings. |
Error |
Raise an error | Does not render and raises an error when the requested size is too small. |
Basic usage
- Connect
nine_slicefromNineSlice Packto this node'snine_sliceinput. - Set
widthandheight. - Connect
imagetoPreviewor another node and inspect the window image. - If needed, change
edge_modeorcenter_modeto compare repeating and stretching.
Meaning of content_rect
content_rect is a guide for placing text or icons inside the window.
| Key | Meaning |
|---|---|
| x | X coordinate of the content area's top-left corner |
| y | Y coordinate of the content area's top-left corner |
| width | Width of the content area |
| height | Height of the content area |
For example, if content_rect is x=8, y=8, width=80, height=32, placing text
roughly within the 80x32 area beginning at (8, 8) helps keep it clear of the frame.
Notes
- This node only renders. Create the asset and specify part order in
NineSlice Pack. - To preserve pixel-art lines, start with
edge_mode=Repeat. Stretchalso works for assets where patterns are unobtrusive, such as gradients or flat colors.- If padding consumes the output,
content_recthas zero width or height andwarningscontainscontent_rect_empty. summaryandwarningsuse stable locale-independent diagnostics.size_clampedreports an expanded undersized request.