Forum Replies Created

Page 1013 of 1081
  • Dan Ebberts

    July 20, 2006 at 1:27 pm in reply to: looping expression

    If I remember correctly, you just need to add a new keyframe one frame before the second keyframe that AE creates when you turn on time remapping. Then change the value of the last keyframe to 0. Something like that.

    Dan

  • Dan Ebberts

    July 19, 2006 at 4:00 pm in reply to: Expression for “controlled” random opacity

    I may have misunderstood. My previous example will vary the random values. If what you want is one set of random values that repeats forever, this should do it. You can, of course, connect A, B, C, and D to sliders if you want.

    A = 3;
    B = 7;
    C = 5;
    D = 11;

    f = Math.round(time/thisComp.frameDuration);
    seedRandom(index,true);
    period1 = Math.round(random(A,B));
    period2 = Math.round(random(C,D));
    t = period1 + period2 + 2
    d = f%t;
    if (d < period1){ 0 }else if (d < period1 + 1){ random(100) }else if (d < period1 + period2 + 1){ 100 }else{ random(100) } Dan

  • Dan Ebberts

    July 19, 2006 at 4:00 pm in reply to: Expression for “controlled” random opacity

    I may have misunderstood. My previous example will vary the random values. If what you want is one set of random values that repeats forever, this should do it. You can, of course, connect A, B, C, and D to sliders if you want.

    A = 3;
    B = 7;
    C = 5;
    D = 11;

    f = Math.round(time/thisComp.frameDuration);
    seedRandom(index,true);
    period1 = Math.round(random(A,B));
    period2 = Math.round(random(C,D));
    t = period1 + period2 + 2
    d = f%t;
    if (d < period1){ 0 }else if (d < period1 + 1){ random(100) }else if (d < period1 + period2 + 1){ 100 }else{ random(100) } Dan

  • Dan Ebberts

    July 19, 2006 at 3:35 pm in reply to: Expression for “controlled” random opacity

    Give this a try:

    A = 3;
    B = 7;
    C = 5;
    D = 11;

    f = Math.round(time/thisComp.frameDuration);
    t = 0;
    j = 0;
    while (f >= t){
    j++;
    seedRandom(j,true);
    period1 = Math.round(random(A,B));
    period2 = Math.round(random(C,D));
    t += period2 + period1 + 2
    }
    if (f < t - (period2 + 2)){ 0 }else if (f < t - (period2 + 1)){ random(100) }else if (f < t - 1){ 100 }else{ random(100) } Dan

  • Dan Ebberts

    July 19, 2006 at 3:35 pm in reply to: Expression for “controlled” random opacity

    Give this a try:

    A = 3;
    B = 7;
    C = 5;
    D = 11;

    f = Math.round(time/thisComp.frameDuration);
    t = 0;
    j = 0;
    while (f >= t){
    j++;
    seedRandom(j,true);
    period1 = Math.round(random(A,B));
    period2 = Math.round(random(C,D));
    t += period2 + period1 + 2
    }
    if (f < t - (period2 + 2)){ 0 }else if (f < t - (period2 + 1)){ random(100) }else if (f < t - 1){ 100 }else{ random(100) } Dan

  • Dan Ebberts

    July 18, 2006 at 8:45 pm in reply to: Dan’s gravity expression, creeping object

    In this setup, Vx0 becomes (in pixels) how far the object will move in the x direction. The first parameter of Math.pow() determines how quickly it will get there, with 1.0001 being very slow and 10.0 being very fast (I think).

    Dan

  • Dan Ebberts

    July 18, 2006 at 8:45 pm in reply to: Dan’s gravity expression, creeping object

    In this setup, Vx0 becomes (in pixels) how far the object will move in the x direction. The first parameter of Math.pow() determines how quickly it will get there, with 1.0001 being very slow and 10.0 being very fast (I think).

    Dan

  • Dan Ebberts

    July 18, 2006 at 8:16 pm in reply to: Dan’s gravity expression, creeping object

    Try changing the last line to this:

    [position[0] + Vx0*(-Math.pow(2,-time) +1), floor – y]

    You may have to crank up the initial x velocity.

    Dan

  • Dan Ebberts

    July 18, 2006 at 8:16 pm in reply to: Dan’s gravity expression, creeping object

    Try changing the last line to this:

    [position[0] + Vx0*(-Math.pow(2,-time) +1), floor – y]

    You may have to crank up the initial x velocity.

    Dan

  • Dan Ebberts

    July 18, 2006 at 7:52 pm in reply to: Dan’s gravity expression, creeping object

    Mike,

    I doesn’t look like the expression has any friction or damping for motion in the x direction – as you’ve discover it just keeps moving at a constant velocity. Let me give it some thought.

    Dan

Page 1013 of 1081

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