Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Linear interpolation to hold interpolation expression

  • Linear interpolation to hold interpolation expression

    Posted by Ale Elizondo on September 25, 2014 at 4:50 pm

    Hello community!

    I am trying use the interpolation expression: linear(t, tMin, tMax, value1, value2), but I want that the result in the property be hold interpolation instead of linear interpolation, to obtain only the highest and lowest values without any interpolation between values.

    I hope you can help me.

    Dan Ebberts replied 11 years, 7 months ago 2 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    September 25, 2014 at 5:19 pm

    Maybe like this:

    if (t < (tMin+tMax)/2) value1 else value2

    Dan

  • Ale Elizondo

    September 25, 2014 at 6:24 pm

    Thanks for your response Dan.

    I use this as follows:

    t=thisComp.layer(“ojo 2”).transform.scale[1];
    if (t < (0+100)/2) 100 else 0

    this on Opacity property, but there are some problems :/

    my idea is to invert the values ​​and this works but until the value is less than 50, I guess this is why the division is by 2, I want the change to happen until it reached the maximum or minimum value

  • Dan Ebberts

    September 25, 2014 at 6:30 pm

    OK, so the output changes when the value becomes greater than the maximum value and doesn’t change back until it becomes less than the minimum value, is that correct? If so, that’s a much more complex expression, which will have to examine previous frames to see how input got to its current value.

    Dan

  • Ale Elizondo

    September 25, 2014 at 6:49 pm

    For example when the Scale of the first object is 100 the opacity of second object is 0 that is correct but when the scale changes to 99 the opacity changes to 100 this doesn’t work for what I want. This question was for properties of one dimension, I would like make it too with an interpolation between property of two dimension to one dimension, how from scale to opacity, I guess this will be more difficult XD.

    Thanks for review this Dan

  • Dan Ebberts

    September 25, 2014 at 7:19 pm

    Sorry–I’m a little lost. If there’s a one-to-one correspondence between input values and output values, that’s easy. If the output value depends at all on the history of the input value, that’s a different story. I can’t tell which case we’re talking about here.

    Dan

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