ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Wiggler "Y" and Slider Control

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Matteo Ferreccio
Wiggler "Y" and Slider Control
on May 11, 2012 at 6:42:09 pm

Hello all. Is it possible to apply a "Slider Control" on a wiggle that moves only the "Y" values?

Slider Control can be parented on a wiggle expression that moves equally X and Y. I need to move only Y, and by far I know to do it only with the Wiggler window that makes a constant wiggle between two keyframes. I need to control the wiggling. Does anyone have some hints? Thank you so much

Matt


Return to posts index

Cassius Marques
Re: Wiggler "Y" and Slider Control
on May 11, 2012 at 7:21:09 pm

paste this on your expression:

[value[0], wiggle(2,effect("Slider Control")("Slider"))[1]]

only the Y dimension will be affected


Return to posts index

Matteo Ferreccio
Re: Wiggler "Y" and Slider Control
on May 11, 2012 at 11:40:08 pm

Thank you very much. It works fine. May I ask, just to know it, what does mean the "value[0]" and "[1]" part?

Matt


Return to posts index


John Cuevas
Re: Wiggler "Y" and Slider Control
on May 12, 2012 at 12:36:27 am

If you type in "value" into any field, it returns the layers current value. Try it out, create a solid and alt click the position and type "value" into the expression field. Now as you move your solid around notice the position coordinates are red, because it's an expression but it's just showing you where it the solid is located.

A 2d layer has 2 coordinates, x and y. For expressions this is written as an array[0,1] with the 0 being the x value and 1 being the y value. If you had a 3d layer it would be [0,1,2]

So in the expression [value[0], wiggle(2,effect("Slider Control")("Slider"))[1]]
value[0] says use the current x value of the layer.

When you use the Wiggle command, it returns the number of variable you need to wiggle the property. If you wiggle rotation, it returns 1 variable[0]. If you wiggle scale, it returns 2 variables.[0,1]. If you wiggle a 3D layer, it would return 3 variables[0,1,2]. And if you were to wiggle a color, it would bring back 4 variables[0,1,2,3] for the RGB and Alpha.

The Y value of your expression is controlled by wiggle(2,effect("Slider Control")("Slider"))[1] says to Wiggle 2 times per second, and the amount to wiggle is the slider value. But since wiggle returns 2 variables, this expressions says use the 2nd variable.

Hope that makes sense.

Johnny Cuevas, Editor
Thinkck.com

"I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work."
---THOMAS EDISON on inventing the light bulb.


Return to posts index

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