Nodes/ComfyUI_KubaNodes/kubakub mask animate
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.

By kubakubkub·Created 15 days ago·Updated 3 days ago· 9
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)

NameTypeDefaultDescription
effectCOMBOrevealAlong 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).
curveCOMBOrampHow 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.
cycleFLOAT2.000.01–3600Speed: seconds for one cycle of the curve (for beats and hits: seconds the ramp takes after each one).
value_fromFLOAT0.00-100–100The 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_toFLOAT1.00-100–100The value at the top of the curve.
easingCOMBOlinearramp, saw, triangle, beats and hits: how the ramp starts and stops.
softFLOAT0.050–1reveal / hide / band / rings: how soft the moving edge is (0 = hard, 1 = the whole field fades at once).
widthFLOAT0.200.01–1band / rings: how wide a stripe is (1 = the whole field).
ringsINT31–64rings: how many stripes.
trailFLOAT0.000–60Seconds a place keeps glowing after the mask has moved on. 0 = no trail.
fpsFLOAT25.001–120Frames per second.
secondsFLOAT0.00–3600Length. 0 = the length of the sound, else of the mask batch, else 4 s.
scaleFLOAT1.000.05–1Size of the masks relative to the input (RAM: 250 masks at 3840x2160 = 8 GB).
maskoptMASKWhat 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.
fieldoptMASKFor reveal / hide / band / rings: the grey ramp from kubakub mask field. Empty = a left to right ramp over the mask.
audiooptAUDIOFor 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).
phaseoptFLOAT0.000–1Where in its cycle the curve starts (0.5 = half a cycle later).
dutyoptFLOAT0.500.01–0.99square: the part of the cycle it is on (0.1 = short flashes).
seedoptINT10–2147483647random / noise: another run.
listenoptCOMBOeverythingsound level: the whole sound, or only its low (kick, bass), mid or high (hats, clicks) frequencies.
gainoptFLOAT1.000–10sound level: how strongly the loudness drives the value.
releaseoptFLOAT0.150–5sound level: seconds the value takes to fall after a peak.
nthoptINT11–64beats / bars / hits: only every nth one counts.
stepsoptINT11–512beats / 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).
thresholdoptFLOAT0.300–1low / mid / high hits: how strong a hit has to be to count.
gapoptFLOAT0.100–10low / mid / high hits: the shortest time between two.
bpmoptFLOAT0.00–400beats / bars: a tempo you know. 0 = found in the sound.
startoptFLOAT0.00–3600Seconds into the sound where the frames start.
pivotoptCOMBOmask centrerotate / scale: around the mask's own centre or the middle of the picture.
wrapoptBOOLEANfalsemove: what leaves on one side comes back in on the other.

Outputs (5)

NameTypeDescription
masksMASKOne mask per frame.
fpsFLOATFrames per second.
audioAUDIOThe sound, cut to the frames (silence without one).
frame_countINTHow many frames.
reportSTRINGFrames, size, the range of the curve, tempo or hits found.