Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Redrawing a mask frame by frame (AE CS3)

  • Redrawing a mask frame by frame (AE CS3)

    Posted by James Curran on September 1, 2007 at 2:45 pm

    I want to edit some footage by adding a rough mask around a person. For the effect I want I need the mask to use corner points only (no curves), and I want the mask to be kind of jerky ie. no tweening (the footage will probably run at 15fps which would mean about 750 frames, although I havent decided on that yet).

    So far I’ve just been drawing a mask and keyframing the shape frame by frame. Obviously this is very time consuming. It would be a lot quicker for me if I could just re draw the mask from scratch in each frame, but im not sure how (or if) I can do this.

    Is it possible, or is there some other method I could use that would achieve the same effect?

    James Curran replied 18 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Mike Clasby

    September 1, 2007 at 5:22 pm

    You can do it by applying an expression (wiggle) to mask the vertices.

    I just tried a new (to me) Script, “maskPointsExpression.jsx”. It works a charm. You can get it here:

    https://www.nabscripts.com/Downloads/downloads_en_2.php?id=5#maskPointsExpression

    Demo on the page has little vid demo, I saw that after I typed the following walk-through, oh, well, details follow:

    Add “maskPointsExpression.jsx” to your AE Scripts Folder, then fire up AE.

    Run>Script>maskPointsExpression. Then select your mask,

    Click on “Calculate” (it puts up a number equaling the vertices

    Click on All (to apply expression to all vertices)

    Click “Position”, write this expression in the box:

    wiggle(15,20)

    The 15 (frequency – how often) is your given example frame rate (since you want it to change every frame) and the 20 (amplitude) is how many pixels you want them to jump around (that’s really the max jump, I think). Change to taste.

    Anyway, it creates a new mask, named “Animated mask” with the keyframes determined by the expression.

    Pretty slick.

    Be forewarned, trim footage to only as long as you needed, I had a 30 second clip in a 4 sec comp, yet it calculated the keyframes for all 30 sec, taking a long time (5 minutes plus). After trimming the clip, it knocked it right out.

    There is an earlier script, written for Roto work, that attaches mask vertices to track point keyframes (and you can write expressions for the Track Points, then Convert to keyframes). It works but is a longer work around, an earlier post, here:

    https://forums.creativecow.net/cgi-bin/new_read_post.cgi?forumid=2&postid=891545

    It’s a great script for roto, but I think the new one is easier for putting expressions on a mask.

  • James Curran

    September 2, 2007 at 12:34 pm

    Thanks a lot!

    Gives the effect I need, and made things a lot easier.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy