Forum Replies Created

Page 1017 of 1081
  • Dan Ebberts

    June 26, 2006 at 12:58 pm in reply to: looping a wiggle expression

    There are three ways that I know of, all using wiggle’s 5th parameter (time):

    1) Halfway through the loop you run the time parameter backwards. This is the easiest but least convincing way.

    2) Calculate the difference between the wiggle values at the start and end of the loop and subtract an amount of that difference proportional to where you are in the loop (so you end up back where you started).

    3) This one is hard to describe, but might be the best. Halfway through the loop, you re-run the same wiggle but flipped over and starting from the halfway point. One way to picture this is to make two copies of a wiggly path. Flip one over and match up the endpoints so that it makes a closed loop.

    Dan

  • Dan Ebberts

    June 26, 2006 at 12:58 pm in reply to: looping a wiggle expression

    There are three ways that I know of, all using wiggle’s 5th parameter (time):

    1) Halfway through the loop you run the time parameter backwards. This is the easiest but least convincing way.

    2) Calculate the difference between the wiggle values at the start and end of the loop and subtract an amount of that difference proportional to where you are in the loop (so you end up back where you started).

    3) This one is hard to describe, but might be the best. Halfway through the loop, you re-run the same wiggle but flipped over and starting from the halfway point. One way to picture this is to make two copies of a wiggly path. Flip one over and match up the endpoints so that it makes a closed loop.

    Dan

  • Dan Ebberts

    June 24, 2006 at 8:15 pm in reply to: help with expressions

    Assuming you don’t want to trigger a vibration at every keyframe, I’d use something like this and just put a layer marker wherever you want the vibration to occur:

    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
    n–;
    }
    }

    if (n == 0){
    value;
    }else{
    t = time – marker.key(n).time;
    veloc = 18;
    amplitude = 55;
    decay = 4;
    y = amplitude*Math.cos(veloc*t)/Math.exp(decay*t);
    value + [y,0];
    }

    Dan

  • Dan Ebberts

    June 24, 2006 at 8:15 pm in reply to: help with expressions

    Assuming you don’t want to trigger a vibration at every keyframe, I’d use something like this and just put a layer marker wherever you want the vibration to occur:

    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
    n–;
    }
    }

    if (n == 0){
    value;
    }else{
    t = time – marker.key(n).time;
    veloc = 18;
    amplitude = 55;
    decay = 4;
    y = amplitude*Math.cos(veloc*t)/Math.exp(decay*t);
    value + [y,0];
    }

    Dan

  • Dan Ebberts

    June 24, 2006 at 7:54 pm in reply to: help with expressions

    Are you trying to trigger the bounce at two different keyframes? If so, what’s supposed to happen between the keyframes?

    Dan

  • Dan Ebberts

    June 24, 2006 at 7:54 pm in reply to: help with expressions

    Are you trying to trigger the bounce at two different keyframes? If so, what’s supposed to happen between the keyframes?

    Dan

  • Dan Ebberts

    June 22, 2006 at 7:26 pm in reply to: An Expression for Opacity

    Sure. For reference, here’s the expression again

    startFade = 1000;
    endFade = 2000;

    d = position[2] – thisComp.layer(“Camera 1”).position[2];
    linear(d,startFade,endFade,100,0)

    The first two lines just set the z distance from the camera for the fade to start and end. The third line calculates the z distance from the camera.

    In English, the forth line just says “as d varies from 1000 to 2000, ramp opacity from 100 to 0”. At distances less than 1000 the opacity will be 100 at distances greater than 2000 the opacity will be 0.
    Instead of linear() you could try easeIn() and easeOut()

    Hope that helps.

    Dan

  • Dan Ebberts

    June 22, 2006 at 7:26 pm in reply to: An Expression for Opacity

    Sure. For reference, here’s the expression again

    startFade = 1000;
    endFade = 2000;

    d = position[2] – thisComp.layer(“Camera 1”).position[2];
    linear(d,startFade,endFade,100,0)

    The first two lines just set the z distance from the camera for the fade to start and end. The third line calculates the z distance from the camera.

    In English, the forth line just says “as d varies from 1000 to 2000, ramp opacity from 100 to 0”. At distances less than 1000 the opacity will be 100 at distances greater than 2000 the opacity will be 0.
    Instead of linear() you could try easeIn() and easeOut()

    Hope that helps.

    Dan

  • Dan Ebberts

    June 22, 2006 at 5:26 pm in reply to: An Expression for Opacity

    Something like this might be what you’re looking for:

    startFade = 1000;
    endFade = 2000;

    d = position[2] – thisComp.layer(“Camera 1”).position[2];
    linear(d,startFade,endFade,100,0)

    Dan

  • Dan Ebberts

    June 22, 2006 at 5:26 pm in reply to: An Expression for Opacity

    Something like this might be what you’re looking for:

    startFade = 1000;
    endFade = 2000;

    d = position[2] – thisComp.layer(“Camera 1”).position[2];
    linear(d,startFade,endFade,100,0)

    Dan

Page 1017 of 1081

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