ComfyUI Node
kubakub mask animate
A mask that moves: one mask per frame. The effect says what moves (a reveal, a band or rings along a field from kubakub mask field; or the mask itself: move, rotate, scale, opacity). The curve says how it runs over time: ramp, saw, triangle, sine, square (strobe), random, noise, or a sound (its level, beats, hits). 'trail' leaves a fading trace. Chain two of these nodes for two moves at once (masks into mask). The curve is drawn on the node. Nothing connected = a sample.
kubakub mask animate
- mask
- field
- audio
- masks
- fps
- audio
- frame_count
- report
◄effectreveal►
◄curveramp►
◄cycle2.00►
◄value_from0.00►
◄value_to1.00►
◄easinglinear►
◄soft0.05►
◄width0.20►
◄rings3►
◄trail0.00►
◄fps25.00►
◄seconds0.0►
◄scale1.00►
◄phase0.00►
◄duty0.50►
◄seed1►
◄listeneverything►
◄gain1.00►
◄release0.15►
◄nth1►
◄steps1►
◄threshold0.30►
◄gap0.10►
◄bpm0.0►
◄start0.0►
◄pivotmask centre►
◄wrapfalse►
Categorykubakub/2d/masks
Inputs (30)
| Name | Type | Default | Description |
|---|---|---|---|
| effect | COMBO | reveal | Along the field: reveal (appears from black to white), hide, band (a stripe travels through), rings (stripes that keep running). The mask itself: move x / move y (value = picture widths / heights), rotate (value = turns), scale (value = size, 1 = as it is), opacity (value 0 to 1; with a square curve = strobe). |
| curve | COMBO | ramp | How the value runs. ramp: once, then it stays. saw: again and again. triangle: there and back. sine: a soft there and back. square: on / off. random: a new value every cycle. noise: wanders. sound level: follows the loudness. beats / bars / low / mid / high hits: each one starts a ramp. |
| cycle | FLOAT | 2.000.01–3600 | Speed: seconds for one cycle of the curve (for beats and hits: seconds the ramp takes after each one). |
| value_from | FLOAT | 0.00-100–100 | The value at the bottom of the curve. reveal / band / rings / opacity: 0 to 1. move: picture widths or heights (-0.5 = half a picture to the left / up). rotate: turns. scale: size. |
| value_to | FLOAT | 1.00-100–100 | The value at the top of the curve. |
| easing | COMBO | linear | ramp, saw, triangle, beats and hits: how the ramp starts and stops. |
| soft | FLOAT | 0.050–1 | reveal / hide / band / rings: how soft the moving edge is (0 = hard, 1 = the whole field fades at once). |
| width | FLOAT | 0.200.01–1 | band / rings: how wide a stripe is (1 = the whole field). |
| rings | INT | 31–64 | rings: how many stripes. |
| trail | FLOAT | 0.000–60 | Seconds a place keeps glowing after the mask has moved on. 0 = no trail. |
| fps | FLOAT | 25.001–120 | Frames per second. |
| seconds | FLOAT | 0.00–3600 | Length. 0 = the length of the sound, else of the mask batch, else 4 s. |
| scale | FLOAT | 1.000.05–1 | Size of the masks relative to the input (RAM: 250 masks at 3840x2160 = 8 GB). |
| maskopt | MASK | What is animated: a mask, or a mask batch (one per frame, e.g. from another kubakub mask animate). For reveal / hide / band / rings it limits the result. | |
| fieldopt | MASK | For reveal / hide / band / rings: the grey ramp from kubakub mask field. Empty = a left to right ramp over the mask. | |
| audioopt | AUDIO | For the sound curves, and passed on to 'audio' for Create Video. A sound curve without a sound runs on a built-in beat (120 bpm). | |
| phaseopt | FLOAT | 0.000–1 | Where in its cycle the curve starts (0.5 = half a cycle later). |
| dutyopt | FLOAT | 0.500.01–0.99 | square: the part of the cycle it is on (0.1 = short flashes). |
| seedopt | INT | 10–2147483647 | random / noise: another run. |
| listenopt | COMBO | everything | sound level: the whole sound, or only its low (kick, bass), mid or high (hats, clicks) frequencies. |
| gainopt | FLOAT | 1.000–10 | sound level: how strongly the loudness drives the value. |
| releaseopt | FLOAT | 0.150–5 | sound level: seconds the value takes to fall after a peak. |
| nthopt | INT | 11–64 | beats / bars / hits: only every nth one counts. |
| stepsopt | INT | 11–512 | beats / bars / hits: 1 = each one runs the whole move again. More = each one moves on by one step of that many (e.g. the number of regions with a 'region order' field: one more region per beat). |
| thresholdopt | FLOAT | 0.300–1 | low / mid / high hits: how strong a hit has to be to count. |
| gapopt | FLOAT | 0.100–10 | low / mid / high hits: the shortest time between two. |
| bpmopt | FLOAT | 0.00–400 | beats / bars: a tempo you know. 0 = found in the sound. |
| startopt | FLOAT | 0.00–3600 | Seconds into the sound where the frames start. |
| pivotopt | COMBO | mask centre | rotate / scale: around the mask's own centre or the middle of the picture. |
| wrapopt | BOOLEAN | false | move: what leaves on one side comes back in on the other. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| masks | MASK | One mask per frame. |
| fps | FLOAT | Frames per second. |
| audio | AUDIO | The sound, cut to the frames (silence without one). |
| frame_count | INT | How many frames. |
| report | STRING | Frames, size, the range of the curve, tempo or hits found. |