Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects another butterfly expression question

  • another butterfly expression question

    Posted by Jay Ingles on January 6, 2010 at 1:24 am

    Hi all.

    I’m relatively new to expressions but an intermediate-advanced after effects user. I’ve dug through creative cows, Dan Ebbert’s motionscript, and other sites to find a solution but haven’t found one. Appologies for reposting something thats got a lot of responses already, but i appreciate everyone’s input 🙂

    I am making a large group of butterflies go from dormant (wings breathing slowly) to them all flying in a group over a matter of ~3 seconds.

    I am trying to use sliders to automate:
    1. how quick the wings flap
    2. the range of motion they move

    With these two controls i figure it would be easy to set a dormant state with the wings open but moving slowly (ie: slow flap, 10deg range), then ease out of that to a fast, full flight lifespan.

    I dont know math well enough to figure this out, but when i run the code below (easing from a relaxed state to fast frequency/large amplitude) the wings go VERY fast while ramping up, then settle at the desired pace.

    freq = thisComp.layer("Null: Angle Wing Slider").effect("Frequency Slider")("Slider");
    amplitude = thisComp.layer("Null: Angle Wing Slider").effect("Amplitude Slider")("Slider");
    decay = 0; //no decay

    amplitude*Math.sin(freq*time*2*Math.PI)

    Or:

    What do i modify to allow it to operate smoothly?

    Thanks!

    —————————————————–
    Originally i had wanted to use this code (dan’s) but couldn’t make sense of how to get the last 2 lines to work:

    from = -45; //one end of your oscillation
    to = 45; //the other end of your oscillation
    period = 1.5; //time between oscillation points (multiply by 2 for a round trip)
    t = time % (period * 2);
    if (t > period) t = 2 * period – t;
    linear(t, 0, period, from, to)

    jay

    Erik Waluska replied 11 years, 8 months ago 3 Members · 4 Replies
  • 4 Replies
  • Eyal Shtark

    January 7, 2010 at 10:31 am

    Jay.

    One of the main reasons that i use Apple Motion for this kind of animation is that i do not have to fiddle around with math and expressions.

    In apple Motion this thing would take just a few minutes to set up including the amount of flap and the flying away of the butterflies.

    in motion you just need to drag some behaviors on the objects and the math is done for you.

    I will try to make an example and upload it up for you.

    Eyal.

    Eyal Shtark
    Exhibitions and Multi-Media
    Team Leader

    Advertising department
    ISCAR LTD.
    Tel. +972-4-9970371
    Fax. +972-4-9970422
    Email: eyal@iscar.co.il

  • Eyal Shtark

    January 7, 2010 at 12:20 pm

    Jay

    Ok i made it
    is this what you wanted to do?

    https://reels.creativecow.net/film/butterflies-taking-off

    Eyal.

    Eyal Shtark
    Exhibitions and Multi-Media
    Team Leader

    Advertising department
    ISCAR LTD.
    Tel. +972-4-9970371
    Fax. +972-4-9970422
    Email: eyal@iscar.co.il

  • Eyal Shtark

    January 7, 2010 at 12:21 pm

    Jay

    Ok i made it
    is this what you wanted to do?

    https://reels.creativecow.net/film/butterflies-taking-off

    Eyal.

    Eyal Shtark
    Exhibitions and Multi-Media
    Team Leader

    Advertising department
    ISCAR LTD.
    Tel. +972-4-9970371
    Fax. +972-4-9970422
    Email: eyal@iscar.co.il

  • Erik Waluska

    August 13, 2014 at 10:23 pm

    Hi Jay, Did you ever figure this out? I’m having the same problem with the erratic flapping between keyframes.

    Erik Waluska
    EAWmedia

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