Skip to content

Available in Dependency Control

Link to script

When you're motion-tracking a sign, and you cannot track the first or last few frames either because the sign moved out of the screen or it faded out, you can use this script to extrapolate the tracking for those lines.

What this script does:

  • Gathers position, scale and rotation data from selected lines
  • Uses k-fold cross validation to find a proper degree of polynomial to fit the data (and some other fuckery when proper degree cannot be found.)
  • Uses that degree to extrapolate the data
  • Generates motion tracking data from the extrapolated data
  • Uses Aegisub Motion internally to apply that motion tracking data

Screenshot

image

Usage

Requirements

  • All selected lines must be 1 frame long.
  • Selection must be consecutive and sorted by time.
  • If lines are split in layers, run the script separately for each layer.
  • Try your best to track using Mocha or Blender. It's better to get proper track for as many frames as you can.
  • Apply the motion tracking data to the line. Delete the badly tracked lines in the beginning or end if necessary.
  • Select all the lines and run the script.
  • Choose if you want to extrapolate at start or end using the drop-down in GUI.
  • Enter how many additional frames you want to extrapolate.
  • Click on Apply button.

Examples

Info

The graph generated in the video is for demonstration and debuggin purposes only. It'll not pop up everytime you use script.

Extrapolation of linear track

Extrapolation of non-linear track

Extrapolation of circular track

Warning

In some cases like in the example shown below, when the line rotates about a single origin point, you should disable Origin in the gui for proper extrapolation.