Flood Fill
Flood-fill regions by spatial or attribute proximity.
What it does
Flood Fill spreads outward from a seed point, marking every element it can reach and recording how far it travelled to get there.
On an image it walks pixel by pixel, crossing only into neighbours close enough in colour (Tolerance), a bucket-fill selection with a soft edge rather than a hard boundary. On a collection of points or a mesh it walks a connectivity graph, nearby points, K-nearest-neighbours, or real mesh edges, and reports geodesic distance rather than straight-line distance. Every element reached carries a Distance value and a Mask value (1 reached, 0 not reached), and Count reports how many elements the flood touched. Images also produce a tinted Overlay, showing the selection in the viewport.
When to use it
Magic-wand region selection on an image, by colour similarity rather than a hard shape.
Distance-from-a-point falloff that respects connectivity: a ripple spreading through a point grid, or a value growing along the surface of a mesh rather than through empty space (geodesic distance).
An effect driven by an element's distance from the seed: Distance into a Gradient, a Remap, or an Attribute Assign for falloff-driven displacement, colour, or timing offsets.
The number of elements a region contains: read Count.
| Parameter | Type | Default |
|---|---|---|
source | OneOf([FieldOf(Raster), Collection]) | — |
seed_index | OneOf([Number]) | — |
seed_position | OneOf([Transform, Vec3, Vec2]) | — |
tolerance | Number | 0.100 |
pixel_connectivity | String | "8-Connected" |
connectivity | String | "Radius" |
connection_radius | Number | 50 |
k | Number | 6 |
max_distance | Number | 0 |
normalize | Boolean | true |
overlay_color | Color | rgba(0.20, 0.60, 1.00, 0.40) |
strength | Number | 1 |
Gotchas
Max Distance at 0 lets the flood run until every reachable element is exhausted. Raise it to cap how far the flood travels from the seed, for a bounded ripple or a fixed-radius selection.
Delaunay connectivity (collection mode) currently behaves like Radius connectivity. True triangulation-based connectivity is not yet implemented.
Seed Position expects a world-space position. Wire a Null's transform, or any 3D or 2D position, and the seed tracks that handle in the scene. Left disconnected, the seed defaults to the centre of the image.
Seed Index, picking a starting element by number, works only when flooding a collection of points or a mesh. On an image the seed always comes from Seed Position, and Seed Index is ignored.
Worked example
Add a Flood Fill and wire an image into Source.
Wire a Null's transform into Seed Position and move it in the viewport. The flood's origin follows the handle.
Raise Tolerance so the flood accepts a wider range of colours, growing the selection past hard edges.
Take Distance into a Gradient to colour the selection by how far it spread from the seed, or take Mask into a Blend to composite only the reached region.