Matte Centroid to animated XY

MATTE CENTROID

Tracks the average center of an input matte and stores its position as animated XY values.

SETUP

1. Import MatteCentroid.nk into your Nuke script.

2. Connect your matte source to the node's input.

3. Open the Matte Centroid tab.

4. Set First frame and Last frame.

5. Set Reference frame to a frame inside the analysis range that contains a visible matte.

6. Choose Matte channel.

7. Click Analyze centroid.

The "Use project range + current reference" button copies the project's frame range and sets the current timeline frame as the reference.

CONTROLS AND RESULTS

Minimum matte weight: Frames at or below this total matte weight are treated as empty. Leave the default unless faint noise is being detected as a matte.

Centroid XY: The matte's weighted center in pixels, measured from the bottom-left of the image.

Motion from reference: The centroid's displacement from its position at the reference frame. Both values are zero on the reference frame.

Valid matte: 1 when a usable matte was detected; 0 on empty frames and outside the analyzed range.

Total matte weight: The sum of matte pixel values after clamping them to 0–1.

Analysis status: Displays the analyzed range, reference frame, channel, and number of empty frames.

First submitted: 24 September 2026

Author: Heikki Nummi

Compatible Nuke versions: 13.0 or later

Compatibility: Linux, Mac, Windows

or register to download or rate.

Comments

or register to join the conversation.

Download Verification