Forum Replies Created

Page 117 of 1081
  • Dan Ebberts

    April 15, 2021 at 12:52 pm in reply to: Play and Pause on markers

    Give this time remapping expression a try:

    m = thisComp.layer("Null 1").marker;

    t = 0;

    if (m.numKeys > 0){

    n = m.nearestKey(time).index;

    if (time < m.key(n).time) n--;

    t = (n > 0) ? time - m.key(n).time : 0;

    }

    t

  • This change will add in a delay based on the first comp marker:

    m = thisComp.marker;

    mDelay = m.numKeys > 0 ? m.key(1).time : 0;

    fadeDuration = thisComp.frameDuration*10;

    maxDelay = .5;

    seedRandom(index,true);

    delay = random(maxDelay) + mDelay;

    t = time -(inPoint + delay);

    linear(t,0,fadeDuration,100,0);

  • Dan Ebberts

    April 13, 2021 at 7:00 am in reply to: Wiggle across one axis with no overlap

    I don’t know if this will help or not, but it might get you started. If you create a text layer (named “text”) with this as the source text expression:

    w = [];

    n = 5;

    for (i = 1; i <=5; i++){

    seedRandom(i,true);

    w.push((position.wiggle(1,1000)-position)[0]);

    }

    w.sort((a,b)=>a-b)

    and then create 5 tall skinny solids (below the text layer in the layer stack, layers 2 – 6), each with this position expression:

    x = thisComp.layer("text").text.sourceText.split(",")[index-2];

    value + [x,0]

    You should get horizontal random movement but the layers won’t cross. You can turn off the eyeball for the text layer (or move it outside the comp boundary).

  • This is not very efficient, but it might do what you want (or at least give you an idea):

    freq = 2;

    amp = 10;

    f = timeToFrames(time);

    accum = 0;

    for (i = 0; i <=f; i++){

    t = framesToTime(i);

    accum += Math.abs(wiggle(freq,amp,1,.5,t) - valueAtTime(t));

    }

    value + accum

  • Dan Ebberts

    April 5, 2021 at 4:25 pm in reply to: Multiple slider controls on a single text layer

    Like this?

    s1 = effect("Slider Control")("Slider").value;

    s2 = effect("Slider Control 2")("Slider").value;

    s1.toFixed(0) + "," + s2.toFixed(0)

  • Dan Ebberts

    April 5, 2021 at 4:19 pm in reply to: Scale rotated layer to fit comp size

    Something like this maybe:

    a = degreesToRadians(rotation);

    s = Math.abs(Math.sin(a));

    c = Math.abs(Math.cos(a));

    w = width*c + height*s;

    h = width*s + height*c;

    [100,100]/Math.max(w/thisComp.width,h/thisComp.height)

  • Dan Ebberts

    April 4, 2021 at 12:00 am in reply to: defining fields

    You need more information than is available by simply looking at the position value. You need the history of where the layer was before it entered the in-between zone. You could use valueAtTime() to walk back, frame-by-frame, from the current time to the most recent time the layer was in one of the fields, and use that value to calculate your current time remapping value.

  • Dan Ebberts

    April 2, 2021 at 5:07 pm in reply to: Fade back out when equal to a value..

    It’s tricky, and can be complicated by exactly how you need it to operate. In any case, the trick is to find the event that triggers the fade. In the simplest scenario (where once the layer reaches the end threshold, it stays there) you just need to check if the Difference is currently less than end. If so, you need to use valueAtTime() to traverse back in time, frame by frame, to find out when that happened (Difference went from greater than end to less than end) and use that time to drive your fade out. If your scenario is more complex (like there might be multiple triggering events) the expression gets correspondingly more complicated.

  • Dan Ebberts

    March 29, 2021 at 7:42 pm in reply to: Toggle on/off multiple checkbox Controllers

    Effect > Expression Controls > Dropdown Menu Control. You can customize the number of items and their names, letting you select 1 of n mutually exclusive options.

Page 117 of 1081

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