Back to Node List

NineSlice Pack

nine_slice_pack

Builds a reusable nine-slice window material from small image parts.

Reviewed
Guide available
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
角パーツ
corner
Image
3パーツ方式で使う角画像です。右上・左下・右下は反転して自動で作ります。
辺パーツ
edge
Image
3パーツ方式で使う上辺画像です。下辺や左右の辺は反転・回転して自動で作ります。
中央パーツ
center
Image
3パーツ方式で使う中央の塗り画像です。
パーツ画像リスト
parts
List<Image>
5パーツ方式または9パーツ方式で使う画像リストです。9パーツは 左上、上、右上、左、中央、右、左下、下、右下 の順です。
スプライトシート
spritesheet
SpriteSheet
スプライトシートのフレーム順をパーツ順として使います。9パーツは 左上、上、右上、左、中央、右、左下、下、右下 の順です。

Output Ports

NameTypeDescription
9スライス
nine_slice
NineSlice
9スライス描画ノードへ渡す、伸ばせるウィンドウ素材です。
素材画像
image
Image
9つの領域を1枚にまとめた確認用の素材画像です。
概要
summary
Text
作成結果の短いまとめです。
注意
warnings
Text
素材作成時の注意点です。問題がなければ空です。

Parameters

NameTypeDefaultRangeDescription / Options
素材名
name
Text
NineSlice

9スライス素材に付ける名前です。

作り方
mode
Enum
ThreeParts

入力画像をどのパーツ順として読むかです。

  • 3パーツThreeParts
    角パーツ、辺パーツ、中央パーツの3つから作ります。足りない角や辺は反転・回転して作ります。
  • 5パーツFiveParts
    5枚の画像を 角、上辺、下辺、横辺、中央 の順で使います。
  • 9パーツNineParts
    9枚の画像を 左上、上、右上、左、中央、右、左下、下、右下 の順で使います。
  • リスト順9パーツListOrder
    パーツ画像リストから9枚を 左上、上、右上、左、中央、右、左下、下、右下 の順で読みます。
  • シート順9パーツSpriteSheetOrder
    スプライトシートから9フレームを 左上、上、右上、左、中央、右、左下、下、右下 の順で読みます。
辺の伸ばし方
edge_mode
Enum
Repeat

この素材の標準の辺の伸ばし方です。

  • くり返しRepeat
    辺パーツをタイル状にくり返します。ドット絵の枠線向けです。
  • 引き伸ばしStretch
    辺パーツを出力サイズに合わせて引き伸ばします。
中央の伸ばし方
center_mode
Enum
Repeat

この素材の標準の中央の伸ばし方です。

  • くり返しRepeat
    中央パーツをタイル状にくり返します。
  • 引き伸ばしStretch
    中央パーツを出力サイズに合わせて引き伸ばします。
  • 透明Transparent
    中央を塗らず透明のままにします。
余白 左
padding_left
Int
00–512

中に文字などを置く時の左余白です。0なら左枠の幅を使います。

余白 右
padding_right
Int
00–512

中に文字などを置く時の右余白です。0なら右枠の幅を使います。

余白 上
padding_top
Int
00–512

中に文字などを置く時の上余白です。0なら上枠の高さを使います。

余白 下
padding_bottom
Int
00–512

中に文字などを置く時の下余白です。0なら下枠の高さを使います。

Overview

Builds a resizable window asset (NineSlice) from small corner, edge, and center parts. It provides the foundation for batch-producing RPG message windows, UI panels, and button frames from small pixel-art parts.

Usage tips

  • The simplest starting point is ThreeParts: one corner, one edge, and one center create a symmetrical frame. Move to 5 or 9 parts when you need more elaborate designs.
  • The parts can be images generated inside the graph, enabling workflows that manage color variations for every frame part with one palette.
  • nine_slice_render performs the drawing. This node only defines the asset.

Related nodes

  • nine_slice_render — the rendering counterpart; usually used together

  • list_create — bundles the parts list

  • text_rasterize — creates text for the window; composite it with blend

  • Primary uses: RPG message windows, UI panels, button frames, speech-bubble frames, and similar elements

  • Dedicated output type: NineSlice

NineSlice is dedicated data for a nine-slice asset. In addition to images, it stores information such as left-border width, top-border height, whether the center repeats or stretches, and the inner area available for text.

What is nine-slice?

Nine-slice treats a window image as the following nine regions.

Top left Top Top right
Left Center Right
Bottom left Bottom Bottom right
  • Corners stay unchanged when the source cells already match. When part sizes differ, the packer repeat-fills them to the largest cell in the 3x3 grid and lists the affected parts in warnings.
  • Top, bottom, left, and right edges repeat horizontally or vertically, or stretch.
  • The center can repeat, stretch, or remain transparent.

This lets you create large text windows from small pixel-art assets.

Build methods

Value Display name Required inputs Description
ThreeParts 3 parts corner, edge, center Builds from one corner, one edge, and one center, requiring few assets.
FiveParts 5 parts parts or spritesheet Builds from five images: corner, top edge, bottom edge, side edge, and center. The top and bottom can use different designs.
NineParts 9 parts parts or spritesheet Uses a separate image for every region, providing the most freedom.
ListOrder 9 parts in list order parts Uses the first nine images in parts in nine-slice order.
SpriteSheetOrder 9 parts in sheet order spritesheet Uses the first nine frames in the sprite sheet in nine-slice order.

Five-part order

Arrange parts or spritesheet in this order:

  1. Corner
  2. Top edge
  3. Bottom edge
  4. Side edge
  5. Center

Nine-part order

Arrange parts or spritesheet in this order:

  1. Top left
  2. Top
  3. Top right
  4. Left
  5. Center
  6. Right
  7. Bottom left
  8. Bottom
  9. Bottom right

Scale methods

Value Display name Description
Repeat Repeat Tiles the same part. Best for pixel-art borders.
Stretch Stretch Stretches the part to the requested size. Best for gradients and simple flat areas.
Transparent Transparent Leaves the center undrawn and transparent. Use it for a frame with a see-through center.

Transparent is available only for the center scaling method.

Basic usage

  1. Prepare images for the corner, edge, and center parts.
  2. Place NineSlice Pack.
  3. Set the build method to 3 parts.
  4. Connect images to corner, edge, and center.
  5. Connect the nine_slice output to the nine_slice input of NineSlice Render.

Notes

  • This node creates the asset. Set the final window dimensions in NineSlice Render.
  • 3 parts requires few assets, but use 9 parts when every edge and corner needs a separate design.
  • If both parts and spritesheet are connected, parts takes priority.
  • padding_* is limited to 0–512. Out-of-range promoted values are clamped and produce a parameter_clamped warning. Zero means “use the matching border width.”
  • summary and warnings use stable locale-independent diagnostics. parts_normalized_repeat reports size normalization and parts_truncated reports ignored extra inputs.
Back to Node List
NineSlice Pack — PixPipeline Node Reference