Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Link Opacity to Y position

  • Link Opacity to Y position

    Posted by Topher Blair on April 5, 2017 at 10:46 pm

    Hi,
    I need to be able to link Opacity to the Y position of an object. If the object is above -80 y position, it needs to be full. If it’s below 80, it needs to be at 0% opacity. if it’s between the two it needs to fade. Is there a way to accomplish this?

    Thanks!

    Topher Blair replied 9 years, 4 months ago 1 Member · 2 Replies
  • 2 Replies
  • Topher Blair

    April 5, 2017 at 11:16 pm

    Hi, I actually miswrote what I meant. If y is less than 460, then I need opacity needs to be 100%, if it’s greater than 620, it needs to be 0%

  • Topher Blair

    April 5, 2017 at 11:22 pm

    Actually I think I’ve figured it out. Not sure that this is the most elegant solution, but this is what I came up with…

    if (transform.position[1] < 460) t = 0 else
    t = (transform.position[1] - 460)/160
    linear(t, 100, 0)

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