Stencil
Spray paint through a cut stencil, for Resolume

What it does
An FFGL effect for Resolume Arena and Avenue. The clip is cut into a stencil and paint is sprayed through it. A stencil is a sheet with holes, and a stencil cannot hold a floating piece: the middle of an O, the counter of an A, an island of light inside a shadow would fall out. So a cutter leaves bridges, thin strips of sheet that tie every island to the rest, and the plugin cuts them the same way.
The clip's tone is cut at one to four thresholds, and each layer's sheet is labelled into pieces on the CPU. Every piece that does not reach the frame's edge is an island and gets the shortest bridge there is from it to any other piece, found by a jump flood on the GPU that carries two seeds a texel: the nearest sheet, and the nearest sheet of a different piece. An island bridged to another island still floats, so it goes round again until nothing does. The paint is then the holes convolved with the nozzle's disc of footprint, with some creep under the sheet and drips where it runs over.
What falls out is the look of a real stencil. Every enclosed shape is broken where its ring is thinnest; rings inside rings are tied on one to the next until everything hangs off the frame; the layers are sprayed lightest first, so n layers give n + 1 tones and a dark layer's bridge shows the paint beneath; the halo across every edge widens with Distance; with Lift up the bridges read as ghostly lines; and paint over saturation runs down in drips.
Cut controls set the layers, the threshold, Invert (paint the light), a smoothing blur, the bridge width and the smallest island kept. Spray controls set the nozzle's distance, the pressure, the lift and the drips. Paint controls choose the cans (five palettes, or each layer's own colour from the clip) and the wall: the clip, brick, concrete or plain.
- No island of sheet floats, counted by a flood fill of the output itself
- Every bridge exactly the shortest gap from its island to another piece, checked against brute force
- One to four layers sprayed light to dark, each with its own bridges
- The edge profile the chord fraction of the nozzle's disc, to one half-float ulp
- Last frame's bridges kept while they stay within a texel of the shortest, so a still clip's bridges hold still
- Invert, five palettes or the clip's own colours, and brick, concrete, plain or clip walls
- Universal macOS bundle and a Windows x64 DLL
Where it stands
v0.1.0, and honestly early. The stencil is measured, not asserted, by an offline harness that drives the real plugin class headlessly and reads every property back out of the picture: after bridging, a flood fill of the output finds no piece of sheet cut off from the frame, on letters, rings nested four deep, squares in squares and random blobs; every bridge is exactly the shortest gap from its island to another piece, against brute force; bridges are exactly the stated width and stay 4-connected; the edge profile is the chord fraction of the nozzle's disc; n layers give n + 1 tones; and last frame's bridges survive a resize. Nine deliberately broken models each fail their check, and all 14 controls change the picture. It is heavy for a VJ effect: about 9 to 22 ms a frame at 1080p on the demo clips at the defaults (two layers), about half that with one. One bridge per island per pass, always the shortest; on moving footage kept bridges hold still in the frame and then step. Filming found that a bright subject on transparency paints nothing unless Invert is on. It has not yet been loaded into Resolume on macOS. On Windows it has: a build of this source loads, registers and renders in Resolume Arena 7.27.1 on software rendering (win-lab, no GPU), with every parameter as declared and all 14 controls moving the picture. The macOS build is Developer ID-signed and notarised. There is a user guide and a browser demo, whose CPU cutter is a JavaScript port only a reader checks; no presets and no OpenFX port. Check it in your own rig before trusting it in a show.
Watch it running
Nothing loads from YouTube until you press play.Watch it there instead