Nodes/PlateTrack/Track to Transform
ComfyUI Node

Track to Transform

Turn the track into numbers other nodes can use

By edgarciavfx·Created 2 months ago·Updated 2 months ago· 1
Track to Transform
  • track_data
  • x
  • y
  • rotation
  • scale
  • json

Everything in this pack speaks TRACK_DATA - but not everything you want to drive speaks TRACK_DATA. Sometimes you just need the numbers: where is the tracked region on frame 40, what's its rotation, how big is it. Track to Transform decomposes any track into per-frame lists of position, rotation, and scale that you can wire into animation nodes, drive transformers, or dump as JSON for scripting.

How it works

For each frame it takes the tracked corners' center as the (x, y) position and decomposes the stored transform into rotation (degrees) and uniform scale. It reads from the same H_to_ref chain everything else uses, so these numbers are exactly what the warping nodes see - no separate fit to disagree with them.

Inputs and outputs

  • track_data - any track: planar, points, or face.

Outputs:

  • x - per-frame center x (list of floats).
  • y - per-frame center y.
  • rotation - per-frame rotation in degrees.
  • scale - per-frame uniform scale.
  • json - all of the above plus the reference frame, packed into one string.

The lists are one entry per frame, in frame order, aligned with your image batch. Use them to animate a transform, keyframe an overlay, or feed a scripting node that expects plain floats.

Installing it

Same pack - PlateTrack in Manager or clone + pip install -r requirements.txt. OpenCV only.

Where people get burned

  • The output is a list, not a single value. If you expect "the current position," you'll be wiring a batch where a scalar belongs - remember these are per-frame curves.
  • Rotation is derived from the affine part of the homography. That's a sensible reading of a perspective track, but if you need strictly 2D rotation-only numbers, the similarity motion model on Planar Track gives you cleaner ones.
  • The JSON output is the portable one: it includes reference_frame, which the separate lists don't. If you're scripting, prefer it.

It's the "make the track speak a language other nodes understand" node - small, but it's what lets you drive genuinely non-track things (a camera shake, a parallax layer) from a real match move.

CategoryPlateTrack

Inputs (1)

NameTypeDefaultDescription
track_dataPLATETRACK_DATA

Outputs (5)

NameTypeDescription
xFLOAT
yFLOAT
rotationFLOAT
scaleFLOAT
jsonSTRING