CCU
A camera chain, every knob out, for Resolume

What it does
An FFGL effect for Resolume Arena and Avenue. The “video” look of a studio or OB camera comes from a processing chain in a fixed order, each stage a known circuit, and each knob one that a shader turns on the camera control unit's panel. CCU puts those stages in that order, in linear light, and labels the knobs the way a CCU labels them: master gain, white balance, matrix, detail, knee, gamma and black gamma, pedestal, white clip.
What comes out is every badly set-up camera look, and none of it is drawn. Detail adds a high-passed copy made from pixel and line delays, so a hard edge overshoots on one side and undershoots on the other for the width of the delay rather than the width of the edge: that's the halo. Coring keeps detail off the noise, so low coring sharpens the grain and high coring gives the picture a plastic coat. A hue window holds detail back on skin, so faces go soft while the jacket stays sharp. The knee squashes highlights so skies keep their colour; turn it off and they clip, and because the knee comes after white balance, a warm white clips in one channel first. Black gamma lifts the shadows below its level and nowhere else, and the white balance drifts slowly, the way a camera still warming up used to.
Nothing carries over from frame to frame except the drift, an Ornstein-Uhlenbeck walk in double precision on the CPU. The chain is two GLSL passes: the linear pass (linearise, master gain, white balance, matrix) into an RGBA32F buffer, and the process pass (detail, knee, gamma, black gamma, pedestal, white clip, mix) into the host's framebuffer. The OETF is a family with the exponent as the control, and its constants, the matrix and the drift's step are worked out in double once a frame. Every detail tap is a texelFetch, so nothing depends on a texture unit's filtering.
Twenty-three controls in eight groups, each one 0 to 1 as far as the host's concerned, with its null exact in binary: Master Gain from -6 to +18 dB, Master Black and White Clip, R and B gains about green, Drift in mireds, four generic matrix presets and a Saturation, Detail Level and Crispening Freq (the delay, 1 to 9 pixels), H/V Ratio, Coring, Level Dependence, Skin Detail with its hue and width, Knee On, Point and Slope, Gamma and Black Gamma, Mix, and a Show Detail view of the detail signal for setting up.
There's an OpenFX version too, for DaVinci Resolve, Vegas Pro, Nuke and Natron: the same chain and the same controls, rendered on the CPU from the control laws the shader is held to. There the drift is a function of the frame number, so a frame renders the same on its own as it does in sequence.
- A broadcast camera's chain in its fixed order, in linear light, with the knobs labelled as a CCU labels them
- Detail from pixel and line delays: halos the width of the delay, coring against the noise, level dependence in the shadows, a skin window
- A per-channel knee after white balance, so a warm white compresses in red where the other order would clip it
- The OETF as a family: Gamma sets the exponent, Black Gamma lifts below 0.25 video only
- Master Gain as head-end gain in linear light, pedestal and white clip on video
- White balance that drifts on a 20 s random walk in mireds, never a jump
- Show Detail: the detail signal about mid grey, for setting the delay and coring by eye
- Universal macOS bundle and a Windows x64 DLL
Where it stands
v0.2.0, which adds the OpenFX build, and early days. It hasn't been loaded into Resolume on macOS yet; the only host it's run in there is the fleet's own test host. What it does is measured by an offline harness that drives the real plugin in a headless GL context and reads each claim back out of the picture it made, at 320x180 and 1280x720. Every stage at its null hands back the test picture within a bound worked out from the OETF round trip, alpha bit for bit, and again after a resize. The detail overshoot is the right size and lasts exactly the delay, horizontally and vertically, whole and fractional. Coring, the knee slope, the OETF, black gamma and the skin window all do what the maths says they should, and red pushed through white balance and then the knee lands where that order predicts and nowhere near the other order. Eight broken models each fail their check, a one-character sabotage of the shipped GLSL is caught by five checks, and all 23 controls change the picture at both rasters. On macOS it costs 0.06 ms a frame at 720p, 0.17 at 1080p and 0.7 at 4K. The clip stands in for scene light, so an 8-bit clip's white is the top of what the chain sees, and on footage the knee gets its whole character from the gains. There's a user guide, but no presets and no luma knee. Try it in your own rig before you trust it in a show. The OpenFX build has been checked in DaVinci Resolve Studio 21.1 on macOS; Vegas, Nuke and Natron are untried.
Watch it running
Nothing loads from YouTube until you press play.Watch it there instead