Tutorial 97: Improved Single-Layer Track Mattes

Joe Clay | Nov 17, 2017

I received a comment on an old tutorial and realized there is a way to improve upon it now that we have access to mask path points in expressions. The expression below looks at our first position key and uses that to calculate an offset so that the mask that we apply this to stays put. Take note, if you need to tie it to a different key or a differently named mask, you'll need to modify the expression.

If you're a patron with access to my Quiver expressions, it should already be saved in there for you if you want to download a txt file to use with Quiver.

Lock Mask Expression

p = transform.position;
s = transform.scale/100;
offset = p.key(1).value - p.value;
offset = [offset[0] / s[0], offset[1] / s[1]];
pts = mask("Mask 1").maskPath.points();
for(i = 0; i < pts.length; i++)  {
    pts[i] = pts[i] + offset;

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. Thank you for even considering clicking this link to support what we're doing. We appreciate it. Patrons get all sorts of benefits, from R&D files, setups, and elements to early product releases.

Check out our Patreon Today