Skip to content

Refine mask

Refine mask is a rotoscoping workspace for an Object mask modifier. You keep the AI matte where it is right and correct it where it is not, with shapes, strokes, paint, detail bands and local re-tracks. Done bakes the result back into the Object mask.

Select the clip, then find its Object mask modifier in the inspector. Once the mask exists, the modifier shows a Refine mask… button. After you have refined a mask once, the same button reads Edit refinement… and reopens your work.

On a read-only project the button is greyed out and the modifier says Read-only on this Mac, so Refine is off.

Refine takes over the editor while it is open. The picture stays exactly where the program monitor had it.

Area What it holds
Tool bar, above the picture The title Refine mask, the tools, the zoom menu, Keyboard shortcuts, Cancel and Done
Picture The clip’s frame with the matte drawn in the current view
View bar, under the picture The five views, Outlines, Onion skin, Motion path and Stabilize
Layers, on the left The AI mask row, your shapes, strokes and bands, and Paint
Inspector, on the right Settings for the selected layer, or for the whole mask when nothing is selected
Dope sheet, in the timeline’s place The transport, the AI stability lane, one lane per layer, track lanes and the paint lane

Press ? to show every key on one sheet over the picture. Click anywhere on the sheet to close it.

Tool Key What it does
Select V Selects and moves shapes and points. ⌥-click a point toggles corner and smooth
Pen P Draws a closed shape. Clicking a segment of an existing shape inserts a point
Detail band (no key) The band button beside the Pen. While it is on, the Pen draws detail bands instead of shapes
Stroke S Draws an open spline with a width. ↩ finishes it
Brush B Paints into the matte on this frame only. ⌥-drag removes
Hand H Pans the picture. ⌘-drag also pans

The tool bar’s Track button tracks the selected shape over the whole clip. See track a shape over a clip.

Z toggles between Fit and the selection. The zoom menu offers Fit, 50%, 100%, 200%, 400% and 800%. 100% is one point per source pixel.

View Key What you see
Shapes 1 Your shapes over the plate
Overlay 2 The plate, tinted outside the matte
Alpha 3 The matte in black and white
Trimap 4 Solid foreground in white, detail bands in grey, the rest in black
Comp 5 The cut-out over a backing: checker, black, grey or white

O toggles Outlines. T toggles Stabilize, which holds the tracked shape still on screen while the plate moves around it.

The matte is composed from these, top of the list first:

  • AI mask is the Object mask’s own matte, plus any AI re-tracks you have landed. When the stability check finds bad frames, the row shows an amber count such as 12 unstable. The AI mask switch in the inspector’s Mask section hides it.
  • Shapes are closed outlines, keyed over time. Each one has a blend: Add, Subtract or Intersect.
  • Strokes are open splines with a Width.
  • Detail bands key the plate against a backing colour inside their outline, to recover hair and other soft edges. See refine hair and soft edges.
  • Paint is per frame. A brush stroke stays on the frame you paint it on, plus any frames you set with Hold in the brush options.

Drag rows to reorder them, or drop one onto another to parent it. Each row has a visibility toggle (⌥-click solos the layer) and a lock.

A shape’s outline is keyed. K sets a key on the current frame and ⇧K sets one halfway between the keys either side. ⇧← and ⇧→ jump from key to key.

With Auto on in the transport, an edit on a frame with no key adds a key there. With it off (the button reads Auto off in amber), an edit changes the shape on every key.

Edits apply to at the top of the inspector picks how far an edit reaches: This key, All keys, or the keys you selected in the dope sheet. While it is set to anything but This key, a chip over the picture says so. Selecting another layer puts it back to This key.

Done closes the workspace at once and renders the refined matte in the background. The toast reads Rendering refined mask · keep working. The clip keeps its previous matte until the render finishes, then switches over as one undo step in the editor.

Cancel throws away every edit made since Refine opened. If you made any, Cask Film asks Discard your Refine changes? first, with Discard changes and Keep editing.

While Refine is open, ⌘Z, ⇧⌘Z and the editor’s undo buttons act on your Refine edits. A landed track or re-track is one undo step.

Closing Refine stops any track or re-track still running, and the toast names the layers it stopped.

Refine work is stored inside the project package, under masks/ in a folder per Object mask. The baked matte movies, AI re-track passes (passes/), stability reports (quality/) and track data (tracks/) all live there, so they travel with the project.

Agents connected over MCP can do the same work with the roto tools. See Agent Access in Cask Film.