Back to Node List

Region Extract Sprites

region_extract_sprites

Cuts an image into separate small images, one per region. Great for turning one drawing into reusable parts: split a rock wall into individual stones, or break a sprite into pieces to animate separately

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
画像
image
Image
Required
切り出す元の画像です
領域
regions
RegionMap
Required
切り出す位置です。1つの領域が1枚のスプライトになります

Output Ports

NameTypeDescription
スプライト
sprites
List<Image>
切り出されたパーツのリストです(領域ID順)。領域の形の外側は透明になります
枚数
count
Int
切り出された枚数です

Parameters

NameTypeDefaultRangeDescription / Options
余白
padding
Int
00–32

各スプライトの周りに足す透明な余白(px)です。後からパーツに輪郭線や光彩を付ける予定があるときに便利です

サイズ統一
uniform_size
Bool
false

全スプライトを同じサイズに揃えます(最大の破片に合わせて中央配置)。スプライトシートやアニメのコマとして使うときはオンにしてください

Overview

Turns one drawing into a parts kit. Each region is cropped into its own small image and collected into a list — rock wall → loose stones, tree → leaves and trunk, character → separate body parts, all in one step.

Usage tips

  • The go-to flow: image + a region node → region_extract_spriteslist_get to pick one sprite, or a sprite-sheet packer to lay them out.
  • Sprites are cropped to each region's exact bounding box; pixels outside the region shape become transparent.
  • Turn on Uniform Size when the sprites feed animation frames or any same-size pipeline (largest piece wins, content centered).
  • If you plan to add outlines or glow later, give the sprites 2–4 px of Padding so effects don't clip.

Common mistakes

  • Sprites come out clipped — the RegionMap and the image have different sizes; match the region node's width/height to the image.
  • One stone ends up split across two sprites — separated areas with the same id are extracted as one sprite. Run region_split_islands first to give each island its own id.

Related nodes

  • region_split_islands — split same-id islands before extracting
  • region_burst — scatter the pieces in place instead of extracting them
  • list_get / list_map — process the extracted sprites one by one
Back to Node List
Region Extract Sprites — PixPipeline Node Reference