Nodes/ComfyUI_KubaNodes/kubakub mask field
ComfyUI Node

kubakub mask field

Regions as a grey ramp instead of on / off: black is where a move starts, white where it ends. The distance from each region's edge, a direction, the distance from a point, one step per region in an order, or noise. kubakub mask animate runs a reveal, a band or rings along it; it also works as a soft mask or a time offset in any other tool. Nothing connected = the windows of the sample facade.

By kubakubkub·Created 15 days ago·Updated 3 days ago· 9
kubakub mask field
  • regions
  • mask
  • field
  • mask
  • report
◄select*►
◄fieldedge distance►
◄pereach region►
◄angle0►
◄orderleft►
◄centre_x0.50►
◄centre_y0.50►
◄noise_px64►
◄seed1►
◄invertfalse►
◄split_shapestrue►
Categorykubakub/2d/masks

Inputs (13)

NameTypeDefaultDescription
selectSTRING*Which regions, in plan syntax: 'W_F1_*', 'group:Windows', 'tag:front', comma = or, space = and, '!' = not. * = all.
fieldCOMBOedge distanceedge distance: black on the edge of a region, white at its deepest point. direction: black to white along 'angle'. radial: black at the centre, white farthest out. region order: one flat grey per region, in 'order'. noise: soft random greys.
perCOMBOeach regioneach region: every region runs from black to white on its own (all windows open at once). all together: one ramp over all of them (a wipe across the facade). No effect on region order and noise.
angleFLOAT0-360–360direction: degrees. 0 = left to right, 90 = top to bottom, 180 = right to left.
orderCOMBOleftregion order: which region comes first. left / right / top / bottom = from that side; centre = from the middle out; outside = towards the middle; size = the biggest first; random.
centre_xFLOAT0.50-1–2radial, all together: the centre, 0 = left edge of the picture, 1 = right edge.
centre_yFLOAT0.50-1–2radial, all together: the centre, 0 = top edge, 1 = bottom edge.
noise_pxFLOAT642–4096noise: the size of the blobs in pixels.
seedINT10–2147483647noise and region order = random: another pattern.
invertBOOLEANfalseBlack and white swapped: the move runs the other way.
regionsoptKUBA_REGIONSFrom any kubakub regions node. Empty (and no mask) = the windows of the sample facade.
maskoptMASKInstead of regions: a mask or a mask batch. Each mask is a region; with split_shapes each separate shape is one.
split_shapesoptBOOLEANtruemask input: on = every separate shape is its own region; off = one region per mask.

Outputs (3)

NameTypeDescription
fieldMASKThe grey ramp, 0 to 1 inside the regions, 0 outside.
maskMASK1 on the regions the field covers. Connect it to 'mask' of kubakub mask animate.
reportSTRINGHow many regions, the size, and what was used when nothing was connected.