Forum Replies Created

Page 1 of 5
  • Jacob Roth

    July 24, 2019 at 7:30 pm in reply to: Find the postition of the End Point of a Trim Path

    Works like a dream! Thanks Dan.

  • Jacob Roth

    February 20, 2019 at 1:17 pm in reply to: Keylight out of memory

    2019

  • Jacob Roth

    February 6, 2019 at 2:28 pm in reply to: Motion Tile Phase Question

    Thanks everybody.

    What I ended up doing was creating one column through the motion tile width setting, then duplicating that comp as many times as I needed. Then I made a control layer for odds, one for evens, and then phase got time*x or -x depending on odd or even. It worked, but was a pretty heavy render.

  • Jacob Roth

    October 31, 2018 at 5:46 pm in reply to: PONG expression

    Now I can’t seem to define xLim. Error at line 46, xLim is missing or does not exist.

    content = thisLayer.sourceRectAtTime();
    left = content.width/2;
    top = content.height/2;
    right = thisComp.width-content.width/2;
    bottom = thisComp.height-content.height/2;

    minSpeed = 100; //pixels per second
    maxSpeed = 100;

    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 = (yVel < 0) ? top : bottom;
    // see if going right or left

    if (xVel < 0) xLim = (xVel < 0) ? left : 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

  • Jacob Roth

    October 31, 2018 at 3:28 pm in reply to: PONG expression

    Sorry, that’s not right. The error is at line 32, and it’s a timeout waiting for the engine.

    rads=degreesToRadians(angle);

  • Jacob Roth

    October 31, 2018 at 3:25 pm in reply to: PONG expression

    Thanks for the response.

    Subbing your suggestions gives me an error at line 65, which is…

    t += timeY;

  • Jacob Roth

    October 31, 2018 at 1:34 pm in reply to: PONG expression

    Hi Dan,

    This expression is great, but is there any way for the layer to bounce at its layer edges and not the anchor point?

  • Jacob Roth

    July 6, 2018 at 3:12 pm in reply to: Attach marker to source Text keyframe

    Are you trying to get the source text to reflect marker comments? If so, here’s your code.

    m = thisComp.layer("Your Layer"); // source text layer name inside parens and quotes
    n=0;
    if (m.marker.numKeys > 0){
    n = m.marker.nearestKey(time).index;
    if (m.marker.key(n).time > time) n--;
    }
    if (n > 0) m.marker.key(n).comment else ""

  • Jacob Roth

    July 5, 2018 at 7:30 pm in reply to: Randomize Items in a Grid

    Dan Ebberts has a random grid at motion script.

    https://www.motionscript.com/expressions-lab-ae65/random-grid-movement.html

  • Jacob Roth

    June 26, 2018 at 12:22 pm in reply to: Scale based on luminance

    You could add a transform effect. That would give you a second Scale attribute.

Page 1 of 5

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