Stoatworks Labs

Tilter

Makes a city look like a model railway, for Resolume

Stablev0.1.6Plugin & ModuleC++ / GLSL
Tilter — Makes a city look like a model railway, for Resolume
Rendered by the plugin's own offline harness in a headless GL context — not a Resolume screen capture. Real frames through the real shipped shaders.

What it does

A tilt-shift lens is one whose plane of focus isn't parallel to the sensor. Photographers bought them to stop buildings leaning over, and everyone else discovered that pointing one at a city from a long way up makes it look like a model railway, because the eye only ever sees a plane of focus that shallow on things a few inches across.

The plugin works out how far each pixel is from focus, writes that down as a single signed number, and a blur uses it. The two halves never touch, so four focus shapes and two blurs are six pieces of code rather than eight effects, and the Show Focus overlay is a view of the same buffer the blur reads, not a separate drawing of it.

Tilted Plane is the shape worth understanding, because what you'd expect of it is wrong. On a flat subject a real tilted lens gives you a straight band, so it isn't just a Linear Band in a different shape. The difference is the falloff. A lens blurs by the difference in inverse depth, and nothing is further away than infinity, so on the far side the blur ramps up and then stops at the horizon (sky, distant hills and the backs of buildings all sharing one blur), while on the near side it grows without limit. A plain band ramps the same both ways and keeps going, and the missing lopsidedness is what people's eyes catch when a fake tilt-shift looks wrong.

The bokeh path gathers over a proper aperture, circular or five to nine blades, and weights every sample by its own brightness, which is what makes a streetlight bloom into a visible hexagon instead of a soft smudge. The Gaussian path is the cheap option, and it does smear them.

Also available as an OpenFX plugin for DaVinci Resolve, Vegas Pro, Nuke and Natron. The focus field and every parameter curve are the same source files both builds compile, so a preset can't mean one thing in Resolume and another in Resolve.

  • Four focus shapes — a linear band at any angle, a radial iris with an adjustable aspect, a tilted plane with a real horizon and a swing, and a guess at depth from the picture's own haze
  • Bokeh gather with a real aperture: circular or 5 to 9 blades, rotatable, with highlight weighting that turns bright points into aperture shapes
  • A cheaper separable Gaussian for when the show needs the headroom
  • Show Focus paints the focus field over the picture — warm for the near side, cold for the far side — so a focal plane is placed by looking rather than by squinting at softness
  • Saturation, contrast, vignette, and a lateral aberration that grows with defocus and reverses across the plane of focus the way real glass does
  • Eight factory presets, from Model Village to Anamorphic Dream, driven from one table shared by both builds
  • Blur radius is a fraction of the frame height, so the same setting looks the same at 720p and 4K
  • Universal macOS bundle, a Windows x64 DLL, and an OpenFX bundle for macOS, Windows and Linux

Where it stands

Built, measured and released as v0.1.6. v0.1.4 only changed the Windows installer, which no longer touches the system PATH (the earlier one could overwrite it); v0.1.5 keeps a factory preset selected when the host restates its own values, and gives the effect a proper description in the field Resolume shows; v0.1.6 only changed the name Resolume lists it under, now "SW Tilter", so the Stoatworks plugins sit together in its browser. It's been loaded into Resolume Arena on macOS and works, so it registers, instantiates and renders in a real host, which is the one thing an offline harness can't establish. The focus field exists twice, in C++ and in GLSL, and an offline harness reads the circle-of-confusion buffer the GPU actually wrote and compares it with the C++ across all four shapes. The three analytic ones agree to the 16-bit float quantum, as close as the buffer can represent, and a control case compared against the wrong shape duly disagrees. The blur is required to make the picture smoother across its control, the aperture's shape and size are measured in the rendered frame, all 26 controls are shown to change the picture, and 19 checks run from a clean universal build. That testing found three real defects along the way, including a blur that aliased its own source at large radii (fixed with a box prefilter in front of it) and a focus overlay with near and far the wrong way round, which every automated check passed and only a contact sheet caught. Still open: the OpenFX build has never been opened in Resolve, only driven by a test probe, and the Windows build is made in CI and has never been run. One known limit comes with the method rather than being a bug: an isolated highlight of two or three pixels won't form a clean bokeh disc, because a gather blur takes too few samples of it. Highlights of about ten pixels and up are fine.

Watch it running

Tilter video thumbnail

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