Forum Replies Created

Page 1058 of 1081
  • Dan Ebberts

    September 24, 2005 at 11:11 pm in reply to: Subtitles into afterFX. Is it possible?

    You should be able to import and parse a text file in one of those formats with a script. It would probably work best if you already had a blank text layer all set up with your font, size, color, positioning and justification choices.

    The script wouldn’t be trivial, but it shouldn’t be too tough either.

    Dan

  • You have to round each of the pieces:

    P = thisComp.layer(“other layer”).position;
    Math.round(P[0]) + ” ” + Math.round(P[1]) + ” ” + Math.round(P[2])

    Dan

  • You have to round each of the pieces:

    P = thisComp.layer(“other layer”).position;
    Math.round(P[0]) + ” ” + Math.round(P[1]) + ” ” + Math.round(P[2])

    Dan

  • Well, in its basic form it would look something like this:

    P = thisComp.layer(“other layer”).position;
    P[0] + ” ” + P[1] + ” ” + P[2]

    but you might want to add rounding and/or other formatting.

    Dan

  • Well, in its basic form it would look something like this:

    P = thisComp.layer(“other layer”).position;
    P[0] + ” ” + P[1] + ” ” + P[2]

    but you might want to add rounding and/or other formatting.

    Dan

  • Dan Ebberts

    September 21, 2005 at 6:00 pm in reply to: motion path following a mask

    Just click the position stopwatch to create a keyframe, then paste.

    Dan

  • Dan Ebberts

    September 21, 2005 at 2:31 am in reply to: PONG expression

    Try this one:

    left = 0;
    top = 0;
    right = thisComp.width;
    bottom = thisComp.height;

    minSpeed = 200; //pixels per second
    maxSpeed = 500;

    minX = left + 20;
    maxX = right – 20;
    minY = top + 20;
    maxY = bottom – 20;

    minR = 5;
    maxR = 85;

    seedRandom(index,true);

    // calc start position

    pos = random([minX,minY],[maxX,maxY])
    quadrent = Math.floor(random(4))*90;
    angle = random(minR,maxR) + quadrent;
    spd = random(minSpeed,maxSpeed);

    // initialize time count;

    t = 0;

    while(t <= time){ rads = degreesToRadians(angle); xVel = spd*Math.cos(rads); yVel = spd*Math.sin(rads); // see if going up or down if (yVel < 0) yLim = top else yLim = bottom; // see if going right or left if (xVel < 0) xLim = left else xLim = right; timeX = (xLim - pos[0])/xVel; timeY = (yLim - pos[1])/yVel; if (timeX < timeY){ //hit left or right wall if (t + timeX >= time){
    deltaT = time – t;
    pos += [xVel,yVel]*deltaT;
    break;
    }else{
    pos = [xLim,pos[1] + yVel*timeX];
    angle = 180 – angle;
    t += timeX;
    }
    }else{ //hit upper or lower wall
    if (t + timeY >= time){
    deltaT = time – t;
    pos += [xVel,yVel]*deltaT;
    break;
    }else{
    pos = [pos[0] + xVel*timeY,yLim];
    angle = 360 – angle;
    t += timeY;
    }
    }
    }
    pos

    Dan

  • Dan Ebberts

    September 21, 2005 at 2:31 am in reply to: PONG expression

    Try this one:

    left = 0;
    top = 0;
    right = thisComp.width;
    bottom = thisComp.height;

    minSpeed = 200; //pixels per second
    maxSpeed = 500;

    minX = left + 20;
    maxX = right – 20;
    minY = top + 20;
    maxY = bottom – 20;

    minR = 5;
    maxR = 85;

    seedRandom(index,true);

    // calc start position

    pos = random([minX,minY],[maxX,maxY])
    quadrent = Math.floor(random(4))*90;
    angle = random(minR,maxR) + quadrent;
    spd = random(minSpeed,maxSpeed);

    // initialize time count;

    t = 0;

    while(t <= time){ rads = degreesToRadians(angle); xVel = spd*Math.cos(rads); yVel = spd*Math.sin(rads); // see if going up or down if (yVel < 0) yLim = top else yLim = bottom; // see if going right or left if (xVel < 0) xLim = left else xLim = right; timeX = (xLim - pos[0])/xVel; timeY = (yLim - pos[1])/yVel; if (timeX < timeY){ //hit left or right wall if (t + timeX >= time){
    deltaT = time – t;
    pos += [xVel,yVel]*deltaT;
    break;
    }else{
    pos = [xLim,pos[1] + yVel*timeX];
    angle = 180 – angle;
    t += timeX;
    }
    }else{ //hit upper or lower wall
    if (t + timeY >= time){
    deltaT = time – t;
    pos += [xVel,yVel]*deltaT;
    break;
    }else{
    pos = [pos[0] + xVel*timeY,yLim];
    angle = 360 – angle;
    t += timeY;
    }
    }
    }
    pos

    Dan

  • Something like this should work:

    f = thisComp.frameDuration*10;
    Math.min(linear(time,inPoint,inPoint+f,0,100),linear(time,outPoint-f,outPoint,100,0))

    Dan

  • Something like this should work:

    f = thisComp.frameDuration*10;
    Math.min(linear(time,inPoint,inPoint+f,0,100),linear(time,outPoint-f,outPoint,100,0))

    Dan

Page 1058 of 1081

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