Forum Replies Created

  • Hi Experts,

    I gon through the video attached by Scott and several other videos on youtube but unfortunately, don’t find the solution in these videos.

    As Filip said that “It is not easy to achieve this task with the only expressions” that why I have changed my approach and I came to very close to the required result with the combination of expressions (easeOut()…..) and Marker.

    But the problem is that the expression is only working(Here Position value Interpolating From 711.9059 to 919.9059 in the duration of 0.5 second as per my requirement.) at First Marker (index 0) on the layer and at the second Marker (index 1) on the same layer, Interpolation method expression “easeOut()” is not working and yPosition value Jumping directly From 919.9059 to 711.9059 in a single frame. What is the solution at the second marker so that It should also interpolate the same as at the first Marker.

    I have attached The Project File Here, please go through it. It will be very helpful in understanding the problem.
    https://1drv.ms/u/s!AqasXseMlvyPnFWVtHkVyb2xWCfG?e=sN8CSc

    Here is the Expression applied on Yellow Solid Layer yPosition;

    YELLOW=thisComp.layer("SLIDER CONTROL").effect("YELLOW")("Slider");
    BLACK=thisComp.layer("SLIDER CONTROL").effect("BLACK")("Slider");
    var arr = [YELLOW,BLACK];
    arr.sort(function(a, b){return b - a});
    var r =arr.indexOf(YELLOW);

    m = thisLayer.marker;
    i = m.nearestKey(time).index;

    if (m.nearestKey(time).time > time)
    { i--;
    }
    if (i < 1) { i = 1;
    }
    else{i;
    }

    timeAtMarker_i=thisComp.layer("Yellow").marker.key(i).time;
    startPoint=thisComp.layer("Yellow").marker.key(i).time;
    endPoint=startPoint+0.5;
    beginCount=thisComp.layer("Yellow").transform.yPosition.valueAtTime(timeAtMarker_i);
    t=time;

    if ( r >= 0 && r<1) {
    yPosition = easeOut(t, startPoint, endPoint, beginCount, 711.9059);

    } else if ( r >= 1 && r<2) {
    yPosition = easeOut(t, startPoint, endPoint, beginCount, 919.9059);

    } else {
    value;
    }

    I am very thankful to you guys. Please help me, I’m not very good at expression.
    Here is a screenshot too.

    Regards

    Carl Ranger

  • Sir Thanks for Your reply.
    I have already tried the Interpolation method. it is not working because slider value is changing over time and because of that position rank (index) also changing.

    Here is the expression code, I have tried;
    if ( r >= 0 && r<1) {
    beginCount = transform.yPosition.valueAtTime(time-1.1);
    endCount = 295.9059;
    stopTime = (time-1.1)+0.5;
    startTime=(time-1.1);
    t = time;
    s = linear (t, startTime, stopTime, beginCount, endCount);

    I have tried Another varient of linear() expression;
    if ( r >= 0 && r<1) {
    beginCount = transform.yPosition.valueAtTime(time-1.1);
    endCount = 295.9059;
    dur = 0.5;

    t = time-inPoint;
    s = linear (t, 0, dur, beginCount, endCount);

    But unfortunately, the result is the same i.e. position value directly jump from the previous one to output(for eg 295.9059).

    Here is the screenshot of my project method1:
    Method1

    Method2;

    My problem will solve if we can get the timestamp of , When condition met i.e. if ( r >= 0 && r<1).

    I can achieve this with the help of a marker but want a complete automated expression method.

    Regards

    Carl Ranger

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