Forum Replies Created

Page 56 of 277
  • Filip Vandueren

    April 21, 2021 at 10:46 am in reply to: How to make Speedramp effect using extendscript?

    Try this:

    comp = app.project.activeItem;
    var layer = comp.layer(1);
    layer.timeRemapEnabled = true;
    var timeRemapProp = layer.property("ADBE Time Remapping");
    var ease = new KeyframeEase(0, 97);
    var noEase = new KeyframeEase(0, 0.1);
    timeRemapProp.setTemporalEaseAtKey(1,[noEase],[ease]);
    timeRemapProp.setTemporalEaseAtKey(2,[ease],[noEase]);
  • Filip Vandueren

    April 20, 2021 at 8:46 am in reply to: Auto-FontSizing Text that Also Auto-Line Breaks?

    Here’s how to make it run the fastest:

    Add a slider control to your ramptext. layer and give it this expression:

    posterizeTime(0);
    const maxHeight = 400;
    n=50;
    if (sourceRectAtTime(1).height!=0) {
    t=0;
    while (sourceRectAtTime(t).height < maxHeight) {
    t+=thisComp.frameDuration;
    }
    n=timeToFrames(t)-1;
    }
    n;

    Give your visible layer’s sourceText this expression:

    posterizeTime(0);

    n=thisComp.layer("ramptext").effect("Slider Control")("Slider");

    style.setFontSize(n).setText(thisComp.layer("ramptext").text.sourceText);

    posterizeTime(0) does recalculate everytime something changes in the comp while you’re working in it. So dragging a layer can be super slow because it is recalculating the expression while you drag, but when you would render or ram preview, the expression will be evaluated only once.

    So for the fastest workflow while tweaking animations in after effects, you can check what number is the result of the calculation on the slider, disable the expression and manually enter the same value in the slider.

    The don’t forget to re-enable it when you make a template out of it.

  • Filip Vandueren

    April 20, 2021 at 8:16 am in reply to: Auto-FontSizing Text that Also Auto-Line Breaks?

    This one runs smoother for me:

    posterizeTime(0);
    const maxHeight = 400;
    const rampText = thisComp.layer("ramptext");
    n=50;
    if (rampText.sourceRectAtTime().height!=0) {
    t=0;
    while (rampText.sourceRectAtTime(t).height < maxHeight) {
    t+=thisComp.frameDuration;
    }
    n=timeToFrames(t)-1;
    }
    style.setFontSize(n).setText(rampText.text.sourceText);
  • Filip Vandueren

    April 19, 2021 at 10:22 am in reply to: Wiggle across one axis with no overlap

    Here’s my approach building on Dan’s solution (and also on Andrei’s):

    expression for the text-layer named “list”:

    <pre style=”position: relative;”>

    list=[];

    runningTotal = 0;

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

    n=linear(noise([time, i*123]),-1,1,0.01,1);

    runningTotal+=n;

    list.push(runningTotal);

    }

    list.map(e => e * thisComp.width/runningTotal).slice(0,4);

    <div class=”open_grepper_editor” title=”Edit & Save To Grepper”></div>

    The linear() is there to makes absolutely sure there’s no overlap, as it turns out, even the noise() function can go slightly out of bounds…

    And each vertical line’s position gets this expression:

    <pre style=”position: relative;”>list = thisComp.layer(“list”).text.sourceText.split(“,”);
    [list[index-1],value[1]];<div class=”open_grepper_editor” title=”Edit & Save To Grepper”></div>

    (assuming the indexes of the 4 line layers are 1-4)

  • Filip Vandueren

    April 19, 2021 at 10:03 am in reply to: Wiggle across one axis with no overlap

    Don’t know if it’s related, but there’s a slight problem with wiggle(): if you do a wiggle(2,50) it can produce values that are slightly out of the bounds of [-50,50].

    A more precise bounded way can be with noise(), like this:

    n=noise([time*2,index*123])*50; 

    This will keep the random values exactly between -192 and +192.

    the time *2 is roughly equivalent to the frequency, the index*123 makes the noise unique for each layer. if you lower that value, then all layers become more and more correlated.

  • Filip Vandueren

    April 17, 2021 at 6:53 am in reply to: Auto-FontSizing Text that Also Auto-Line Breaks?

    Hi Will,

    I would make a second invisible text layer with an expression that copies the text and that ramps up the font size every frame:

    style.setFontsize(timeToFrames(time));

    and then in a second text layer loop through the frames to look up at what point the sourcRect height exceeds your threshold.

    And alternative but a lot more convoluted approach is to do it on 1 layer band hiding the font size ramp up in negative time, not sure if that would work in this case.

  • Filip Vandueren

    April 16, 2021 at 9:38 am in reply to: Auto-FontSizing Text that Also Auto-Line Breaks?

    What would be the logic on when to line break and when to scale down ?

  • Filip Vandueren

    April 12, 2021 at 7:24 pm in reply to: Changing font on text layer

    give it an expression like this:

    style.setFont("GillSans-Light");

    You can insert the correct name of the font and weight via the Expression Language popup Menu: Text > Font…

  • Filip Vandueren

    April 12, 2021 at 7:20 pm in reply to: Speed expression for metronome animation

    You’ll find the explanation why it happens and the remedy here:

    http://motionscript.com/articles/speed-control.html

  • I think you’ve added the resolution options to an expression control pop-up selector ?

    Those return a number, the index of the selection, and not the actual string of theboption you selected

Page 56 of 277

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