Separate
Detects all disconnected foreground regions in an image and outputs each one as a clean cutout in a batch, cropped to its bounding box with the other objects’ pixels erased so every frame contains exactly one object. A Mode parameter chooses how the image is split: Connectivity (the default) detects disconnected objects as described here, while Grid ignores content and slices the image into a regular rows-by-columns grid of equal tiles (each side from 1 to 64), for chopping a sprite sheet or atlas into evenly sized frames. The input also accepts a grayscale or mask source directly (a single-channel input yields single-channel cutouts). Separate accepts a batch on its input too: feed it several frames and each one is analyzed in turn, fanning the per-object cutouts out into a single combined batch (an M×N expansion, capped per session to keep the output from running away).
| Pin | Type | Description |
|---|---|---|
| Image | Pixels (required) | The source image or mask to analyze; accepts color or grayscale, and a batch for per-frame fan-out |
| Mask | Mask | Optional matte marking the objects to cut out: white is kept content and black is the empty space between objects. Each connected white region becomes one cutout. When connected, it drives detection directly and overrides the Background parameter |
| Batch | Batch | One frame per detected foreground object, named object_01, object_02, … (the object stem is set by the Name Prefix parameter) in the chosen sort order |
Parameters
Section titled “Parameters”Pins
Mode
Detection
How background is detected
Which corner pixel to sample as the background reference color
Background reference color
- Alpha mode: pixels with alpha above this are content.
- Color modes: maximum color distance from the reference color to still count as background (higher tolerates anti-aliasing halos / JPEG fringing).
Expand the foreground mask by this many pixels before detecting regions, to merge objects that are nearly - but not quite - touching (e.g. a leaf with a thin transparent gap through it)
Filter
Regions smaller than this area are ignored (dust, compression artefacts)
Hard cap on output frames. 0 = unlimited
Grid
Number of horizontal bands to slice from the input image
Number of vertical bands to slice from the input image
Output
Extra pixels kept around each cropped bounding box
Order of the output frames. Reading Order scans left-to-right, top-to-bottom like a grid
Prefix for each output frame's name. Frames are named <prefix>_NN (zero-padded to the object count) - e.g. object_01, object_02 - which feeds the {name} token in Export Batch filenames and the filmstrip label. Leave empty for just the zero-padded number (01, 02 ...)
Mask
How the connected color image is read as a mask. Luminance: the image's brightness. Alpha: the image's transparency. Red / Green / Blue: a single channel
How the mask is mapped when it doesn't match the image
Usage Tips
Section titled “Usage Tips”- Wire the Batch output into Scatter to use each detected object as a stamp, or into Export Batch to save each one as a separately named file.
- Use Merge Gap to close small transparent gaps within a single object before detection. A leaf with a thin transparent seam through it becomes one cutout instead of two.
- Min Area filters out dust and JPEG compression artifacts that would otherwise produce extra frames. Raise it until only real objects remain.
- Padding adds breathing room around each cutout. Useful when downstream nodes need a few pixels of context around the edge.
- Max Objects caps the output count when you only need the N largest or leftmost objects from a large image.
- Reading Order sorts objects as a human would read text: left-to-right, top-to-bottom across rows.
- Set Name Prefix to control each frame’s name stem (
leaf_01,leaf_02, …). Leave it empty to emit just the zero-padded number. - On a single-input graph, the Export Batch
{source}token resolves to the upstream origin label (e.g.tree) rather thanobject_NN, so{source}_{name}keeps fan-out filenames readable.