Stoatworks Labs

nib

Flow-guided line drawing for Resolume

Betav0.1.5Plugin & ModuleC++ / GLSL
nib — Flow-guided line drawing for Resolume
nib

What it does

nib draws. It makes strokes, the kind that stay joined along their length and close round a shape, on a paper colour you pick. Think pen and ink, charcoal, a technical drawing or a cyanotype. If you want a neon outline, plenty of other effects will happily give you one.

The difference is the order it asks the questions in. A conventional edge effect asks one question per pixel: how fast is the tone changing here? The answer's a magnitude, and a magnitude has no idea of direction, so it can't tell a stroke from a speck, and what it decides at one pixel has nothing to do with what it decides at the next one along the same line. nib asks about direction first, builds a flow field over the whole frame, and then steers two filters by it, one across it and one along it: a band-pass across the flow, which is the only direction a band-pass measures an edge in at all, and a line integral convolution along it, which is what joins the per-pixel answers up into a stroke.

You can check that two ways. Turn Flow to zero and the second filter is skipped, leaving plain isotropic XDoG, the effect without the idea in it. That comparison ships as one of the presets, so it's one click rather than an argument. And the flow field itself is measured: the offline harness renders concentric rings whose tangent direction is known in closed form, adds noise, and reports how many degrees the plugin's own answer is off, using the same shader code that ships.

Detection runs on whichever channel actually carries the drawing, and that isn't always luminance. A red line on a blue field has loads of chroma contrast and almost none in luma, so detecting on saturation is an ordinary setting rather than an exotic one. Over time it's lopsided on purpose: ink appears at once and fades slowly, because a line that arrives late has been drawn on the wrong frame.

  • An edge tangent flow field steering the filters, rather than a per-pixel magnitude
  • Difference of Gaussians across the flow, line integral convolution along it
  • Flow at zero falls back to plain XDoG, shipped as a preset so the comparison is one click
  • Detect on luminance, a single channel or saturation — whichever carries the drawing
  • One to three passes, each darkening what the last believed, which is what closes gaps
  • Asymmetric temporal stability: ink appears at once, fades slowly
  • Ink and paper colour, the clip itself as paper, or nothing at all for an alpha layer
  • Eight factory instruments: Pen and Ink, Unguided (XDoG), Charcoal, Technical Pen, Alpha Ink, Overlay, Cyanotype, Woodcut

Where it stands

v0.1.5, and early days. The point releases since v0.1.1 brought a Windows installer that no longer touches the system PATH (the earlier one could overwrite it), dependency upkeep, the name SW Nib so the Stoatworks plugins sit together in Resolume's browser, and in v0.1.5 a log file that actually gets written. The plugin had always logged, but the logger was never initialised, so every line went straight in the bin. It's never been loaded into Resolume. Everything here is checked through the offline harness, which drives the real plugin class headlessly rather than a mock. There's no OpenFX port. The harness picked up the fleet's frame-piping mode after v0.1.5, with no change to the plugin, and that's how the video was rendered: over Resolume's bundled demo clips, not captured from Resolume. It's only been measured on macOS (Apple Silicon): 0.66 ms a frame at 720p, 1.51 at 1080p and 6.60 at 4K. A Windows installer ships from CI, but nothing has run it in a host. Try it in your own rig before you trust it in a show.

Watch it running

nib video thumbnail

Nothing loads from YouTube until you press play.Watch it there instead