GitHub repository:

Here you can find a complete tutorial on how to use Aegisub-Perspective-Motion properly.

You can download the script form the repository linked above, and install it by placing it in your Aegisub/automation/autoload folder. (Dependency Control coming soon[probably])

Huge thanks to Alendt, for the original perspective.moon script, without that, this script wouldn’t have been possible!

Thanks to Medex, for creating this test video, for extensive testing of the script, and also being a good example for this tutorial!

Also, huge thanks to my Mom for occasional help with the math parts of the script. She is a Math/Physics/IT professor, and I’m just some dumbass Computer Science Engineer.

This script needs to be used with Aegisub-Motion, so make sure you already have it.

What you need before even starting tracking:

  • One line, with no clip, no \fscx or \fscy tags, positioned where you want it to be.
  • A trimmed clip of your sign. (Aegisub-Motion -> Trim)
    (click on the images to see them in full size)

After that, you just track your sign with Mocha, as you always would, but make sure to turn Perspective on!

Also make sure you display your Planar surface, since the corners of this is what our perspective is going to be calculated from.

It should look something like this at first: (the blue rectangle with the cross in the middle)

You need to make sure, you set it to your perspective, even before starting to track!
So align every corner of it, with corners of your plane you want to track.
It should look something like this:

If you’re not lucky enough, to to have your sign in the middle of your perspective plane, you’re probably gonna need to make 2 different tracks.
For example, if you want your text to be there:

You need to set up two different tracks, one for your position tracking with Aegisub-Motion, and one for your perspective.
In the above case, your track for Aegisub-Motion should look something like this.
For this, you don’t need to make sure to align your planar surface, but it’s always best practice.

If you need to resort to this, make sure, you export the After Effects Transform Data from your track for the position, and export your After Effects POWER PIN Data from the track for the perspective. (These things will make sense in a moment.)
For the sake of this tutorial, we’re gonna go with the assumption that your sign is in the middle of your plane.

After that, just track your sign.
Keep in mind, that tracking perspective is usually trickier than just position/scale/rotation, so you might have to fiddle more with your Input Channel/Min % Pixels Used/Search Area Horizontal, Vertical, Angle, Zoom.

If you did everything right, it should look something like this:
(Pay close attention to the blue planar surface, make sure it lines up perfectly with your plane)

After you made sure your tracking is correct, export it as After Effects Transform Data, and paste it into Aegisub-Motion, while making sure “Scale” is disabled!

Rotation is also unnecessary.

After applying it, make sure it stays in roughly space, during your track.

Now, go back into Mocha, and also export After Effects POWER PIN Data.
No, not Corner Pin data, not CS3 corner pin data, not transform data, but Power Pin data!

Now you can go back into Aegisub, and finally run Aegisub-Perspective-Motion.
Paste your Power Pin data into the textbox, and hit apply.
“Include \clip for debugging” puts a \clip on your line, that represents the 4 points from which your perspective was calculated.
Default behaviour is ON. (TODO: make it remember your setting)

If you did everything correctly, and also the stars aligned, and the Gods want it that way, you should have a cool perspective tracked sign, with no manual labour.

But sadly the stars usually don’t align, and the Gods don’t want it that way.
The script is in BETA at the moment, so there are no guarantees it will work under every possible condition.

Here are a few examples, where it worked:

^last frame wasn’t tracked, don’t mind it
^ You can look at this as a short and undescriptive video tutorial

And here is an example, where it didn’t work for every possible way:

That’s basically it.
Contribution pull requests, ideas, feature requests, comments and issues are very welcome in the GitHub repo!
Good typesetting.

– Zahuczky