Forum Replies Created

Page 15 of 17
  • Alex Printz

    October 15, 2018 at 7:25 pm in reply to: Syntax Change;

    That seems to work when the function is isolated, but unfortunately not when it is all together, so either there are multiple problems or something else is happening. Unfortunately the new debug is not even returning a description, only that line 1 has an error.

    Here is a demo scene, showing off the scripts in question. The scripts (work mostly the same) are on the child null, and are looking at the parent nulls for position (and other properties). When the project’s expression engine is switched to Javascript, all of the scripts break. I am guessing it is something simple and syntax since it breaks on all the scripts, but I have no idea where to begin looking at it.

    12810_rebelrebelbrokenscriptsdemo.aep.zip

    Alex Printz
    Mograph Designer

  • Alex Printz

    October 2, 2018 at 2:23 pm in reply to: Generate paths via expressions

    I’ve successfully done EKG lines in AE before; it would be possible to code out a single path to do this, but it would be pretty difficult, since AE does not use any sort of functions to generate lines, but uses vertices data to build them, and it would be very very difficult to control that at all times.

    I would suggest you explore using shape layers with blend modes to intersect and merge spike paths with a horizontal line, and then matte them. Use a ‘path offset’ set to 0 if you’re having difficulty with getting paths to blend.

    How I have done my ekg’s it in the past is created a master shape, and animated that over time, going from flatline to intense.

    Then I would make child shape layers for each spike that would reference their own name, offset their position relative to their name times some ‘offset’ slider value, and then based on another ‘intensity’ slider assume the path data value of the master shape at a certain time and hold that throughout.

    I never rigged the rate of spikes to be different (was doing technology analogies but not organic applications), but I guess you could add another ‘density’ over time to increase the density (or offset) of the layers; their positions would probably have to be recursive though to check the density of all other layers prior to themselves, which would make the expression a pain to calculate each frame.

    Alex Printz
    Mograph Designer

  • Alex Printz

    July 24, 2018 at 2:16 pm in reply to: Techniques for Lightening expression computations?

    Thanks Kalleheikki, but there are no acceleration expressions present. There are collision detection expressions (that are limited to the in/out points, so only when the effect is required is it running), and there are some cross-comp links that might be dragging everything down.

    There are also some recursive scripts (check shapelayer index, multiple offset by index number, etc.) for some radar assets I need, but I have looped them as precomps so they ought to be only cycling the same ~6 frames, so they should only need to be calculated once.

    Thanks for the suggestions though. Any other scripting efficiency stuff you can think of I’d love to learn.

    Alex Printz
    Mograph Designer

  • Alex Printz

    July 23, 2018 at 2:34 pm in reply to: Custom ease

    It would look something like this. Note that I stripped out all of the ease&Wizz dimension checks because you are only providing the X-value scale in your linear functions.

    If you wanted to update the bezier animation functions, all you need to do is change the “easeandwizz_inOutQuint” function.

    // Ease and Wizz 2.0.4 : inOutQuint : All keyframes
    // Ian Haigh (https://ianhaigh.com/easeandwizz/)
    // Last built: 2013-07-05T11:46:51+10:00

    // some Ease & Wizz defaults
    var p = 0.81; // period for elastic
    var a = 50; // amplitude for elastic
    var s = 1.70158; // overshoot amount for "back"
    var r = 1; //aka scaleInTime
    var x = value[0];

    o = easeAndWizz();
    [o,o]

    function easeAndWizz() {
    if ((time < inPoint) || (time > (inPoint + r))) {
    return x;
    } else {
    return easeandwizz_inOutQuint(time - inPoint, 0, x, r, a, p, s);
    }
    }

    function easeandwizz_inOutQuint(t, b, c, d) {
    if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
    return c/2*((t-=2)*t*t*t*t + 2) + b;
    }

    Alex Printz
    Mograph Designer

  • Alex Printz

    July 23, 2018 at 1:59 pm in reply to: Checkbox OFF to trigger animation

    try this:

    n = 0;
    p = effect("Player 01")("Checkbox");
    if (p.numKeys > 0){
    n = p.nearestKey(time).index;
    if (p.key(n).time > time) n--;
    }
    if (n > 0 && p.key(n).value == 0)
    time - p.key(n).time
    else
    0

    Alex Printz
    Mograph Designer

  • Alex Printz

    July 18, 2018 at 5:03 pm in reply to: Parallax Scale with Null Object?

    a little late, but give DuIK’s parallaxing 2D camera a try.

    Alex Printz
    Mograph Designer

  • I don’t think you can have recursive expressions like that that build on each other, since I think sourceRec requires a measurement relative to the composition (someone correct me if I’m wrong).

    You could try setting a keyframe at t=-1 with your initial size/text animation, and then having your final size/text animation on another burner keyframe t=-2, and then references sourceRecAtTime(-1/-2) for your two different sizes?

    Alex Printz
    Mograph Designer

  • try it in this order, so that the smooth’d code is feeding into the ease (set your variable names to whatever you desire)

    s = smooth(.2,5);
    ease( s , inLow , inHigh , outLow , outHigh );

  • You would need to create some additional lines of code to convert a variable over time into your values. If you had something keyed, you could measure the first and last keyframes and scale proportionately to the keyframe value.
    You could also write a bezier equation to pass the value through.

    Then use the output of your equation/property scale as an input on a linear function.

    I can’t be more specific than that because we have no idea of knowing what your easing output looks like.

    -Alex

  • Alex Printz

    July 16, 2018 at 2:12 pm in reply to: Layer points to another layer with delay?

    This will take e.g. 99 frames (or whatever you set to t) and use the positions that the values were at at that time to calculate the delta. Adjust as necessary to get the result you want (maybe drop the t for L1(thisLayer)?


    t = time-framesToTime(99);
    L1 = thisLayer;
    L2 = Null_01;
    p1 = L1.toWorld(L1.anchorPoint,t);
    p2 = L2.toWorld(L2.anchorPoint,t);
    delta = p2 - p1;
    follow = radiansToDegrees(Math.atan2(delta[1],delta[0]));

Page 15 of 17

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