Activity › Forums › Adobe After Effects Expressions › spring effect on paths
-
spring effect on paths
Posted by Arne Münch on February 27, 2015 at 10:28 amHi there
Many of you will know the spring(overshoot) effect based on the incoming speed of keyframes. (you find this for example in DUIK TOOLS, EASE AND WIZZ or expressions setups based on Dan Ebberts Article about Overshoot.)
Is there a similar to way to overshoot when animating a mask or shape layer path?
I know that single maskpath vertices could not be accessed by expressions, but maybe with the help of a script like this https://aescripts.com/maskvertexexpression/
Could it be possible to access with the help of a script the incoming speed of individual mask vertices?
This would be a great effect for organic shape layer transitions.Any ideas?
Arne Münch replied 11 years, 2 months ago 2 Members · 8 Replies -
8 Replies
-
Arne Münch
February 28, 2015 at 10:48 amWas I clear enough with what I want?
Please also tell me if you think you can´t do that via that maskvertexexpression script nor any other scripts, so I can discard the idea..
thank you -
Dan Ebberts
February 28, 2015 at 4:12 pmIt would have to be a script that you would run after you finish your animation and you would have to run it again any time you tweak the animation. It would create a keyframe for every frame. The math for the nodes wouldn’t be too tough, but I’m not sure exactly what you would do with the handles.
From what I discovered developing Rubberize It!, I’d guess just giving inertia to the mask nodes might not do what you expect. You might have to instead use angular inertia around the anchor point to get a decent deformation.
Interesting idea though.
Dan
-
Arne Münch
February 28, 2015 at 10:18 pmThanks for your reply. I think with the handles that could be an issue I don´t know yet.
With implementing angular inertia would be a further step, thats right.But I do have some skills in writing expressions, but not in writing scripts so that my first approach is to use that maskvertexexpression script from nabscripts.
I tried:
amp = 1
freq = 3
decay = 5
lookAt = 0.1;
n = 0;
if (mask(1).maskPath.numKeys > 0) {
n = mask(1).maskPath.nearestKey(time).index;
if (mask(1).maskPath.key(n).time > time) n–;
}
if (n >1){
t = time – mask(1).maskPath.key(n).time;
amp_1 = amp * (velocityAtTime(mask(1).maskPath.key(n).time – thisComp.frameDuration*lookAt));
w = freq*Math.PI*2;
value + amp_1*(Math.sin(t*w)/Math.exp(decay*t)/w);
}else value;but nothing happend, only a static copy of the animated mask was generated.
I ended typing just one line:
velocityAtTime(time);
And recognized that a mask was generated with all vertices at (0,0)
So velocityAtTime seems not to work in that script as far as I understood. But why? The maskpath of course was animated, so the vertices do have some Velocity. -
Dan Ebberts
February 28, 2015 at 10:22 pmExpressions can’t do math on path shapes. valueAtTime() is about all you have to work with. The overshoot calculation would have to be done in a script.
Dan
-
Arne Münch
February 28, 2015 at 10:33 pmMhm, Yes but I thought this maskvertexexpression script does transfering all vertices to 2D points, applys to every single point the expression as if it was a normal point property and transfers it back to vertices of a mask?
So its not possible via that maskvertexexpression script?
-
Dan Ebberts
February 28, 2015 at 10:47 pmSo you’re entering your expression into the UI of nab’s script? I think you’d have to ask nab if it can handle an expression like that, and if so, how you would set it up.
Dan
-
Arne Münch
February 28, 2015 at 10:51 pmYes, sorry that I was not clear enough.
I will try on his website… -
Arne Münch
March 1, 2015 at 12:21 amI think I have to accept that with the maskvertexexpression script it won´t work.
The script just looks at the maskpath at the actual point of time and can manipulate exactly that state.
A keyframeanimated maskpath will not be taken into account, and this is why velocityAtTime just outputs (0,0)If anyone capable of writing such a script reads this and likes the idea, please reply here so I will know..
Reply to this Discussion! Login or Sign Up