::: mograph :::: 5 expressions that will change your life - ::: mograph :::

Jump to content

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

5 expressions that will change your life

#1 User is offline   Beaver Icon

  • Mograph Deity
  • Group: Admin
  • Posts: 991
  • Joined: 20-July 06
  • Gender:Male

Posted 17 October 2007 - 06:53 PM

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 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]


A shoutout to the brilliant folks at aenhancers.com who provided in whole or in part the basis for all of these expressions.
0

#2 User is offline   brandj Icon

  • MoGraph Megastar
  • Group: Members
  • Posts: 333
  • Joined: 24-July 06

Posted 17 October 2007 - 07:49 PM

Nice!

Inertial Bounce is hot.
"If you want to build a ship, don't drum up people to collect wood and don't assign them tasks and work, but rather teach them to long for the endless immensity of the sea." - Antoine de Saint Exupéry
0

#3 User is offline   Cutty Pastey Icon

  • MoGraph Megastar
  • Group: Members
  • Posts: 227
  • Joined: 27-July 06
  • Gender:Male
  • Location:PHOENIX, AZ

Posted 17 October 2007 - 07:58 PM

10 master class points to you! especially for the Inertial Bounce. you sexy bitch you
-justin!
0

#4 User is offline   C.Smith Icon

  • Sermonizes Mograph to the Masses
  • Group: Members
  • Posts: 2,473
  • Joined: 28-July 06
  • Gender:Male
  • Location:D-Town
  • Interests:Keepin it real.

Posted 17 October 2007 - 08:25 PM

Awesome. Now I'm going to make Inertial Bounce and Jumpy Wiggle in coffee for C4D **wrings hands with evil intention**

Thanks, Beav!!
chris smith :: Sugar Film Production | Get CSTools for C4D | Watch CSTools Tutorials by GreyScaleGorilla

...Sounds like something out of a herpes commercial where some lady is rock climbing or doing something else which symbolizes her independence, then out of nowhere she blurts out "I HAVE HERPES." The music gets all serious and you hear a voice over "...there is no cure," cue inspirational music "but treatment is available." Then it cuts to a shot of the bitch on a beach and a guy runs up behind her and puts his arms around her. Good job dumbass, you're dating a skank with herpes. - Maddox.
0

#5 User is offline   TyMotion Icon

  • MoGraph Regular
  • Group: Members
  • Posts: 80
  • Joined: 24-July 06
  • Gender:Male
  • Location:Denver

Posted 17 October 2007 - 08:26 PM

Very Nice! Thanks alot.
0

#6 User is offline   ynaka Icon

  • MoGraph Superstar
  • Group: Members
  • Posts: 174
  • Joined: 22-July 06
  • Gender:Male
  • Location:10011

Posted 17 October 2007 - 08:46 PM

I ruv it! Inertial bounce is dope.

Posted Image
0

#7 User is offline   kitkats Icon

  • MoGraph Megastar
  • Group: Members
  • Posts: 343
  • Joined: 18-December 06
  • Location:London

Posted 17 October 2007 - 10:50 PM

Cool. Jumpy wiggle 1 is more-or-less what I'm usually trying to end up with 80% of the time I use the Wiggler. Thanks.
0

#8 User is offline   basilisk Icon

  • Mograph Deity
  • Group: Members
  • Posts: 1,016
  • Joined: 23-July 06
  • Location:Oxford UK

Posted 18 October 2007 - 11:00 AM

Fantastic - loving inertial bounce. Request that you repost in resources so it doesn't get buried...
0

#9 User is offline   Boost Icon

  • Newbie
  • Group: Members
  • Posts: 29
  • Joined: 25-July 06
  • Location:Belfast

Posted 18 October 2007 - 11:38 AM

thumbs up for the inertia bounce - priceless. cheers Beaver
0

#10 User is offline   basilisk Icon

  • Mograph Deity
  • Group: Members
  • Posts: 1,016
  • Joined: 23-July 06
  • Location:Oxford UK

Posted 18 October 2007 - 11:57 AM

You're underselling inertial bounce - you can put it in your scale parameter for squash and stretch bounciness, I even tried it with CC Bend It, to create a bendy rubber stick (apply it to the bend parameter, obviously)
Perhaps it could be used with puppet pins to create secondary motion in cartoon animation (I haven't tried this yet)?
0

#11 User is offline   zook Icon

  • MoGraph Megastar
  • Group: Members
  • Posts: 255
  • Joined: 07-October 06

Posted 18 October 2007 - 12:40 PM

Brilliant.

Thanks again.

This post has been edited by zook: 18 October 2007 - 12:40 PM

Ars longa, vita brevis.
0

#12 User is offline   microdot Icon

  • MoGraph Megastar
  • Group: Members
  • Posts: 320
  • Joined: 28-July 06
  • Gender:Male
  • Location:Brooklyn

Posted 18 October 2007 - 02:16 PM

nice.

On throw, I wonder how you'd make it loop across the screen on one axis (or both),
so that when the left most edge exited the frame, it would re-emerge on the right side, while still exiting on the left.
Kinda like an offset loop, but with expressions.


hmmmmm?
0

#13 User is offline   graymachine Icon

  • All Around Swell Guy
  • Group: Admin
  • Posts: 10,003
  • Joined: 22-July 06
  • Gender:Male
  • Location:Pixelangeles

Posted 18 October 2007 - 02:49 PM

View Postmicrodot, on Oct 18 2007, 02:16 PM, said:

nice.
On throw, I wonder how you'd make it loop across the screen on one axis (or both),
so that when the left most edge exited the frame, it would re-emerge on the right side, while still exiting on the left.
Kinda like an offset loop, but with expressions.
hmmmmm?


You'd have to stick with offset. An expression can't make an object appear in two places at the same time.

But, if it can leave the screen, you could do this:

startPos = 250;
endPos = thisComp.width;
end = thisComp.duration;
x = linear(time, 0, end, -startPos, endPos);
[x, value[1]]


Made an edit.. "startPos" has to be a sort of fudge factor. If you are using AE text, expressions cannot retrieve the width of a text layer. But, if you're layer has a fixed with, then you can use:

startPos = thisLayer.width;
endPos = thisComp.width;
end = thisComp.duration;
x = linear(time, 0, end, -startPos, endPos);
[x, value[1]]

This post has been edited by graymachine: 18 October 2007 - 02:57 PM

Some Sort of Fancy Title
Red Giant Software
0

#14 User is offline   microdot Icon

  • MoGraph Megastar
  • Group: Members
  • Posts: 320
  • Joined: 28-July 06
  • Gender:Male
  • Location:Brooklyn

Posted 18 October 2007 - 02:54 PM

cool, thx.

BTW - that gif ani rules! Where the hell is that from?

Guy got POPPED!
0

#15 User is offline   chips Icon

  • Newbie
  • Group: Members
  • Posts: 19
  • Joined: 21-February 07

Posted 18 October 2007 - 03:01 PM

havent really used expressions in AE much.
want to test these though.
Do I create a new camera and alt click on it's position property and then copy one of these codes?
0

#16 User is offline   graymachine Icon

  • All Around Swell Guy
  • Group: Admin
  • Posts: 10,003
  • Joined: 22-July 06
  • Gender:Male
  • Location:Pixelangeles

Posted 18 October 2007 - 03:02 PM

http://www.youtube.c...h?v=Z6mXfFTOxbM
Some Sort of Fancy Title
Red Giant Software
0

#17 User is offline   graymachine Icon

  • All Around Swell Guy
  • Group: Admin
  • Posts: 10,003
  • Joined: 22-July 06
  • Gender:Male
  • Location:Pixelangeles

Posted 18 October 2007 - 03:23 PM

View Postchips, on Oct 18 2007, 03:01 PM, said:

havent really used expressions in AE much.
want to test these though.
Do I create a new camera and alt click on it's position property and then copy one of these codes?


You put them on any property you want. The golden rule with expressions is:

Expressions ONLY do what you can otherwise do with keyframes. Their purpose is to simplify otherwise complex keyframe animation.
Some Sort of Fancy Title
Red Giant Software
0

#18 User is offline   pdeb Icon

  • Newbie
  • Group: Members
  • Posts: 7
  • Joined: 27-October 06

Posted 18 October 2007 - 04:13 PM

View Postgraymachine, on Oct 18 2007, 08:23 AM, said:

You put them on any property you want. The golden rule with expressions is:

Expressions ONLY do what you can otherwise do with keyframes. Their purpose is to simplify otherwise complex keyframe animation.


Well said, Harry, and great thread, it's spurred me to share one of my recent effects involving expressions:
a little while back I needed to make an oscillating or 'crenelated' spiral path:

http://members.shaw....cren_spiral.png

With the help of, who else, Dan Ebberts, and nab's Create Custom Effect script, I made this into an editable effect - it's tied to the Write-On effect, but you can easily pick-whip the output to any positional-based parameter.

It was created for a particular purpose (and perhaps limited in its use), but in the spirit of community, the archive is here:
http://members.shaw....ral_beta0.1.zip

the archive contains the AE7 .ffx preset, as well as the text you'll have to copy and paste into your "PresetEffects.xml" - if you feel comfortable tweaking that file, of course. As always, I recommend backing up your work and your .xml file.

Happy spiralling,
Peter Debay
Freelance After Effects Motion Graphics & Compositing
http://members.shaw.ca/pdebay
0

#19 User is offline   pdeb Icon

  • Newbie
  • Group: Members
  • Posts: 7
  • Joined: 27-October 06

Posted 18 October 2007 - 04:22 PM

I would be remiss if I didn't post the position expression for those not wanting to download the custom effect:

center=[thisComp.width/2,thisComp.height/2];
rMax = 240; //maximum radius
decay = 0.3; //decay
freq = 6; //frequency
aStart = 0; //start angle offset
aRate = 220; //rotation rate
offsetFactor = 12; //smoothness

r = rMax/Math.exp(time*decay);
a = degreesToRadians(aStart + aRate*time);
offset = (r/offsetFactor)*Math.sin(freq*time*Math.PI*2);
center + [Math.cos(a),Math.sin(a)]*(r + offset);


Happy spiralling,
Peter Debay
Freelance After Effects Motion Graphics & Compositing
http://members.shaw.ca/pdebay

This post has been edited by pdeb: 18 October 2007 - 04:29 PM

0

#20 User is offline   C.Smith Icon

  • Sermonizes Mograph to the Masses
  • Group: Members
  • Posts: 2,473
  • Joined: 28-July 06
  • Gender:Male
  • Location:D-Town
  • Interests:Keepin it real.

Posted 18 October 2007 - 07:00 PM

I did a quick mod of CS_VibrateNull with a stutter function to match the Jitter AE script above. (Stutter at zero equals stutter off).

Stutter
chris smith :: Sugar Film Production | Get CSTools for C4D | Watch CSTools Tutorials by GreyScaleGorilla

...Sounds like something out of a herpes commercial where some lady is rock climbing or doing something else which symbolizes her independence, then out of nowhere she blurts out "I HAVE HERPES." The music gets all serious and you hear a voice over "...there is no cure," cue inspirational music "but treatment is available." Then it cuts to a shot of the bitch on a beach and a guy runs up behind her and puts his arms around her. Good job dumbass, you're dating a skank with herpes. - Maddox.
0

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users