Kalleheikki Kannisto
Forum Replies Created
-
This tool might do it:
https://aescripts.com/expression-timeline/
Kalleheikki Kannisto
Senior Graphic Designer -
Ok, I see. You can do so with expressions, but it is somewhat complex, since you need to tell the expression which keyframes should move (by index) and interpolate between fixed and adjustable keyframes between each keyframe pair.
Here’s part of the answer, maybe 1/3 of the full expression needed, although this is slider-based value rather than keyframed. Similar idea though, except that you need to check both the previous and next keyframes at any given time. https://forums.creativecow.net/docs/forums/post.php?forumid=227&postid=30131&univpostid=30131&pview=t
Keyframe value linking would be a nice feature.
Kalleheikki Kannisto
Senior Graphic Designer -
Kalleheikki Kannisto
May 2, 2019 at 3:20 pm in reply to: Audio Waveform – that doesn’t move from right to leftI think you’re looking for something like audio spectrum rather than audio waveform. Audio waves move through time.
Kalleheikki Kannisto
Senior Graphic Designer -
Can you try and explain that in more detail? Right now it sounds like you are describing how keyframes work: If you switch (swap) keyframes A and B locations, you will get a reverse animation. That’s just how keyframes work. So the actual question, I gather, must be something different…?
Kalleheikki Kannisto
Senior Graphic Designer -
Kalleheikki Kannisto
May 2, 2019 at 11:39 am in reply to: randomize stroke length on repeater objects ie trim pathsYou might be interested in Ouroboros 2, which would do most of the work for you.
Kalleheikki Kannisto
Senior Graphic Designer -
Kalleheikki Kannisto
May 2, 2019 at 9:27 am in reply to: Export a vector shape that is a line and strokeMy educated guess is that expanding the shape (equal to outlining the stroke) would be the best way to to this.
Kalleheikki Kannisto
Senior Graphic Designer -
Kalleheikki Kannisto
May 2, 2019 at 9:20 am in reply to: Is there an Expression to find position of brightest pixel on a layer?If you manage to do that the “expression” would sound like a point tracker 🙂
Kalleheikki Kannisto
Senior Graphic Designer -
Kalleheikki Kannisto
May 1, 2019 at 7:44 am in reply to: Expression to generate linear path between time remapped keyframes?If we take the time remapping out of the equation, this is possible. You can linearly interpolate between any two keyframe values over time. If you just want to retrieve the intermediate position, for instance. (If you retrieve the intermediate time, you’ll just end up with the original issue.)
The question is, how to tell the expression which two keyframes you want to interpolate between. I guess the simplest approach would be two sliders with hold keyframes, one for starting keyframe index, one for ending keyframe index. Then a third linear (or eased) slider to control the animation progress from 0 to 100 (as a percentage).
Ok, so if you had those three sliders, you can retrieve the starting and ending positions with something like yourlayerhere.transform.position.valueAtTime(key(index).time)
[That might not be exactly right, check the expression reference]And you can interpolate between those two positions with the “animation progress” slider, which allows you to add easing very simply.
I find it easier to use the percentage to calculate the x and y positions separately and combine them into an array on the last line [xPos, yPos].
I would animate the “animation progress” slider back and forth, and leap frog the starting and ending position values. Meaning animate from 0 to 100, then change the value for the starting position index and animate from 100 to 0, change the ending position index, animate from 0 to 100, etc.
You would have to do this for every property you wanted to animate, so if you have 10 control points to animate, they all need the same expression applied to them.
Kalleheikki Kannisto
Senior Graphic Designer -
Might not be that easy if you’re new to expressions, but the basic idea would be this, no keyframes needed (necessarily).
“Time” is variable that changes, and it changes at an even pace. The other variable that applies to how fast the objects should move is their original distance from the end point. So you would want to remap time into position, taking into account how far the object originally is.
One of the key things is my favorite expression linear() or ease(), which remaps one thing to another with or without easing. Take linear for sake of simplicity. You would remap time to position between origin and target. This might be easier to approach as a percentage of position between origin and target. Thus, using descriptive variable names:
linear(time, starttime, starttime+distance, 0, 100)
Where 0 and 100 are the origin point and target point respectively. In other words, the percentage of target point in the calculation is 0 at the beginning and 100 at the end.
Follow so far?
You could, of course just use the origin point and target point, but those are two-dimensional arrays rather than variables, so this is a sightly easier method in that aspect.
To make an expression out of this, you would have define “starttime”, and calculate “distance” from origin to target.
You would get the percentage as a result, and then it would be a matter of calculating the current position with that percentage.
Kalleheikki Kannisto
Senior Graphic Designer -
Kalleheikki Kannisto
May 1, 2019 at 5:41 am in reply to: Is there an Expression to find position of brightest pixel on a layer?You would combine two nested loops for x and y coordinate lookup and use sampleImage() for checking the color values and then store the coordinates of the lightest one in a two-dimensional array and apply that to position of the other layer.
To make life easier, convert the source image to grayscale so you can get the lightness value directly from any channel rather than having to calculate it from the RGB channels (if you have color, that is).
Kalleheikki Kannisto
Senior Graphic Designer