Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Move mask with traditional X,Y position instead of mask path

  • Move mask with traditional X,Y position instead of mask path

    Posted by Alex Barratt on August 16, 2020 at 3:21 pm

    Hey CC posters,

    I’m trying to make a project that has a bunch of duplicate images and I want to move a mask on each duplicate image using X,Y coordinates instead of using mask path to keyframe it. I’m trying to make it modular so I can parent positions and change numbers to get a different result. It seems like it’d be simple but I can’t seem to get it.

    I was thinking maybe to put the mask on a null object and let the footage inherit it somehow, but I can’t figure that out. Let me know you if you can help!

    THANKS!

    Alex T. Barratt
    Multimedia Designer

    Simon Ubsdell replied 5 years, 9 months ago 4 Members · 5 Replies
  • 5 Replies
  • Richard Garabedain

    August 17, 2020 at 2:26 pm

    really the only way i couid see that working is if you double clicked the mask and then moved it…that kinda does what your asking it to do

  • Filip Vandueren

    August 17, 2020 at 2:39 pm

    Put an Effect -> Expression Controls -> Point Control on your layer.

    Then give your mask’s Mask Path-property this expression:

    xy=effect("Point Control")("Point").value;
    createPath(points().map(pt=>pt+xy), inTangents(), outTangents(), isClosed());

    That would simply add the point’s x and y to every vertex.

    Alternatively, this version forces the mask to move so its center is around that point-control:

    xy=effect("Point Control")("Point").value;
    pts=points();
    avg = pts.reduce( (acc, pt) => acc+pt, [0,0]) / pts.length;
    pts=pts.map(pt=>pt+xy-avg);
    createPath(pts, inTangents(), outTangents(), isClosed());

  • Simon Ubsdell

    August 17, 2020 at 5:31 pm

    You could always make the mask into a Shape Layer instead and use Set Matte on the layers you want it to apply to. That way you can simply animate the position of the Shape (= Mask).

    Or would that not work for you?

    Simon Ubsdell

    hawaiki

  • Filip Vandueren

    August 17, 2020 at 6:02 pm

    Depends, that would imply that the mask is only used for masking, could also be used for another effect (stroke, fill, reshape,…), or need to intersect with other masks,..
    Masks are also applied before effects while track mattes are applied after effects.
    So while track matting is a great tool in the arsenal, it’s not always an ideal replacement for masks

    It also doubles the amount of layers needed, which can be a drag. (Not that having every mask controlled by an expression is without its downsides…)

  • Simon Ubsdell

    August 17, 2020 at 7:10 pm

    Yes, but it well might be the right way to go in this case. And a lot more economical than a laborious expression.

    Simon Ubsdell

    hawaiki

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