After Effects Ease Expression Question
by John Winthrop on Jul 22, 2016 at 2:05:59 pm
Hello, I am brand new to using expressions and I have googled and looked at tutorials to try to figure something out but my question is specific.
I have an expression on a tree to make it sort of bounce up and down from its anchor at the bottom.
-----------(On the SCALE property under transform)
amp = 20;
freq = .25;
y = amp*Math.sin(time*freq*Math.PI*2);
value + [0,y,0]
This expression was originally used for a bob effect under the POSITION property and i copied and pasted it to SCALE of the tree, worked like a charm.
I want to make the bounce effect of the tree Have a different EASE value so it still moves the same speed in between but sort of stay at the top and bottom longer.
I used this expression on an object to make it sway back and forth on the ROTATION property.
swingMaxDistance = 75;
swingSpeed = 5;
easeTimeSpan = 6;
easeSpeed = 1;
easeVal = ease(time*easeSpeed, 0, easeTimeSpan, swingMaxDistance, 0);
Math.sin(time*swingSpeed) * easeVal;
Copying the ease expressions from this into my SCALE property on the tree did not work because the coding seems to be different. I tried changing "swingMaxDistance" to "scale Y" and that didn't work either. I am in a bit over my head here.
How would I go about writing an expression in my SCALE expression (at the top of the page) so that I could have the "easeTimeSpan" "easeSpeed" "easeVal" applied to the scale keyframes?
"I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work."
---THOMAS EDISON on inventing the light bulb.