Oink
Nodes

AIRoto

AIRoto: click on the plate in the Viewer to add an object (Shift/Alt+click removes, drag draws a box); the mask shows at once.

raw .md

AIRoto: click on the plate in the Viewer to add an object (Shift/Alt+click removes, drag draws a box); the mask shows at once. Track from the frame you are on: Z back, X one back, C one forward, V forward (or the panel buttons), stopping at the in / out points; ■ stops and keeps the frames done. Clicks on any other frame, then tracking from there, re-track only from that frame. The state line and Details log say exactly what the AI is doing. Grow / shrink, edge smooth and feather shape the mattes and apply at once on the saved result (no model re-run); Deduplicate Held Frames reuses the matte of repeated frames (animation on 2s). Mattes go to alpha, airoto_ layers and CryptoAIRoto00. Models: Auto (SAM 2.1, or EfficientTAM-S when GPU memory is low), SAM 2.1, EfficientTAM-S / -Ti, EdgeTAM (Apache-2.0), SAM 3 / 3.1 (SAM License, text).

NodeAIRoto
Type idOC_N_airoto
MenuAI › AIRoto
Nuke classnone: saved in .nk files as an Oink node
Codeopencomp_core/nodes/ai/airoto.py

AIRoto properties

What you get / next steps

  • Alpha: the output's alpha is the union of the enabled objects (alpha knob: replace, multiply or keep the input alpha). Use it like any matte: Premult, Merge, or as the mask input of a Grade, Blur or ColorCorrect.
  • One layer per object: airoto_<name> holds that object's matte in r, g, b and a. Pick it in the Viewer's layer menu, or in a node's mask channel, to grade one object only.
  • Cryptomatte: CryptoAIRoto00 carries an exact ID per object; a Cryptomatte node picks objects by name with Ctrl+click.
  • Convert to Roto (panel): makes a Roto node on the plate with one animated bezier shape per enabled object, named and coloured like the object (MaskToSpline: adaptive keys or a key on every frame, fit tolerance, smoothing). One undo step; progress in the state line and Details. Edit the splines like any Roto shape, then refine them with SmartRoto.

Inputs and outputs

PortNameType
input 0Imageimage
output 0Imageimage

Knobs

Panel tab Airoto, in panel order.

KnobLabelTypeDefaultRange / valuesNuke knobDescription
modelmodelmenuAUTOAUTO (Auto (SAM 2.1, light when VRAM is low)), SAM2 (SAM 2.1 Large), EFFICIENTTAM (EfficientTAM-S (light)), EFFICIENTTAM_TI (EfficientTAM-Ti (lightest)), EDGETAM (EdgeTAM (fast)), SAM3 (SAM 3 (text)), SAM31 (SAM 3.1 (text, multi-object))
alpha_modealphamenuREPLACEREPLACE (replace), MULTIPLY (multiply), KEEP (keep)
outsideoutside rangemenuHOLDHOLD (hold), BLACK (black)
soft_edgessoft edgesbooltrueModel probability as a soft edge (off = hard 0/1)
output_cryptocryptomattebooltrueAdd the CryptoAIRoto00 ID layer
mask_growgrow / shrinkfloat0-100 to 100Grow (> 0) or shrink (< 0) every matte by this many pixels
mask_featherfeatherfloat00 to 200Soften every matte's edge (Gaussian, px)
mask_smoothedge smoothfloat00 to 20Smooth jagged / boiling edges (blur then re-sharpen, px); keeps the edge position
dedupededuplicate held framesboolfalseDetect repeated frames (animation on 2s, held frames) and reuse their matte instead of re-tracking them (no edge boil)
dedupe_thresholdheld frame thresholdfloat0.0020 to 0.1Mean absolute difference (0..1 display values) under which a frame counts as a repeat of the previous one

Other knobs (Python, .nk and the assistant; not on the panel)

KnobLabelTypeDefaultRange / valuesNuke knobDescription
gl_colorViewer Controls Colorfloat ×30, 0, 00 to 1
postage_stamp_frameStatic Frameint1-2147483648 to 2147483647
lifetimeStartLifetime Startint0-2147483648 to 2147483647
lifetimeEndLifetime Endint100-2147483648 to 2147483647
useLifetimeUse Lifetimebooleanfalse
cachedCachedbooleanfalse
bookmarkBookmarkbooleanfalse
dope_sheetDope Sheetbooleanfalse
clone_groupClone Groupstring
link_sourceLink Sourcestring
link_overridesLink Overridesstring
split_viewsSplit Viewsstring
track_inTrack Inint0-2147483648 to 2147483647First frame Track backward goes to (0 = project first frame)
track_outTrack Outint0-2147483648 to 2147483647Last frame Track forward goes to (0 = project last frame)
current_objectCurrent Objectint00 to 2147483647
text_promptTextstringText Select: what to find, e.g. 'person' or 'car. dog'
objects_dataObjectsstring[]
prompts_dataPromptsstring[]
results_dataResultsstring{}

Nuke equivalent

No Nuke class. In a .nk file this node is written as an Oink node that Nuke will not recognise.

Examples

Open these from Help › Examples…, or from the ? menu in this node's Properties panel.

  • AIRoto: click to roto (examples/ai/airoto_click.oink): AIRoto (SAM 2.1) turns one click on the ball into a matte and tracks it over the sequence. Open the node, click in the Viewer on another object to add it, then press the track buttons.

On this page