Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects recreating the randomness movement of a butterfly

  • recreating the randomness movement of a butterfly

    Posted by David Lieberman on March 7, 2008 at 5:27 pm

    hello,

    I’v got a precomp composed of some 3 layers which make up a butterfly… they are strokes/lines. one layer for the body, and two for each side of hte wings..

    is there some known method for creating that random looking movement of a butterly… I DONE MEAN THE FLAPPING OF THE WINGS… i mean the full body movement in the air..the way it moves from point to point in such a snappy and randomized looking way..

    thanx for the help.

    Chris Heuer replied 18 years, 2 months ago 4 Members · 6 Replies
  • 6 Replies
  • Chris Heuer

    March 7, 2008 at 7:52 pm

    I recently made a Butterfly spot. Dan Ebberts helped me out with this expression:

    w = wiggle(2,20);
    j = wiggle(1.5,95);
    z=wiggle(4,90);
    [w[0],j[1],value[2]]

    Copy/Paste it into your Butterfly Pre Comp’s “Position” property. Make sure the Pre Comp is a 3D layer.

    You can play with the numbers in parentheses to get more or less extreme movements.

    w = wiggle(2,20);
    j = wiggle(1.5,95);
    z=wiggle(4,90);

    Remember its (How Often to Wiggle, How Much to Wiggle) so a value of (2, 20) would wiggle 2 times a second, by 20 pixels.

    Also, in the bottom line “[w[0],j[1],value[2]]” You need to change the word “value” to the letter “z” if you want the butterfly to wiggle on the z-axis.

    Good luck!

    Chris Heuer
    Freefall FX, LLC

  • David Lieberman

    March 7, 2008 at 7:58 pm

    ABSOLUTE LEGEND!!! you know any good sources to start teaching myself expressions?

    thanks a lot!!

    dave

    thanx for the help.

  • Chris Heuer

    March 7, 2008 at 8:11 pm

    Yes! Click on “Forums” above. Just under the After Effects Forum is the After Effects Expressions Forum. Lots of great people over there, some from here.

    Also goto http://www.motionscript.com

    That is Dan Ebberts’ site (He’s one of the expression gurus here). It takes some poking around an a LOT of concentration (for me). But that is the place to really learn.

    Chris Heuer
    Freefall FX, LLC

  • Kevin Camp

    March 7, 2008 at 10:37 pm

    another good one for the basics is http://www.jjgifford.com/expressions. it’s old (like ae 5.0 old), but he does a very good job of explaining the basics.

    i also found that a basic java understanding was useful, i had found this, fromtizag.com, fairly useful for understanding java syntax, java operators, if-else statements and creating loops and arrays, all of which are useful as you get deeper into expressions.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Darby Edelen

    March 8, 2008 at 6:27 am

    Here’s another note on “random” functions. Actually, periodic functions with a bit of random thrown in for good measure =)

    If you add several variations of Math.sin() and Math.cos() together you can end up with some very interesting movements. I did something like this recently to animate a heart beat (not physically accurate, but it came across very well):


    fx = 1; //frequency of the sin/cos function for x
    fy = 2; //frequency of the sin/cos function for y
    fz = 3; //frequency of the sin/cos function for z

    x = Math.sin(fx * time * Math.PI * 2);
    y = Math.sin(fy * time * Math.PI * 2);
    z = Math.sin(fz * time * Math.PI * 2);

    a = x + y + z; //Sum of the sine functions

    s = linear(a, -2.5, 2.5, 0, 10); //As the sum of the sine functions ranges from -2.5 to 2.5 range the scale offset from 0 to 10

    value + [s,s]; //Add [s,s] (ranges from [0,0] to [10,10]) to the current scale

    Here’s a graph of the values that a would range between in this case:

    Free Image Hosting at www.ImageShack.us

    You could add additional variation by adding some truly random values to the expression. For example, you could use the noise() function, or you could vary the frequencies based on an Effects > Expression Controls > Slider Control with a wiggle() applied.

    Darby Edelen
    Designer
    Left Coast Digital
    Santa Cruz, CA

  • Chris Heuer

    March 10, 2008 at 3:29 pm

    OK, I need to take math all over again! Thanks for the tip. I’m gonna need to print out and study this one, but VERY cool! I’m just starting to feel comfotable working with expressions but know none of the language. This is a decent step up for me!

    Chris Heuer
    Freefall FX, LLC

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy