Activity › Forums › Adobe After Effects Expressions › kinetic typography with radial wave movement
-
kinetic typography with radial wave movement
Posted by Oleg Friesen on April 3, 2024 at 5:47 pmHow would you realize such an animation?
Julian Chojnacki replied 5 months, 1 week ago 2 Members · 5 Replies -
5 Replies
-
Julian Chojnacki
April 4, 2024 at 3:26 amHi Oleg,
add 2 sliders to your layer called Anim and Delay and try the following code on an expression selector either based on characters or words:
const ti = textIndex - 1;
const { basedOn } = thisProperty.propertyGroup(1);
const anim = effect("Anim")("Slider");
const delay = effect("Delay")("Slider").value;
const lines = text.sourceText.value.split(/\n|\r|\3/);
let lineIndex = itemsInLine = totalCount = 0;
for (let line of lines) {
const count = basedOn == 3 ? line.split(" ").length : line.length;
totalCount += count;
if (totalCount > ti) {
itemsInLine = count;
break;
}
lineIndex++;
}
const colIndex = ti - (totalCount - itemsInLine);
const dx = colIndex - (itemsInLine - 1) / 2;
const dy = lineIndex - (lines.length - 1) / 2;
const center = Math.hypot(dx, dy);
anim.valueAtTime(time - framesToTime(delay) * center);
// anim.valueAtTime((time - framesToTime(delay) * center) % (anim.key(anim.numKeys).time));
Now animate the slider and tweak your delay as you wish 🙂
You can easily create a looping radial wave animation using loopOut() on the Anim slider or with the code I commented out in the last line.
Just watch out when using paragraph/boxText: this won’t work unless you add your linebreaks manually.
-
Oleg Friesen
April 4, 2024 at 11:47 amNice! Its work! Radius was still interesting for my task. Here are a few adapted lines that take this into account
const radius = effect(“Radius”)(“Slider”).value;
and
anim.valueAtTime((time – framesToTime(delay) * center / radius) % (anim.key(anim.numKeys).time));
-
Oleg Friesen
April 4, 2024 at 11:49 amcould you still make the source of the wave motion from the position of a null object?
-
Julian Chojnacki
April 4, 2024 at 12:21 pmSure, is a second (invisible) text layer for the calculations ok?
The radius is a great addition btw, I totally forgot about that!
You could even go fancy and apply separate radii to dx & dy directly in the center variable. -
Julian Chojnacki
April 4, 2024 at 12:49 pmIf you only need a fixed layout like a grid, a one-layer solution would definitely render much faster
Reply to this Discussion! Login or Sign Up