Studio Yotsuba
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

Input Ports

NameTypeDescription
Image
image
Image
Required
The picture to cut apart
Regions
regions
RegionMap
Required
Where to cut. Each region becomes one sprite in the list

Output Ports

NameTypeDescription
Sprites
sprites
List<Image>
The cut-out pieces, in region id order. Pixels outside each region are transparent
Count
count
Int
How many sprites were extracted

Parameters

NameTypeDefaultRangeDescription / Options
Padding
padding
Int
00–32

Transparent margin added around each sprite (in pixels). Handy when you plan to add an outline or glow to the parts later

Uniform Size
uniform_size
Bool
false—

Makes every sprite the same size (fitting the largest piece, content centered). Turn this on when the sprites will go into a sprite sheet or animation frames

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_sprites → list_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