Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Increasing shape layer size in increments controlled by a Slider Control?

  • Increasing shape layer size in increments controlled by a Slider Control?

    Posted by Pedro Amaral on January 8, 2016 at 5:14 pm

    Hi there,

    I’m trying to animate a rectangle shape layer to increase or decrease its size in increments of 135px horizontally and 120px vertically, but want to have a Null with 2 independent Slider Controls (to resize in X or Y).

    If possible, in addition to the above I’d like to limit the Slider Control to -12 and 12 units only for vertical resize and -9 and 9 units for horizontal resize.

    Going Negative would lower the value and Positive would increase the value. This might not be entirely possible in only 2 Sliders but I’m assuming it may be possible with 4 Slider Control instead, 2 being used as Vertical Positive (add) and Vertical Negative (subtract) and 2 as Horizontal Positive and Horizontal Negative?

    Could someone help me with the expressions to make this real?

    Many thanks in advance.

    Pedro Amaral replied 10 years, 3 months ago 2 Members · 4 Replies
  • 4 Replies
  • Pedro Amaral

    January 8, 2016 at 6:09 pm

    Hey Dave,

    Thanks for your quick reply.

    Having the slider will allow me to link a whole bunch of different layers and different properties to that one single controller without having to keyframe each one of them individually. It speeds up the entire process.

    Also, I should rephrase my question as adding increments will just make the size jump every 135px or 120px by sliding the controller.
    What I want instead would be for the Size to animate, for example, from 0px to 135px smoothly (will this be achievable by converting the slider units to % ?)

    Thanks.

  • Cassius Marques

    January 8, 2016 at 7:56 pm

    Use an expression on the size property.

    Something along the line:

    value + [135*effect("Slider Control X")("Slider"),120*effect("Slider Control Y")("Slider")]

    If you animate your slider from -12 to 12 it will go from -1620px to 1620px as smoothly as you set your keyframes influences.

    Cassius Marques
    http://www.zapfilmes.com

  • Pedro Amaral

    January 11, 2016 at 10:28 am

    Hey Cassius,

    Thank you so much for your help, it works perfectly.

    This is a minor thing but is there a way to constrain the slider min. and max. values?
    As in the maximum value the slider goes is either -12 or 12?

    Thanks in advance.

  • Pedro Amaral

    January 11, 2016 at 10:33 am

    Oh ok, I think this might do it:

    clamp(value, min=-12, max=12)

    Thanks anyway!

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