5 expressions that will change your life
#21
Posted 15 August 2008 - 03:47 PM
Thank you ! very much!
One question: if my object rotation and or position is linked to other object...how should i put this to work together ?
the object rotation is linked like this : thisComp.layer("Red Solid 2").transform.rotation
what changes should i put to your code ? =) thank you
// 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;
}
One question: if my object rotation and or position is linked to other object...how should i put this to work together ?
the object rotation is linked like this : thisComp.layer("Red Solid 2").transform.rotation
what changes should i put to your code ? =) thank you
// 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;
}
#26
Posted 13 February 2009 - 03:35 PM
Beaver, on Oct 17 2007, 01:53 PM, said:
These expressions save so much time, you might get home earlier tonight just by reading this post. If you've ever animated these sorts of things manually, you'll know what I mean. Most will need to be tweaked to your specific needs, but it's just a matter of playing with the numbers a little, and understanding how they'll change your animation. Here's the goods:
Jumpy Wiggle 1 makes wiggle skip and hold rather than move fluidly.
Jumpy Wiggle 2 is similar to 1, but works at a defined FPS so your "jump" will happen at a regular pace.
Inertial Bounce is like making your moves "rubbery." Layers will overextend, then settle into place on position and rotation keyframes.
Sometimes you just want something to move constantly without keyframing it. Use throw.
Same as throw, but for rotation.
Jumpy Wiggle 1 makes wiggle skip and hold rather than move fluidly.
// Jumpy Wiggle 1 (moves at a random FPS) v=wiggle(5,50); if(v < 50)v=0; if(v > 50)v=100; v
Jumpy Wiggle 2 is similar to 1, but works at a defined FPS so your "jump" will happen at a regular pace.
// Jumpy Wiggle 2 (moves at a defined FPS) fps=5; //frequency amount=50; //amplitude wiggle(fps,amount,octaves = 1, amp_mult = 0.5,(Math.round(time*fps))/fps);
Inertial Bounce is like making your moves "rubbery." Layers will overextend, then settle into place on position and rotation keyframes.
// 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;
}Sometimes you just want something to move constantly without keyframing it. Use throw.
// Throw (move at a constant speed without keyframes) veloc = -10; //horizontal velocity (pixels per second) x = position[0] + (time - inPoint) *veloc; y = position[1]; [x,y]
Same as throw, but for rotation.
// Spin (rotate at a constant speed without keyframes) veloc = 360; //rotational velocity (degrees per second) r = rotation + (time - inPoint) *veloc; [r]
This is an awesome script works like a charm in AE. I was just wondering how do I get it to work on C4D? I tried using the COFFEE tag but hasn't worked yet for me. Thanks again for these scripts (awesome timesavers)
#28
Posted 14 February 2009 - 02:07 AM
Thanks Beav--that Inertial Bounce will defs come in handy.
#33
Posted 27 May 2009 - 08:48 AM
#34
Posted 20 July 2009 - 03:12 PM
thanks....works great
)
This post has been edited by stoiqa: 20 July 2009 - 03:57 PM
#37
Posted 14 September 2009 - 02:17 PM
not key framing is learning the program. There is a reason they built in the ability to scrip motion, plus you can achieve a smoother motion in half the time and be able to make adjustments faster then beating the curves to death.
rusty ace
I am always doing that which I cannot do, in order that I may learn how to do it.
Pablo Picasso
I am always doing that which I cannot do, in order that I may learn how to do it.
Pablo Picasso
#38
Posted 15 September 2009 - 07:44 AM
That's great to hear that..Thanks a lot for the information.Good job.
Regards
Albert
______
Pret immobilier
Regards
Albert
______
Pret immobilier

Sign In
Register
Help

MultiQuote





