Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions While and Scale

  • Posted by David Garces on February 27, 2018 at 1:17 pm

    Hi,

    I’m animating sweat in a face and I want an angle control to determine the scale of the sweat at the same rate as it appears.
    I’m having issues with the while expression to do so:

    j = 0;
    TP= (effect("RATE")("Ángulo"));
    scalRel = ease(time, TP-TP, TP, [100,100], [0,0]);

    while (j < time){
    scalRel];

    This gets me into an infinite loop and I honestly don’t know why.
    Can someone help me?
    Thank you ????

    Here is the way I have animated sweat in case someone finds it useful:

    HEIGHT = (thisComp.layer("CARA").sourceRectAtTime().height)*0.7;
    WIDTH = (thisComp.layer("CARA").sourceRectAtTime().width)*0.7;

    TP = effect("RATE")("Ángulo");
    seed = Math.floor (time/TP);
    segStart = seed*TP;

    seedRandom(seed, true);
    X = random (WIDTH/2,((WIDTH/2)*-1));
    Y = random (HEIGHT/2,((HEIGHT/2)*-1));
    StartVal = [X,Y];

    EndVal = [X,Y+15];

    linear(time, segStart, segStart+TP, StartVal, EndVal);

    David Garces replied 8 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 27, 2018 at 2:18 pm

    You don’t have anything in your while loop that increments the value of j, so on any frame except the first frame it will loop endlessly.

    Dan

  • David Garces

    February 27, 2018 at 5:34 pm

    Thanks for the response Dan.

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