Forum Replies Created

Page 101 of 1081
  • If you just need your expression to look at markers on the precomp layer instead of keyframes on your control layer, you should be able to just change this line:

    s = thisComp.layer("CONTROL_politicalParties").effect("START ANI")("Slider");

    to this:

    s = marker;

  • If it’s a small number of words you could do it like this:

    txt = text.sourceText;
    txt.length > 0 && (txt == "Sat" || txt == "Sun") ? 100 : 0;
  • <div>Maybe something like this for position:</div>

    fade = effect("Fade Time")("Slider");
    hold = effect("Hold Time")("Slider");
    upperLeft = [50,50];
    lowerRight = [thisComp.width-50,thisComp.height-50];
    period = fade + hold;
    seed = Math.floor((time - inPoint)/period);
    seedRandom(seed,true);
    random(upperLeft,lowerRight);

    and something like this for opacity:

    fade = effect("Fade Time")("Slider");
    hold = effect("Hold Time")("Slider");
    period = fade + hold;
    t = (time - inPoint)%period;
    linear(t,0,fade,0,100

    Adjust upperLeft and lowerRight in the position expression to define the rectangular random area.

  • Dan Ebberts

    December 24, 2021 at 5:00 pm in reply to: Getting rotation value between two position values

    A lot of the old expressions got mangled when they updated this site. The straight quotes got converted to curly quotes and the minus signs got converted to some other character. This should work better:

    L1 = thisComp.layer("Layer 1");
    L2 = thisComp.layer("Layer 2");
    p1 = L1.toWorld(L1.anchorPoint);
    p2 = L2.toWorld(L2.anchorPoint);
    delta = p2 - p1;
    radiansToDegrees(Math.atan2(delta[1],delta[0]));
  • Dan Ebberts

    December 19, 2021 at 1:38 am in reply to: Text expression random wiggLe per character

    I think that was an attempt to keep the text in the range defined by the original base line and the maximum upward y amount, but I think I got it wrong–it should have been like this:

    freq = 1;

    seedRandom(textIndex,true);

    [0,50] + wiggle(freq,50)-value;

  • Ah yes, that would happen if you go above 100%. This should fix it:

    charsPerSec = 7;

    randPct = 75;

    seedRandom(index,true);

    prevDelay = 0;

    avgDelay = 1/charsPerSec;

    minDelay = avgDelay*Math.max(.1,1-randPct/100);

    maxDelay = avgDelay*(1+randPct/100);

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

    prevDelay += random(minDelay,maxDelay);

    }

    (time - inPoint) > prevDelay ? 0 : 100

  • If you’re using the Typewriter animation preset, you could add an expression selector, delete the range selector and add this expression to the expression selector’s amount property (adjust overall speed with charsPerSec and randomness with randPct):

    charsPerSec = 7;

    randPct = 75;

    seedRandom(index,true);

    prevDelay = 0;

    avgDelay = 1/charsPerSec;

    minDelay = avgDelay*(1-randPct/100);

    maxDelay = avgDelay*(1+randPct/100);

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

    prevDelay += random(minDelay,maxDelay);

    }

    (time - inPoint) > prevDelay ? 0 : 100

  • Dan Ebberts

    December 11, 2021 at 1:18 am in reply to: Automate Comps using list of names

    You’d have to come up with a custom script to read and process the xml or csv. Probably not too tough if you have scripting experience, but would take some time if it’s your first script.

  • Try this:

    //LOOKING AT: Star 2

    target = thisComp.layer("Star 2");

    p1 = fromWorld(thisLayer.toWorld(transform.anchorPoint));

    p2 = fromWorld(target.toWorld(target.anchorPoint));

    look=lookAt(p1,p2);

    [look[0],look[1]+180,look[2]]

  • Dan Ebberts

    December 10, 2021 at 1:49 pm in reply to: Alternating text styles in a sourceText property

    Unfortunately, once you apply an expression to sourceText, all characters get the same style as the first character. So I don’t think there’s a way to do what you want with a single text layer.

Page 101 of 1081

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