explaingit

petermercell/megaflowtracker-for-nuke

14TclAudience · designerComplexity · 4/5LicenseSetup · hard

TLDR

A Nuke plugin that reads AI-generated motion data from MegaFlow and instantly creates animated tracking nodes, making it fast to pin digital elements onto moving footage.

Mindmap

mindmap
  root((megaflowtracker))
    What it does
      Dense motion tracking
      Screen replacement
      Camera stabilization
    Workflow
      Python solve step
      Save data to disk
      Nuke plugin load
      Click points to track
    Output Nodes
      Tracker4
      CornerPin2D
    Requirements
      CUDA GPU for solve
      MegaFlow installed
      Nuke license
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Track a moving surface in a shot and lock a digital element to it without manual keyframing.

USE CASE 2

Replace a screen or poster in footage by using MegaFlow data to drive a CornerPin2D node.

USE CASE 3

Stabilize shaky camera footage using the dense per-frame motion data MegaFlow produces.

Tech stack

TclPythonNukeCUDAMegaFlow

Getting it running

Difficulty · hard Time to first run · 1day+

Requires MegaFlow already set up with a CUDA-capable GPU, the GPU is only needed for the solve step, not for the Nuke plugin itself.

Free to use for any purpose including commercial work, as long as you keep the Apache 2.0 license notice.

In plain English

This project is a plugin for Nuke, a professional compositing application used in film and television visual effects work. It connects Nuke to a separate AI system called MegaFlow, which analyzes a video shot and figures out how every point in the frame moves across every frame. That kind of dense motion data is useful for tasks like making a digital element stick to a moving surface, correcting camera shake, or replacing the content of a screen that appears in the footage. The workflow is split into two parts. First, you run a Python script that feeds your video footage through the MegaFlow model on your graphics card. This step is slow and computationally expensive, but you only have to do it once per shot. The results are saved to a compact file on disk. Second, you open Nuke, load the plugin, point it at that saved file, and click on the spots in the frame you want to track. The plugin reads motion data for those specific points from the file and instantly generates Nuke tracking nodes with fully animated position data. This second step requires no graphics card and runs in seconds. The plugin can produce two types of Nuke nodes. A Tracker4 node follows up to four individual points. A CornerPin2D node, which requires exactly four points, maps how a four-cornered area in the frame deforms over time, useful for inserting replacement imagery onto a flat surface like a poster or a phone screen. Installation requires having MegaFlow already set up on your machine, which in turn needs a CUDA-capable graphics card for the solve step. The plugin gizmo itself is a single file that you can paste directly into Nuke or add to your permanent Nuke menu. The project is open source under the Apache 2.0 license.

Copy-paste prompts

Prompt 1
I have MegaFlow tracking data saved for a shot. Walk me through using MegaFlowTracker in Nuke to create a CornerPin2D node for a phone screen replacement.
Prompt 2
Help me write a Python batch script that runs multiple shots through the MegaFlow solve step overnight before I open Nuke the next morning.
Prompt 3
I want MegaFlowTracker to appear in my Nuke menu automatically at startup. Write the Python init.py snippet to register the gizmo.
Open on GitHub → Explain another repo

← petermercell on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.