Activity › Forums › Adobe After Effects Expressions › Hierarchy wobble expression needed
-
Hierarchy wobble expression needed
Posted by Mark Chivers on November 1, 2010 at 10:27 amHi all
I have to create some bottles that are balanced on a womens hand – they need to ‘sway’ as she moves her hand. The top bottles will be ‘swaying’ more than the bottom so im thinking that there needs to be a Hierarchy wobble expression of some point – can anyone help with this?Please see the attached image for reference
Mark Chivers replied 15 years, 10 months ago 3 Members · 3 Replies -
3 Replies
-
Kevin Camp
November 1, 2010 at 4:36 pmthis may work for you… it will require parenting each to the bottle below it, and a simple expression for rotation of each parented bottle, but then you’d just adjust the rotation of the bottom-most bottle and the children will follow.
first create the bottles and stack them one above the other and parent each, one by one to the bottle just bellow. this will create a ‘chain’ where say layer 1 is parented to layer 2, and layer 2 is parented to layer 3 and so forth.
then, on the bottom-most child bottle (1 from the bottom-most) try this expression:
n=1.5; // adjust this multiplier as needed
parent.transform.rotation*n
and with the rotation property still selected, choose edit>copy expression only. select the other child bottles, and choose edit>paste.this will copy that expression to the selected layers, and now if you adjust the rotation of the bottom-most bottle, the children should follow.
if you want to make it easier to adjust the rotation multiplier, add a slider expression control to the bottom-most bottle and use the expression pickwhip to link the ‘n’ value to the slider and copy that expression to all the child bottles. then as you adjust the slider all the bottles will adjust too.
Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW -
Chris Wright
November 1, 2010 at 9:19 pmonce you have all your pieces linked up, offset transformed with rotated nulls or however you’re doing it, take the bottom most piece and apply this kinetic expression to the position. it will make them respond realistically to inertia.
// Inertial Bounce (moves settle into place after bouncing around a little)
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n–;
}
}
if (n == 0){
t = 0;
}else{
t = time – key(n).time;
}if (n > 0){
v = velocityAtTime(key(n).time – thisComp.frameDuration/10);
amp = .05;
freq = 4.0;
decay = 2.0;
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}https://technicolorsoftware.hostzi.com/
-
Mark Chivers
November 3, 2010 at 12:20 pmAwesome – works a treat – you are a talented man my friend!!!Thanks again guys
Mark
Reply to this Discussion! Login or Sign Up