Forum Replies Created

Page 66 of 277
  • Filip Vandueren

    January 7, 2021 at 9:16 am in reply to: Problem with CSV [invalid text layer]

    Yep, looks like that’s a serious bug.

    Anything that’s not a number is of type “Text-Document” and apparantly when extendScript wants to find the value of a TextDocument, it expects that to be inside of a textLayer and trips up.

    I can’t find a way around it other than parsing the whole csv yourself in extendscript using a library like babyparse or papaparse.

    Best to submit it as a bug with adobe

  • Simply go through all the keyframes and keep a tally.

    For example on a point control (convenient, because you can have the minimum on [0] and the maximum on [1] of the point in 1 control)

    posterizeTime(0);

    prop = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");

    min_val = Number.POSITIVE_INFINITY;

    max_val = Number.NEGATIVE_INFINITY;

    for (k=1; k<=prop.numKeys; k++) {

    val = prop.key(k).value;

    if (val>max_val) { max_val=val }

    if (val<min_val) { min_val=val }

    }

    [min_val, max_val]

  • Filip Vandueren

    January 3, 2021 at 4:58 pm in reply to: Is it possible to sequence layers automatically?

    There’s a built-in method:

    Animation -> Keyframe Assistant -> Sequence Layers…

  • Something along these lines:

    if (time < 0){

    s = value.split("\r");

    txt = ""

    for (i = 0; i < s.length; i++){

    if (time > -10*(i+1)){

    txt = s[i];

    break;

    }

    }

    } else {

    txt = value

    }

    //This changes font

    var dropDownFontMenuIndex = thisComp.layer("settings").effect("Font Menu Control")("Menu").value;

    switch ( dropDownFontMenuIndex ){

    case 1:

    style.setFont("Rockwell-Bold");

    break;

    case 2:

    style.setFont("Antonio-Bold");

    break;

    default:

    style.setFont("Rockwell-Bold");

    };

    style.setText(txt);

    style;

  • Filip Vandueren

    December 30, 2020 at 9:20 am in reply to: TIME REMAP EXPRESSION HELP NEEDED!

    Hi Choudry,

    you can place my expressions on a different layer as well, that doesn’t really matter, just need to change some of the references.

    Raising the Audio amplitude to a power remains the best option to increase the effect the audio modulation has, just multiplying or adding a value to it doesn’t really work IMO.

    If you don’t use the sum of all audio amplitudes in calculate the modulation, then you’ll always run into some trouble, either too much or not all of the video’s running time will be used in the final result. So are you just going to ask the user of your templates to experiment with a scaling slider until the video doesn’t run out ?

    If you want the only user interaction to be that they manually have to create the Audio Amplitude layer (no way around that I guess, or you could bundle a script with the template maybe ?), then I propose this:

    A second null layer with:

    A slider to control the depth/punch of the audio (this would be the power the audio gets raised to) -> this is the only thing that needs to be visible for user interaction

    (so these next controls that are just there for calculation can be on a shy layer:)

    A Point Control (Power value) that “copies” the values of the audio amplitudes and adds a power function. (Point Control values don’t get clipped to 1,000,000.0 !)

    a=thisComp.layer("Audio Amplitude").effect("Left Channel")("Slider");
    p=effect("Power")("Slider");
    if (p<0) p=0;
    [Math.pow(a,p),0]

    A last point control that calculates the running sum of the audio amplitudes, using the posterizeTime(0) trick so it only needs to calculate once, not every frame:

    posterizeTime(0);
    total=0
    for (t=0; t<thiscomp.duration; t+="thisComp.frameDuration)" {<br=""> total+=effect("Power value")("Point").valueAtTime(t)[0]
    }
    [total,0]</thiscomp.duration;>

    Finally, the actual expression for timeremapping stays the same as before (once you change the references to the new positions of the data, don’t forget we only need [0] of the point controls values)

  • Filip Vandueren

    December 29, 2020 at 12:54 pm in reply to: How do I generate interlace jittering?

    It looks like a vertical “Wave Warp” distortion,

    (Effect > Distort > Wave Warp)

    • Wave Type: Square
    • Wave Height: 2
    • Wave Width: 2
    • Direction 0°
    • For moving jitters, set the “Wave Speed” to 1/2 of the framerate of your composition, like 15,0 if your Framerate is 30fps

    Put on an adjustment layer set to blendingmode “Color”, since it doesn’t show up in areas that are perfectly grayscale. Plus some blurring

  • Not really with particular. If it’s doable with actual layers (ie. not thousands of particles) you could look into Pastiche, combined with maybe wiggling the positions of the layers a bit.

    And I’m sure StarDust might be able to do it, that’s a super complex modular particle system that offers a lot more finegrained control than Particular, but I have no experience with it personally.

  • Like this:

    app.beginUndoGroup("Randomize - keep Mattes");
    var myComp = app.project.activeItem;
    var n = myComp.numLayers;
    var myLayers = [];
    var myIdx = [];
    for (var i = 1; i<= n; i++){
    if (myComp.layer(i).isTrackMatte) {
    continue
    }
    myLayers.push(myComp.layer(i));
    }
    while(myLayers.length) {
    randomIndex = Math.floor(Math.random()*myLayers.length)
    l=myLayers.splice(randomIndex,1)[0];
    if (l.hasTrackMatte) {
    myIndex = l.index;
    l.moveToBeginning();
    // matte now has the same index as it's target had beofre it was moved up
    myComp.layer(myIndex).moveToBeginning();
    } else {
    l.moveToBeginning();
    }
    }
    app.endUndoGroup();
  • Filip Vandueren

    December 28, 2020 at 8:12 pm in reply to: TIME REMAP EXPRESSION HELP NEEDED!

    Make a new Slider on your Audio Amplitude Layer and name it “total”.

    Give it this expression:

    posterizeTime(0) // should force After Effects to only calculate once
    prop = effect("Both Channels")("Slider");
    total = 0
    for (k=1; k<=prop.numKeys; k++) {
    total+=prop.key(k).value;
    }
    total

    This gives us the total of all the keyframes added up.

    If you see that that value is maxed out like 1000000,00, then simply add an expression something like “value/10000” to your “Both Channels” slider, until the total is an actual value. What value it is does not matter at all, just that it is not “clipped” because it is a too high number.


    We can use this total we calculated to make sure the modulation of your timeremapping ends exactly at the end of the video’s time when the music ends.

    Like this:

    a=0 // the start-value for time-remapping if not 0
    e=19 // the end-value for timeremapping (just a 19second example here)
    b=(e-a)/thisComp.layer("Audio Amplitude").effect("total")("Slider").value;

    t=0;

    f = thisComp.frameDuration;
    while(time>t && time>=inPoint) {
    c=thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider").valueAtTime(t);
    a+=c*b;
    t+=f;
    }
    a-inPoint;

    If you find this modulation is not pumping enough, then what you actallu want is more exrreme differences between quiet and loud peaks of the “both-channels” effect.

    I find that squaring, or a higher power it works best, Expression for “Both Channels”:

    Math.pow(value/70,4)/1; // be sure to check the value doesn't clip again -> adjust /1000

    But it all depends on your source footage: zooming through a 6 minute video within 3 minutes will always be more dynamic than pumping through a 2 minute video with 3 mijnutes audio.

  • No, the visibility doesn’t matter.

Page 66 of 277

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