Studio Yotsuba
Back to Node List

Image To Regions

image_to_regions

Splits a picture into regions following its brightness or colors. Use it to break an image apart along your own sketch, or to turn a saved noise image into terrain areas

Reviewed
Guide available

Input Ports

NameTypeDescription
Image
image
Image
Required
Source map image to quantize

Output Ports

NameTypeDescription
Regions
regions
RegionMap
Generated RegionMap data
Preview
preview
Image
Color preview of generated regions
Labels
labels
Map
UI overlay label positions for the inspector

Parameters

NameTypeDefaultRangeDescription / Options
Source
source
Enum
Luma—

Image component used as the region value

  • LumaLuma
  • RedRed
  • GreenGreen
  • BlueBlue
  • AlphaAlpha
  • HueHue
  • SaturationSaturation
  • ValueValue
Levels
levels
Int
52–256

Number of value bands converted into region ids

Invert
invert
Bool
false—

Invert the sampled value before quantizing

Alpha Policy
alpha_policy
Enum
IncludeAll—

How transparent pixels are converted

  • IncludeAllIncludeAll
  • TransparentOutsideTransparentOutside
Wrap X
wrap_x
Bool
false—

Treat left and right edges as connected in downstream region nodes

Wrap Y
wrap_y
Bool
false—

Treat top and bottom edges as connected in downstream region nodes

ID Order
id_order
Enum
SeedOrder—

How region ids are ordered after quantization

  • SeedOrderSeedOrder
  • TopLeftTopLeft
    Assign smaller ids by ascending bounding-box top edge, then left edge
  • BottomRightBottomRight
    Assign smaller ids by descending bounding-box bottom edge, then right edge
  • AreaAscAreaAsc
  • AreaDescAreaDesc
  • RandomRandom
Seed
seed
Int
10–99999

Seed for random id order and preview colors

Show IDs
show_ids
Bool
false—

Show region id labels on the inspector preview

  • type_id: image_to_regions
  • category: Generate/Region/Create

Overview

The entry point to the region system, converting an image into regions (a RegionMap). The region system first divides the canvas into regions, then fills, scatters, or distorts by region (→ Guide "workflows/Introduction to the Region System"). This node takes the first step by dividing noise or height-map values into bands.

It quantizes luminance, RGB, HSV, Alpha, or other image values into a RegionMap. Use it to build a source map for regions from a saved noise image or height map.

Usage tips

  • The go-to entry is noise_generate → image_to_regions(levels 3〜8), where luminance bands become regions. This maps directly to geological layers, elevation bands, or water depth.
  • Adjust levels while checking region boundaries through the colored preview output and show_ids.
  • Disconnected areas in the same luminance band share an ID. Add region_split_islands downstream when each island needs a separate ID.
  • region_cells / region_voronoi / region_noise create regions directly without an image and make it easier to match the canvas size.

Usage

Load a noise image with Map Asset Load and connect it to Image To Regions. Higher levels values produce finer ID bands, which can be post-processed with Region Merge Small or Region Filter.

Because the node quantizes image values, the same ID can appear in multiple disconnected places. Connect Region Split Islands downstream when each visible island should have its own ID.

When using a saved noise image or map asset, the input dimensions become the RegionMap dimensions. To match the final canvas, resize the image first, or generate at the target size from the start with Region Cells / Region Noise / Region Voronoi.

wrap_x / wrap_y are metadata telling downstream region operations to treat the edges as connected. If the source image itself is not seamless, quantizing its values does not automatically make the seam match.

Related nodes

  • region_voronoi / region_cells / region_noise — generate regions without an image
  • region_split_islands — split disconnected areas with the same ID into separate islands
  • region_fill / region_pattern_assign — assign colors or patterns to regions next
  • region_debug_preview — inspect regions
Back to Node List