Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Butterfly wings constraint / time expression

  • Butterfly wings constraint / time expression

    Posted by Craig Hellen on December 28, 2009 at 5:22 pm

    Hi Guys,

    im pretty much a novice at expressions, i get the theory but practice is a little lacking.

    In the attached image you can see that im making a composition using a paper layer that i mask bits out of that make wings of butterflies. the idea is as the camera moves up the paper the wings come out and start to animate flapping.

    so my question regarding expressions is in 2 parts.

    1. How do i apply a wiggle expression to the rotation property of the wings that is constrained between 2 angles (i.e i dont want the wings rotating around 360 degrees i want them constrained to the first 35 or something)
    2. how do i have the expression dormant until a time on the timeline, as in i dont want the expression working as soon as the comp starts.

    I hope i have explained this well enough nd if its at all unclear please say so and I will try and re-phrase it

    Many thanks everyone!!

    Craig

    Co-Director Podchains Ltd
    Video Producer / Motion graphics designer https://bexmedia.net

    Craig Hellen replied 16 years, 4 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    December 28, 2009 at 5:47 pm

    You could tie the wiggle amplitude to a slider and keyframe the slider to go from 0 to 35 when you want the flapping to start. To get the wiggle to go from 0 to 35 instead of -35 to +35, you could take the absolute value, like this:

    amp = effect(“Slider Control”)(“Slider”);
    freq = 2;
    Math.abs(wiggle(freq,amp));

    Or, you could remap the value with linear() like this:

    amp = effect(“Slider Control”)(“Slider”);
    freq = 2;
    w = wiggle(freq,amp);
    linear(w,-amp,amp,0,amp)

    There are probably other ways to do it as well.

    Dan

  • Craig Hellen

    December 31, 2009 at 10:00 am

    Brill, thanks Dan, il try that now, need to do more design work on it as well but ill post the results when im done!

    Many thanks and all power to the COW!

    Craig

    Co-Director Podchains Ltd
    Video Producer / Motion graphics designer https://bexmedia.net

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