Stoatworks Labs

Asciify

ASCII art with edges that lean the right way, for Resolume

Stablev1.0.6Plugin & ModuleC++ / GLSL
Asciify — ASCII art with edges that lean the right way, for Resolume
The repo's type card at 80 columns, rendered by the plugin's own offline harness in a headless GL context — not a Resolume screen capture. A tone ramp on the left, bars at eight angles in the middle, and concentric rings on the right, which is where the shape matching is easiest to see.

What it does

A character renderer for Resolume Arena and Avenue. The frame is cut into character cells and each cell is swapped for the character that stands in for it best, and the interesting bit is what counts as best.

Most ASCII art is a brightness ramp: measure a cell, look the value up in a hand-typed string like " .:-=+*#%@" and print that character. It works, and it throws away every edge in the picture. Asciify treats each cell as a little picture instead and picks the character whose ink is spread out most like it. It measures two things on the same 8×8 grid, for the cell and for every glyph: how much ink there is, and where it sits. That second one is enough to tell | from -, / from \, and . from ', so edges start choosing characters that lean the right way.

There's no edge detector and no threshold anywhere in it. A cell with a diagonal in it just has a shape vector pointing the same way a slash does. Two things come out of that without anyone adding them. Structure at zero is the classic ramp, with no separate code path, because weighting the shape term down to nothing leaves a nearest-neighbour lookup by weight. And flat cells ignore the control completely, because a cell with no direction has nothing to be wrong about.

Nothing in it holds a dark-to-light order either. The font is drawn in the source, every glyph's ink is measured off its bitmap, and the ramp comes out of that, so a custom alphabet works whatever order you type it in. On this font, the measured order of the traditional ramp turns out to be ".-:+=*%#@", which isn't the string everybody copies. The hyphen outweighs the colon, and the percent sign is lighter than the hash.

There's also an OpenFX plugin for DaVinci Resolve, Vegas Pro, Nuke and Natron, with the same font, the same measured ramp and the same moment matching, rendered on the CPU.

  • Structure — how far the match may stray from the correct weight to get the shape right; at zero it is the classic tone ramp
  • Columns from 8 to 320, with rows following the output aspect so cells stay square and characters are never stretched
  • Nine alphabets — ASCII, letters, digits, symbols, the classic ramp, binary, block elements, box drawing, and a custom set you type yourself in UTF-8
  • Block elements are the only characters that reach solid black and white, so that set is the one that can be photographic; box drawing has almost no tonal range and is chosen essentially on structure alone
  • Tone and contrast with the neutral setting in the centre of the slider, and an ordered dither of exactly one quantisation step for short alphabets
  • Ink and paper colours, a Tint control that hands the ink over to the clip's own colour, and a paper opacity that leaves the background transparent so only the characters composite
  • Universal macOS bundle, a Windows DLL, and an OpenFX bundle for macOS, Windows and Linux

Where it stands

Released, and on the 1.0 line at v1.0.6. The OpenFX build for Resolve, Vegas, Nuke and Natron arrived in v0.2.0. Since then it's been dependency and CI upkeep, plus v1.0.4's Windows installer, which no longer touches the system PATH (the earlier one could overwrite it), v1.0.5's proper description in the field Resolume shows for an effect, and v1.0.6's new name, SW Asciify, so the Stoatworks plugins sit together in Resolume's browser. Which character a cell picked is a fact rather than a matter of taste, so it's checked like one: the plugin renders at one output pixel per glyph pixel, every cell gets read back and named, and the answers are compared with a separate C++ version of the same matching. That's 43 runs of 960 cells across every character set with no disagreements, and all eighteen controls, the text field included, change the output. The macOS universal bundle, the Windows DLL and the Linux OpenFX bundle all build in CI, and the Linux one is loaded in a Rocky 8 container and asked for the entry points a host calls first. FFGL stays macOS and Windows, because Resolume has no Linux build. Still open: it's never been loaded into Resolume, so how the controls look in the host is untested (including whether the custom-alphabet text field shows up at all), and its performance has never been measured.

Watch it running

Asciify video thumbnail

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