Activity › Forums › Adobe After Effects Expressions › Delay Point path animation
-
Delay Point path animation
Posted by Dries Van Broeck on February 7, 2024 at 6:41 pmIs it possible to delay a path point morph animation? From start to end, Instead of all points animate at once?
Dan Smith replied 1 year, 3 months ago 4 Members · 4 Replies -
4 Replies
-
Dan Ebberts
February 7, 2024 at 7:13 pmYou could try a path expression like this:
delay = .1;
p0 = points(time);
iT0 = inTangents(time);
oT0 = outTangents(time);
for (i = 0; i < p0.length; i++){
p = points(time - i*delay);
p0[i] = p[i];
iT = inTangents(time - i*delay);
iT0[i] = iT[i];
oT = outTangents(time - i*delay);
oT0[i] = oT[i];
}
createPath(p0,iT0,oT0,isClosed()) -
Dan Smith
April 16, 2025 at 9:16 amHi Dan,
I tried to create this expression for delayed movement and elasticity of points on a path, combining the elasticity expression with the one based on your reply. However, the result doesn’t seem ideal after running it. Could you help me identify what the issue might be? Thanks a lot!
By the way, the null layers follow each point on the path, one by one.
var numPoints = points().length;
var pts = [];
var delay = effect(“Slide Control”)(“Slider”);
var nullLayers = [];
for (var i = 0; i < numPoints; i++) {
var nl = thisComp.layer(i + 1);
nullLayers.push(nl ? nl.position : [[0, 0]]);
}
var amp = effect(“Elastic”)(1) / 200;
var freq = effect(“Elastic”)(2) / 30;
var decay = effect(“Elastic”)(3) / 10;
for (var i = 0; i < numPoints; i++) {
var safeTime = Math.max(time – i * framesToTime(delay), 0);
pts[i] = points(safeTime)[i];
}
if (numKeys > 0) {
var n = nearestKey(time).index;
if (key(n).time > time) {
n–;
}
if (n > 0) {
var t = time – key(n).time;
var baseVel = thisComp.frameDuration / 10;
for (var i = 0; i < numPoints; i++) {
try {
var v = nullLayers[i].velocityAtTime(key(n).time – baseVel) || [0, 0];
var deltaX = v[0] * amp * Math.sin(freq * t * 2 * Math.PI) / Math.exp(decay * t);
var deltaY = v[1] * amp * Math.sin(freq * t * 2 * Math.PI) / Math.exp(decay * t);
pts[i] = [pts[i][0] + deltaX, pts[i][1] + deltaY];
} catch (e) {
}
}
}
}
createPath(pts, [], [], false);
Reply to this Discussion! Login or Sign Up