olzgame.blogg.se

After effects expression for erratic wiggle
After effects expression for erratic wiggle













Now we have a plan, but how do we do it? The Linear Keyframe Integrator Then, when the slider returns to zero, the expression will calculate the total degrees rotated instead of returning to zero itself. Our expression needs to calculate cumulative rotation due to all previous values of the slider. So when the slider eventually returns to zero, for example, the expression calculates the total rotation as zero, which is clearly not what we want. The result (for each frame) is the same as if the slider had always been at its current value. In the previous example, at each frame the expression retrieves the current value of the speed control slider and uses that value to calculate the current rotation-without taking into account previous values of the slider. At the root of the problem is the fact that expressions have no memory.

after effects expression for erratic wiggle

The first step in learning how to solve the problem is to understand why the obvious solution doesn't work. In this article, I'll cover the issues involved with expression speed and frequency control, then present some practical solutions to the problem.

after effects expression for erratic wiggle after effects expression for erratic wiggle

The good news is that there are ways to work around the problems. It may seem like it should be, but it definitely is not. The bottom line is that in the world of expressions, controlling speed or frequency is not a simple task. Instead of gradually speeding up, holding steady, then slowing down, the rotation starts at a fairly constant rate, slows down in the middle, and then actually backs up at the end (see sidebar movie). You keyframe the slider to go from zero to 360, hold at 360, then go back to zero. Spd = effect("Slider Control")("Slider") This is the new version of the expression: Your idea is to connect variable spd to a Slider Control and keyframe the slider value. Now you decide that you want to be able to manipulate the rotation speed. So far so good-it works as expected (see sidebar if you're wondering about the expression's use of value). This is how the expression looks, set up to rotate at 360 degrees (one revolution) per second:

after effects expression for erratic wiggle

You have added a variable named spd to let you set the rotation speed. Imagine that you have created an expression for the Rotation property, based on the global attribute time, which generates a nice smooth rotation. FYI to anyone reading this though - rendering wiggle expressions to keyframes dramatically increases the file size of your bodymovin.















After effects expression for erratic wiggle