Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Dynamically Creating Vertex Array

  • Michael Hussar

    January 9, 2014 at 5:37 pm

    The problem is that even though you can reference the NUll position in the expression, you can’t use the NULL to control the vertex points in real time(at least not the last time I researched trying to do the very same thing).
    I would be nice and it seems like it makes sense to have this ability but for whatever the reason is, Adobe doesn’t allow for control of mask vertices in real time.

  • Stuart Simpson

    January 10, 2014 at 4:26 pm

    Yup that’s what I thought, but…

    I’ve just found the BAO Mask Avenger plugin which allows you to edit masks vertices and tangents in real time with key frame friendly position properties. So almost there!

    So now I just have to be able to use the comments property of the markers on a reference layer to trigger which key frames are being used to tween between. Currently I have ten possible position key frames that I want to animate between.

    So I mighty choose position 1 at frame 10 to tween between position 5 at frame 30 and then back to position 3 at frame 35.

    I’ve found some of Dan’s expressions that map markers to an in and out point only, but not sure how to adapt that for more than 2 markers.

    Any ideas?

  • Stuart Simpson

    January 11, 2014 at 12:13 pm

    Okay so go it calling the values from the comments of the reference layer (The comments call on key frame values that are in the animating layer).

    But it seems to be jumping to those values at the layer marker, rather than easing between the values called by the two layer markers.

    I must admit this is a bit outside my comfort zone so any help much appreciated!

    m = thisComp.layer("reference").marker;

    // set the previous and next marker key values

    Keystart = 0;
    if (m.numKeys > 0)
    { Keystart = m.nearestKey(time).index;
    if (m.key(Keystart).time > time) Keystart--;
    }
    Vstart = REST;
    if (Keystart > 0)
    { Vstart = eval(m.key(Keystart).comment);
    }

    Keyend = Keystart+1;
    if (Keyend > m.numKeys)
    {Keyend = Keystart;
    }
    Vend = REST;
    if (Keyend > 1)
    { Vend =eval( m.key(Keyend).comment);
    }

    // set the previous and next marker key time

    Vstime = time;
    if (Keystart > 0)
    { Vstime = m.key(Keystart).time;
    }

    Vetime = time;
    if (Keyend > 1)
    { Vetime = m.key(Keystart).time;
    }

    // finally the ease expression

    ease(time, Vstime, Vetime, Vstart, Vend)

  • Michael Hussar

    January 11, 2014 at 4:23 pm

    Hi Stu,

    Unfortunately, I’m not entirely sure about what the solution is here. Maybe Dan or one of the other more senior members will offer some suggestions. I’m sorry that I can’t be of much more help with this code.

    Best,

    Michael

  • Stuart Simpson

    January 11, 2014 at 5:12 pm

    Thanks for getting back to me Michael, I’ll try posting this problem separately to see if anyone has the answer.

    I’d recommend trying that plugin I mentioned. It has the option to link vertices to nulls to.

    Stu

  • Stuart Simpson

    January 11, 2014 at 5:46 pm

    Wow scratch that. Copying and pasting the expression noticed the 1 typo…. Couldn’t see the wood for the trees as they say!

    So now when I scrub the values tween and when I stop the mask redraws but when I preview it stays the same shape!?!

    I’ve posted this as a separate issue now too!

    Stu

    Okay, edit to the above… I think it’s because I only have a trial of the plugin and RAM preview only comes with full version…. But phew, sorted…

Page 2 of 2

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