Forum Replies Created

Page 1 of 8
  • The attached code works on position property, you will need to change it in case a different property is desired.
    The number of loops is set by the loops variable.

    Note: the actual property change done via keyframes is considered as the first loop.

    Elad

    loops = 5;
    FirstKeyFrameTime = thisComp.layer(index).position.key(1).time;
    LastKeyFrameTime = thisComp.layer(index).position.key(numKeys).time;
    if (time < (loops * (LastKeyFrameTime - FirstKeyFrameTime))) {
    loopOut(type = "cycle", numKeyframes = 2)
    }
    else {
    position.valueAtTime(LastKeyFrameTime )
    }

  • Elad Menashe

    March 6, 2010 at 10:06 am in reply to: Clock

    This code will work in all cases, except overflowing of the Hours
    in case you’ll get to 23:59:59:24 next frame will be 24:00:00:00

    Enjoy

    separator = ":"

    // offset
    startH = 21;
    startM = 19;
    startS = 20;
    startF = 02;

    // calculate current time in H:M:S:F format
    framesPerSec = 1/thisComp.frameDuration;
    F = Math.round((time % 1) * framesPerSec);
    timeRemainder = Math.floor(time);
    S = timeRemainder % 60;
    timeRemainder = timeRemainder - S;
    timeRemainder = timeRemainder / 60;

    M = timeRemainder % 60;
    timeRemainder = timeRemainder - M;
    timeRemainder = timeRemainder / 60;

    H = timeRemainder; // there's no handling if H > 24...

    // add offset
    F = F + startF
    S = S + startS
    M = M + startM
    H = H + startH

    // check overflowing
    if (F >= framesPerSec)
    {
    F = F - framesPerSec;
    S = S + 1;
    }

    if (S >= 60)
    {
    S = S - 60;
    M = M + 1;
    }

    if (M >= 60)
    {
    M = M - 60;
    H = H + 1;
    }

    // add "0" to the beginning of the number if it is smaller than 10
    StrF = (F < 10 ? "0" : "") + F;
    StrS = (S < 10 ? "0" : "") + S;
    StrM = (M < 10 ? "0" : "") + M;
    StrH = (H < 10 ? "0" : "") + H;

    "" + StrH + separator + StrM + separator + StrS + separator + StrF

  • Elad Menashe

    March 6, 2010 at 10:05 am in reply to: Clock

    There are two ways to resolve the clock:
    The first is using timeToTimecode (a built-in AE expression method)
    Problem is it is bounded by 3 hours, each time above 3 hours will show 3:00:00:00
    But the code is much simpler

    The second option will be in the next message

    startH = 1; // 21 will overflow
    startM = 19;
    startS = 20;
    startF = 02;

    timeShift = startH * 3600 + startM * 60 + startS + startF * thisComp.frameDuration;

    framesPerSec = 1/thisComp.frameDuration;
    timeToTimecode(t = time + timeShift, timecodeBase = framesPerSec, isDuration = false)

  • Elad Menashe

    March 4, 2010 at 3:01 pm in reply to: sine/cosine interpolation hand-written

    I’m not sure I understand you correctly, there are to options, let me know what fits best your desire:
    1) go from p1 to p2 in a ping-pong loop
    2) go from p1 to p2 when reaching p2 go to p3, when reaching p(i) go to p(i+1)

    if option 1 is the one: linY should be:
    linY = p1[1] + t*(p2[1]-p1[1]);

    if option 2 is the one you have several options
    a. hardcode it, set times: t2, t3. when time < t2 interpolate from p1 to t2, etc. b. use comp markers to define when to interpolate, this is also involve hardcoding the points, but you will be able to play with the times more easily. Let me know if that helps Elad

  • Elad Menashe

    March 4, 2010 at 2:34 pm in reply to: In need of inspiration

    Try Re:Flex, a morph/warp plug-in from revision FX:
    https://www.revisionfx.com/products/reflex/

    or you can see this tutorial: https://library.creativecow.net/articles/zwar_chris/morph.php

    Hope that helps
    Elad

  • Elad Menashe

    May 6, 2009 at 7:41 am in reply to: Lazers in After Effects

    This tutorial should do the trick:
    https://www.trapcode.com/info_smoke.html

    Your logo layer should be a composed of small circles

    Elad

  • Elad Menashe

    February 3, 2009 at 12:06 pm in reply to: Random Position/Scale Expression

    Although it is possible to solve this with expression it would be better to use AE text animators with a wiggly selector.
    You can set the parameters to move the whole text at once.
    Let me know if you need extra help with that.

    Regards
    Elad

  • Elad Menashe

    January 27, 2009 at 1:15 pm in reply to: does anyone know how to animate Bezier Lines effect ?

    This is done using Trapcode form

  • Elad Menashe

    January 18, 2009 at 2:57 pm in reply to: Girl sucked into a sand dune

    Thanks for the help.
    I’ll update how it worked out 🙂

    Elad

  • If I understand you correctly you shouldn’t do this with expressions.
    In order to change the time it takes to transition from one mesh to another you should move the Distortion Mesh keyframes in the timeline.
    For example: if you have keyframes A & B which are one second apart, moving B closer to A will make the mesh to change more rapidly. This is done without affecting the mesh, you only move the keyframes in the timeline.

    This can be solved with expressions but it’s cumbersome.

    Regards,
    Elad

Page 1 of 8

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