Random Tricks
How to attach a mask point to a layer in After Effects?

How to attach a mask point to a layer in After Effects?

Sometimes animating mask path can be really difficult if you are trying to animate it to follow an object.

This tip may be used in motion graphic work to focus moving object (maybe tracked).

Let’s start!

First of all, it is impossible to solve that problem by After Effects itself, so we are going to get some help by a script.

Script name is; RotAE rotoscoping script. I’m giving its download link and information at bottom.

Now, open After Effects (im using CS5) and create a composition.

In your composition, create a 100×100 pixel size solid,

This solid will be moving object example (in your real porject, it will be your tracked keys null object)

Now give some random position keys to this solid;

Select this layer and Pre-Compose [Ctrl+Shift+C] it. We will track it.

Track this pre-compose (I’m assuming you know how to track an moving object in After Effects, because it is another lesson :)

When finished, your pre-compose will have track position data.

Now, create a new solid more, select [Make Comp Size], on this solid draw a mask line,

Give this layer a Stroke effect and select [On Transparent] as Paint Style in Stroke effect properties window.

Now, download RotAE script from the bottom of this page; and Run this script,

You should see a script user interface window like this;

Now Select your mask layer and press “>” on script window;

You will see you can select mask point with this button.

Select the button that you wish to parent,

Press [Apply Tracker], this will create a Motion Trackers menu to your object.

Now select pre-composed layer’s [Track Point 1] and press Ctrl+C to copy.

Select [Track Point 1] in mask layer and press Ctrl+V to paste.

Your all keys will be transfered to mask layer’s Track Point 1;

Now select [Mask 1] and and [Tracker 1] in mask layer and press [Apply Mask] in script window.

Your mask point will snap to track center and play it, it will track your mask point with your object.

About Script:

RotAE 1.3

Idea by Alejandro Perez
Main code by Juan Corcoles
Additional code by Alejandro Perez, Michael Natkin, Paul Tuersley
Originally based on a script by Dan Ebberts at Creative Cow

v1.1 fixed a small bug, an unnecesary check that blocked Apply Tracker if the first layer
in comp didn’t have a mask; it ignored if it was the layer selected to apply the trackers.
v1.2 quick fix to prevent out of memory error or crash caused by overloading the undo
when applying trackers to a mask.
v1.3 the solution to the memory error / crash issue, thanks to Michael Natkin from Adobe.

Download Script:


That’s all folks,

Keep in Fxfx,


About Caneration


  1. Great tut and script

  2. Just have to say you just saved me hours of key framing! This is just what I needed and it works perfectly. Thank you!!

  3. Hello Casey,

    It is great to hear saving tons hours of people :)

    Enjoy it,

    Keep in Fxfx

  4. dude you are now officially my new deity.

    you saved my ass in so many ways

  5. Haha, thank you Dragulai :)

    Stay on Fxfx,

  6. nice script. thanx mate. :)

  7. This is amazing! I wanted to try and track several markers on my mouth to a simple 2D animated face. Needing it to be able to use the mask points I immediately found your script. I just tracked my upper lip and it works! This opens up so many possibilities. I wish I were a wizard – I’d love to be able to contribute to the animation community like this. Thanks so much!

  8. Yes! Finally something about nike free.

  9. Wow! That was just what I was looking for!

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>