Studio Yotsuba
Back to Node List

Region Debug Preview

region_debug_preview

Shows every region with a color and its id number. Connect it whenever you wonder which id a face has before selecting by id

Reviewed
Guide available

Input Ports

NameTypeDescription
Regions
regions
RegionMap
Required
RegionMap to inspect

Output Ports

NameTypeDescription
Image
output
Image
Region preview image
Labels
labels
Map
UI overlay label positions for the inspector

Parameters

NameTypeDefaultRangeDescription / Options
Background
background
Enum
RegionColor—

Preview background style

  • RegionColorRegionColor
    Fill regions with deterministic colors
  • RegionGrayRegionGray
    Fill regions with deterministic grayscale
  • TransparentTransparent
    Draw only labels on transparent background
Seed
seed
Int
10–99999

Background color seed

Show IDs
show_ids
Bool
true—

Draw region id labels

Min Label Area
min_area
Int
80–4096

Do not label regions smaller than this pixel area

Label Style
label_style
Enum
Overlay—

Label drawing style

  • OverlayOverlay
    Show labels as inspector UI overlay without baking them into the image
  • FontFont
    Draw labels with the system font renderer
  • TinyTiny
    Draw compact 2x3 bitmap digits
  • SmallSmall
    Draw readable 3x5 bitmap digits
Font Size
font_size
Int
84–32

Font label size in source pixels

Label Scale
scale
Int
11–4

Bitmap digit scale

Placement
placement
Enum
Centroid—

Label placement point

  • CentroidCentroid
    Place labels near each region centroid
  • BoundsCenterBoundsCenter
    Place labels at each bounding box center
Label Color
label_color
Color
[1,1,1,1]—

Digit color

Outline Color
outline_color
Color
[0,0,0,1]—

One-pixel outline color behind digits

Overview

A review-only node that overlays ID numbers on a RegionMap. It is a workbench for visually determining which ID to specify in nodes such as region_mask and region_distance, and is not intended for production output.

  • Category: Generate / Region / Render
  • Uses: choosing IDs for Region Mask, adjusting region area, and inspecting region-splitting results

Usage tips

  • Make a habit of connecting this before selecting IDs. It is essential after region_remap or region_split_islands, which change the numbering.
  • The show_ids option on generation nodes provides the same review. Insert this node when you need to inspect an intermediate state in a processing chain.
  • Use min_area to omit labels when small regions overlap.

Related nodes

  • region_mask / region_filter / region_distance — production nodes that select IDs
  • region_remap — a common upstream node that changes numbering
  • region_info / region_adjacency — numeric region information

Background

Value Description
RegionColor Fill each region with a random color
RegionGray Fill each region with a random gray
Transparent Keep the background transparent and draw only ID labels

Placement

Value Description
Centroid Place the label near the region's centroid
BoundsCenter Place the label at the center of the bounding rectangle

How to use

Connect Region Cells.regions -> Region Debug Preview.regions to show the ID over each region. Use it before specifying Id or IdRange in Region Mask.

With the default label_style = Overlay, IDs are not baked into the image; they appear as UI labels over the Inspector preview. Labels overlap easily on small regions, so use min_area to omit them. Use Font, Tiny, or Small only when the numbers must be baked into an image.

This node is for review. Use its IDs to configure Region Mask, Region Filter, Region Distance, and similar nodes. For ordinary production output, use Region Fill, Region Pattern Assign, or Region Border.

Back to Node List