Forum Replies Created

Page 54 of 277
  • Filip Vandueren

    May 6, 2021 at 1:03 pm in reply to: Auto vertical align comp

    It probably has to do with using sampleImage() on a collapsed layer, and the result of the sampleImage is that the layer changes, so the result of sampleImage() would change too, a sort of circular error.

    The easiest way around that would be to have a 2nd invisible copy of the precomp which doesn’t have any expressions applied, and sample that one.

    so line 2 becomes:

    l=thisComp.layer("Comp 2 copy"); // not this layer but a copy !
  • Filip Vandueren

    May 6, 2021 at 12:49 pm in reply to: Auto vertical align comp

    Strange. posterizeTime(0) should take care of this.

    Mind you: this does mean that it only looks at what’s in the precomp at time=0, it theres’ nothing there yet…

    You can change the two t=time mentions to something like t=2 to look at the vertical boundingbox at the 2 second mark of the precomp.

    Other than that, I can’t replicate the halting/crashing behaviour ?

  • Filip Vandueren

    May 3, 2021 at 12:02 pm in reply to: Auto vertical align comp

    Hi Benjamin,

    give this expression to the layer’s position:

    [value[0],thisComp.height/2];

    and this expression to the layer’s anchorPoint:

    posterizeTime(0);
    l=thisLayer;
    // upperbound:
    for (i=0; i<l.height; i++) {
    samp = l.sampleImage([l.width/2, i+0.5], radius = [l.width, .5], postEffect = true, t = time);
    if (samp[3]!=0) break;
    }
    upper = i;
    // lowerbound:
    for (i=height; i>upper; i--) {
    samp = l.sampleImage([l.width/2, i-0.5], radius = [l.width, .5], postEffect = true, t = time);
    if (samp[3]!=0) break;
    }
    lower = i;
    [value[0], (upper+lower)/2];

    Mind you: it doesn’t work if your text and images fall outside of the bounds of the original Precomp, let me know if that would be a problem.

  • Filip Vandueren

    April 30, 2021 at 12:15 pm in reply to: Text layers to maintain distance from each other

    Here’s a third solution ;-), based on Trent’s, but also obeying the scaling of the previous layer (you mentioned you waneted to animate them, so maybe you want to scale them up and down too and have the other text-layers react):

    s = thisComp.layer("TEXT 1").effect("Padding")("Slider");
    prev = thisComp.layer(index - 1);

    w = prev.sourceRectAtTime().width;

    prev.toComp([w + s, 0]);

    (This assumes all text-layers are standard Left Aligned Text though)

  • Forgot to mention: to effectively use the timewarp effect, first make sure that there are no repeated frames.

  • Try using the timewarp effect. Or timeremapping with frameblending set to the highest quality (which also uses the timewarp algorithm, but without being able to tweak the settings)

    Timewarp will make “intermediate” positions by analyzing the motion vectors and morphing between 2 adjacent frames, not just crossfade between them (as low quality frameblending does)

  • Filip Vandueren

    April 29, 2021 at 12:25 pm in reply to: Text layers to maintain distance from each other

    The easiest is if you make a parent-chain, always parent the next layer to the one that should be to its left.

    Then you can give position this expression:

    sr=parent.sourceRectAtTime(time);
    [sr.left+sr.width,0]+value;

    Start by setting the position to 0,0 and then you can tweak to get the word-spacing right

  • Filip Vandueren

    April 27, 2021 at 6:13 pm in reply to: JSON / Essential Graphics performance in AE

    Yes, I meant that if you add a huge csv or JSON to the timeline, you can pickwhip to the individual exposed parameters that then show up in the timeline, but I found that was very slow, especially for cvs’s with 1000s of items, which was nearly unworkable

  • Filip Vandueren

    April 27, 2021 at 12:56 pm in reply to: Type, Wiggle, Loop

    – Create Text-layer

    – select Animate -> Opacity and set it to 0

    – remove the default range selector

    – add a Wiggly Selector

    – set its Wiggles/second to 0 !

    – give Temporal Phase this expression:

    loop = 10; //loops in 10 seconds

    wiggles=1;

    Math.cos(time*6.2831853071/loop)*wiggles*360*loop/6.2831853071;

    – give Spatial Phase this similar expression (cos -> sin):

    loop = 10; //loops in 10 seconds

    wiggles=1;

    Math.sin(time*6.2831853071/loop)*wiggles*360*loop/6.2831853071;

    You can still tweak Random Seed and Correlation, but Wiggles/Second parameter has to be 0 or it will not loop. The wiggles variable in the expression is equivalent to wiggles/second.

    (6.2831853071 = 2*pi)

  • Filip Vandueren

    April 27, 2021 at 12:33 pm in reply to: JSON / Essential Graphics performance in AE

    I’ve found that reading and parsing CSV or JSON myself in expressions (by using something like papaparse or just manipulaitng strings and splits) and not adding the data to the timeline was much faster last year, haven’t tested again with CC2021.

    At rendertime, I think after effects first does a sort of internal “convert to keyframes” before the first frames actually is rendered. But while working and preveiwing in AE it can be much slower.

    You can try to create a textlayer (in a different comp even ?) with an expression that starts with posterizeTime(0), do all your json lookups in there and return a list or an object that all the other expressions read out, that can speed things up since the JSON-file only needs to be accessed once, not by every individual expression.

    But again here: posterizeTime(0) will not prevent after effects from recalculating things while you are working and tweaking other things (for all AE knows, the expression might depend on a different layer’s position for example, so it’s constantly recalculating when you move seomthing), only at rendertime will it calculate just once instead of every frame.

Page 54 of 277

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