Flex Mask Voronoi Scheduled β‘π ‘π π £π
Cracked-cell mask patterns, animated and reactive
- masks
- opt_feature
- MASK
Voronoi diagrams - the cracked-glass, cell-boundary pattern you get from scattering points and coloring each pixel by which point it's closest to - are a classic procedural-texture building block, and this is the most parameter-dense node in the pack's mask family. It's not modifying your input mask so much as generating a whole cellular pattern from scratch, with nearly every knob available for reactive control.
How it works
scale, detail (cell count), randomness, and seed control the base cell layout - more detail means more, smaller cells; higher randomness moves cell centers away from a perfectly regular grid toward something organic; seed picks which specific random layout you get. x_offset/y_offset pan the whole pattern. distance_metric is where this node gets genuinely unusual: alongside the standard euclidean, manhattan, chebyshev, and minkowski distance functions, it also ships five decorative "kaleidoscope" metrics (kaleidoscope_star, kaleidoscope_wave, and three kaleidoscope_radiation variants) that warp the cell shapes into starburst and radial patterns instead of plain polygons - someone clearly had fun with this one, and it's worth actually trying a few before settling on euclidean out of habit.
The formula/a/b trio is specific to this node: formula (Linear, Quadratic, Cubic, Sinusoidal, Exponential) shapes the curve used to map your feature's value onto whichever parameter feature_param is targeting, with a and b as the two tunable constants for that curve. That gives you seven things a FEATURE can drive - scale, detail, randomness, seed, x_offset, y_offset, or none - each shaped by a non-linear response curve instead of a flat linear mapping, which is more control than any other node in this batch exposes.
Inputs and outputs that matter
masks(required,MASK) - the source mask this pattern is generated against.distance_metric- 10 options, from standard Euclidean/Manhattan through the kaleidoscope variants.scale,detail,randomness,seed,x_offset,y_offset- the pattern's layout controls.formula,a,b- the response curve shaping any feature modulation.opt_feature(optional,FEATURE) - drives whichever parameterfeature_paramselects.- Output - a single
MASK.
Installing it
Via ComfyUI Manager: search "RyanOnTheInside," install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside.git
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt
then restart. Procedural pattern generation - no model downloads.
Common issues & troubleshooting
Pattern looks like noise, not clean cells. High randomness values (up to 5.0) push cell placement well past "organic" into genuinely chaotic - if you wanted a recognizable Voronoi look rather than static, pull it back toward 1.0 or lower.
Kaleidoscope metrics produce unexpected shapes. That's expected - they deliberately distort cell boundaries away from plain polygons into star/wave/radial forms. If you want a standard cracked-glass look, stick with euclidean; reach for the kaleidoscope options when you specifically want that decorative distortion.
Feature modulation feels too extreme or too subtle. Before touching strength or feature_threshold, check formula/a/b - an Exponential or Cubic curve with aggressive a/b values will make small feature changes swing a parameter hard near one end of its range, which can look "broken" when it's actually the curve shape doing exactly what you set it to do.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| strength | FLOAT | 1.000β1 | Overall strength of the feature modulation (0.0 to 1.0) |
| feature_threshold | FLOAT | 0.000β1 | Threshold for feature activation (0.0 to 1.0) |
| feature_param | COMBO | Choose which parameter to modulate: - scale: Dynamically adjust cell size - detail: Dynamically adjust number of cells - randomness: Dynamically adjust cell randomness - seed: Dynamically change pattern - x_offset: Dynamically adjust horizontal position - y_offset: Dynamically adjust vertical position - None: No parameter modulation | |
| feature_mode | COMBO | relative | How to apply the feature modulation: - relative: Changes are centered around the original value - absolute: Changes scale directly from zero to the maximum |
| masks | MASK | Input mask or sequence of masks to be processed (MASK type) | |
| invert | BOOLEAN | false | When enabled, inverts the mask output (black becomes white and vice versa) |
| subtract_original | FLOAT | 0.000β1 | Amount of the original mask to subtract from the result (0.0 to 1.0) |
| grow_with_blur | FLOAT | 0.00β10 | Amount of Gaussian blur to apply for mask growth (0.0 to 10.0) |
| mask_strength | FLOAT | 1.000β1 | Overall strength of the mask effect (0.0 to 1.0) |
| distance_metric | COMBO | Method used to calculate distances in the Voronoi diagram | |
| scale | FLOAT | 1.00.1β10 | Base scale of the Voronoi cells (0.1 to 10.0) |
| detail | INT | 10010β1000 | Number of Voronoi cells (10 to 1000) |
| randomness | FLOAT | 1.00β5 | Degree of randomness in cell placement (0.0 to 5.0) |
| seed | INT | 00β18446744073709550000 | Random seed for reproducible results |
| x_offset | FLOAT | 0.0-1000β1000 | Horizontal offset of the Voronoi pattern (-1000.0 to 1000.0) |
| y_offset | FLOAT | 0.0-1000β1000 | Vertical offset of the Voronoi pattern (-1000.0 to 1000.0) |
| formula | COMBO | Mathematical formula for feature value mapping ('Linear', 'Quadratic', 'Cubic', 'Sinusoidal', 'Exponential') | |
| a | FLOAT | 1.00.1β10 | First parameter for fine-tuning the chosen formula (0.1 to 10.0) |
| b | FLOAT | 1.00.1β10 | Second parameter for fine-tuning the chosen formula (0.1 to 10.0) |
| opt_featureopt | FEATURE | Optional feature input for modulation Connect any feature node here to control the effect. Features can come from audio, motion, color, or other sources. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | β |