ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

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

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Pedro Amaral
Increasing shape layer size in increments controlled by a Slider Control?
on Jan 8, 2016 at 5:14:00 pm
Last Edited By Pedro Amaral on Jan 8, 2016 at 5:19:28 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.


Return to posts index

Dave LaRonde
Re: Increasing shape layer size in increments controlled by a Slider Control?
on Jan 8, 2016 at 5:27:51 pm

I must ask: is it imperative that you use sliders?
What do you seek to gain by using them?
Could this be accomplished with simple keyframes instead?

I always seek simplicity.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Pedro Amaral
Re: Increasing shape layer size in increments controlled by a Slider Control?
on Jan 8, 2016 at 6:09:37 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.


Return to posts index


Cassius Marques
Re: Increasing shape layer size in increments controlled by a Slider Control?
on Jan 8, 2016 at 7:56:44 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


Return to posts index

Pedro Amaral
Re: Increasing shape layer size in increments controlled by a Slider Control?
on Jan 11, 2016 at 10:28:10 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.


Return to posts index

Pedro Amaral
Re: Increasing shape layer size in increments controlled by a Slider Control?
on Jan 11, 2016 at 10:33:32 am

Oh ok, I think this might do it:

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


Thanks anyway!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]