Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Attach Mask Expansion to a limited Slider Expression Control

  • Attach Mask Expansion to a limited Slider Expression Control

    Posted by Rainier Raydán on October 9, 2016 at 5:40 pm

    Hey guys!

    I have a circle going up and down in a cycle. It goes from 300 to 460 in Y position

    I also have a solid with a circle mask so it can be the shadow of that circle.

    So… I want the Mask Expansion to grow and and go back to it original size but controlled by the Circle 1 layer proximity to the shadow. I can’t figure it out…

    I was thinking in a Slider Control that is controlled by the Circle 1 Y Position so I can attach the Mask Expansion it but the value is huge (300to460) and the value that worked for me was -6to-19 for the mask expansion.

    I was wondering if there is a way to convert the Y Position to %, so 300 can be 0% and 460 can be 100% and then use another slider control for the mask expansion converter to %, that way -6 can be 100% and -19 can be 0%. The would give me the liberty to use the sliders in % so the value can oscillate from a determined range (in this case -6to-19).

    I can do this in kayframes but I want more liberty on the animation.

    Can anybody help me?

    Thanks!

    Rainier Raydán replied 9 years, 7 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 9, 2016 at 6:14 pm

    You could do it directly, like this:

    y = thisComp.layer(“Circle 1”).transform.yPosition;
    linear(y,300,460,-9,-19)

    However you do it, linear() is the key to transforming one range to another.

    Dan

  • Rainier Raydán

    October 9, 2016 at 6:53 pm

    Wow! It worked! Thanks! ?

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