Nodes/PlateTrack/Corner Pin Composite
ComfyUI Node

Corner Pin Composite

Stick an insert onto the moving screen or sign

By edgarciavfx·Created 2 months ago·Updated 2 months ago· 1
Corner Pin Composite
  • images
  • insert
  • track_data
  • insert_mask
  • images
feather1.0
supersampletrue

Every screen-replacement, sign-swap, and poster-pin job is the same problem: you've got an insert image and a moving plane it has to live on, and hand-keyframing it frame by frame is misery. Corner Pin Composite is the node that warps your insert onto the tracked plane for every frame - the ComfyUI equivalent of Nuke's CornerPin2D or After Effects' Corner Pin effect, minus the manual labor. Planar Track handles the "where is the plane" half; this node handles the "make the picture live there" half.

How it works

It reads the tracked corners for each frame from the track_data, computes a perspective transform mapping your insert's rectangle onto that quad, and warps it in place. supersample (on by default) renders the warp at 2× and downsamples, which kills the shimmer and moiré you'd otherwise see on a moving screen. Give it an insert_mask and it warps the alpha alongside the image, blending by that; otherwise the insert is opaque and feather softens its edge.

Inputs and outputs

  • images - the background plate.
  • insert - the image to composite. The nice bit: pass a single image and it's used on every frame, or pass a full per-frame batch and each frame gets its own insert (for animated content, like a video playing on the screen). Batch length should match the plate.
  • track_data - the track defining the plane. Planar Track's homography output is the right one for a screen or sign; a similarity track from Face Track also works for face overlays.
  • feather (default 1) - edge softening on the insert.
  • supersample (default on) - 2× render-and-downscale for clean edges.
  • insert_mask (optional) - an alpha for the insert, e.g. a logo with transparent corners.

Output is the composited images.

Installing it

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

Where people get burned

  • Garbage in, garbage out: the pin is only as good as the track. If the tracked region slips, the insert visibly slides with it. Check the Planar Track confidence (quad goes yellow under 0.6, red under 0.3) before you blame the compositor.
  • A flat insert under a lot of camera movement looks like a flat card pasted on. That's physically correct for a planar tracker - you can't fake parallax with one texture. For convincing screen content, render the insert with some perspective of its own.
  • Forgetting the mask on a non-rectangular insert and getting hard box edges. Either feather or supply alpha.
  • Turning supersample off on a busy texture: shimmer city. Leave it on unless the plate is huge and speed genuinely matters.

The satisfying part is how small the whole thing is: track once, wire an insert, and every frame of a 300-frame shot has the pin exactly where the plane is.

CategoryPlateTrack

Inputs (6)

NameTypeDefaultDescription
imagesIMAGE
insertIMAGE
track_dataPLATETRACK_DATA
featherFLOAT1.00–100
supersampleBOOLEANtrue
insert_maskoptMASK

Outputs (1)

NameTypeDescription
imagesIMAGE