Yotsuba Games
Back to Node List

Region Compose

region_compose

Combines two RegionMaps with overwrite and fill modes

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
ใƒ™ใƒผใ‚น
base
RegionMap
Required
ๅœŸๅฐใซใ™ใ‚‹ RegionMap ใงใ™
้‡ใญใ‚‹้ ˜ๅŸŸ
overlay
RegionMap
Required
้‡ใญใ‚‹ RegionMap ใงใ™
ใƒžใ‚นใ‚ฏ
mask
Image
้‡ใญใ‚‹้ ˜ๅŸŸใ‚’้ฉ็”จใ™ใ‚‹็ฏ„ๅ›ฒใ‚’ๅˆถ้™ใ™ใ‚‹ไปปๆ„ใฎ็”ปๅƒใƒžใ‚นใ‚ฏใงใ™

Output Ports

NameTypeDescription
้ ˜ๅŸŸ
regions
RegionMap
ๅˆๆˆๅพŒใฎ RegionMap ใงใ™
ใƒ—ใƒฌใƒ“ใƒฅใƒผ
preview
Image
ๅˆๆˆๅพŒใฎ้ ˜ๅŸŸใ‚’่‰ฒๅˆ†ใ‘ใ—ใŸ็ขบ่ช็”จ็”ปๅƒใงใ™
ใƒฉใƒ™ใƒซ
labels
Map
Inspector ใซ้‡ใญใ‚‹IDใƒฉใƒ™ใƒซไฝ็ฝฎใงใ™

Parameters

NameTypeDefaultRangeDescription / Options
ๆ–นๅผ
mode
Enum
OverlayNonOutsideโ€”

้‡ใญใ‚‹้ ˜ๅŸŸใ‚’ใƒ™ใƒผใ‚นใธ้ฉ็”จใ™ใ‚‹ๆ–นๅผใงใ™

  • ๆœ‰ๅŠน้ƒจๅˆ†ใงไธŠๆ›ธใOverlayNonOutside
    ้‡ใญใ‚‹้ ˜ๅŸŸใฎๆœ‰ๅŠน้ƒจๅˆ†ใงใƒ™ใƒผใ‚นใ‚’ไธŠๆ›ธใใ—ใพใ™
  • ๅค–ๅดใ ใ‘ๅŸ‹ใ‚ใ‚‹OverlayOutsideOnly
    ใƒ™ใƒผใ‚นใฎๅค–ๅด้ƒจๅˆ†ใ ใ‘ใ‚’้‡ใญใ‚‹้ ˜ๅŸŸใงๅŸ‹ใ‚ใพใ™
  • ใƒžใ‚นใ‚ฏ็ฏ„ๅ›ฒใง็ฝฎๆ›ReplaceByMask
    ใƒžใ‚นใ‚ฏๆœ‰ๅŠน็ฏ„ๅ›ฒใ ใ‘้‡ใญใ‚‹้ ˜ๅŸŸใธ็ฝฎใๆ›ใˆใพใ™
  • ใƒ™ใƒผใ‚นๅ„ชๅ…ˆKeepBaseInside
    ใƒ™ใƒผใ‚นใฎๆœ‰ๅŠน้ƒจๅˆ†ใ‚’ๅ„ชๅ…ˆใ—ใ€ๅค–ๅดใ ใ‘้‡ใญใ‚‹้ ˜ๅŸŸใ‚’ไฝฟใ„ใพใ™
IDๆ‰ฑใ„
id_mode
Enum
OffsetOverlayโ€”

้‡ใญใ‚‹้ ˜ๅŸŸใฎIDใ‚’ใฉใ†ๆ‰ฑใ†ใ‹ใงใ™

  • ้‡ใญใ‚‹IDใ‚’ใšใ‚‰ใ™OffsetOverlay
    ใƒ™ใƒผใ‚นใจ้‡ใชใ‚‰ใชใ„ใ‚ˆใ†ใซ้‡ใญใ‚‹้ ˜ๅŸŸใฎIDใ‚’ใšใ‚‰ใ—ใพใ™
  • ้‡ใญใ‚‹IDใ‚’็ถญๆŒKeepOverlay
    ้‡ใญใ‚‹้ ˜ๅŸŸใฎIDใ‚’ใใฎใพใพไฝฟใ„ใพใ™
  • ID่ฉฐใ‚็›ดใ—Compact
    ๅˆๆˆๅพŒใซIDใ‚’0ใ‹ใ‚‰่ฉฐใ‚็›ดใ—ใพใ™
ใ‚ทใƒผใƒ‰
seed
Int
10โ€“99999

ใƒ—ใƒฌใƒ“ใƒฅใƒผ่‰ฒใซไฝฟใ†ใ‚ทใƒผใƒ‰ใงใ™

ID่กจ็คบ
show_ids
Bool
falseโ€”

Inspector ใฎใƒ—ใƒฌใƒ“ใƒฅใƒผไธŠใซ้ ˜ๅŸŸIDใƒฉใƒ™ใƒซใ‚’่กจ็คบใ—ใพใ™

Overview

The region equivalent of blend, combining two RegionMaps into one. It builds complex compositions by layering different region structures, such as ore speckles over a base of geological strata.

  • type_id: region_compose
  • category: Generate/Region/Edit

It composites two RegionMap values on the same canvas. Use it to place ore or grime scatter over a stratum base, or replace only a masked range with other regions.

Usage tips

  • The standard setup is image_to_regions(ๅœฐๅฑค) + region_scatter(ๆ–‘็‚น) โ†’ this node, a central pattern in the introductory region-system workflow.
  • Parameters decide how IDs are assigned after compositing, including overwrite and offset behavior. Build the habit of checking the result with region_debug_preview.
  • Chain this node to combine three or more layers.

Main parameters

ID Description
mode Compositing method, such as overwrite, fill only outside, or replace within a mask
id_mode Avoid, preserve, or repack ID collisions from the overlay
seed Seed for preview colors
show_ids Show ID labels in the inspector preview

When mask is connected, its arbitrary shape takes priority and output wrap_x / wrap_y are disabled.

ID่ฉฐใ‚็›ดใ— first offsets overlay IDs to avoid collisions, then renumbers the composite from 0. ้‡ใญใ‚‹IDใ‚’็ถญๆŒ preserves ID collisions. If the base and overlay use the same ID, preview colors and later ID-based processing see them as one region.

Usage

Build a large base with Region Strata or Region Cells, create small ore or grime regions with Region Scatter, then combine them here. To target overlay regions by ID downstream, first use ้‡ใชใ‚‹IDใ‚’ใšใ‚‰ใ™ or ID่ฉฐใ‚็›ดใ—, then inspect IDs with Region Debug Preview as needed.

preview and labels are for inspection. Connect regions to downstream region operations.

Related nodes

  • region_scatter / region_strata / region_cells โ€” supply regions to composite
  • region_remap โ€” organize IDs after compositing
  • region_debug_preview โ€” inspect the ID structure
  • region_fill / region_pattern_assign โ€” fill the composite result
Back to Node List
Region Compose โ€” PixPipeline Node Reference