Thursday, November 27, 2008

Pageflow

Autodesk Smoke Tips & Tricks - Page flow

What we're going to do today is kind of like iTune's pages flow effect, hundred of pages flying from left to center, then right. The difficult part of this effect is, how to control all the pages's animation at once, without making hundred of keyframes at each layer. Here, i would use the expression to do the job.First, load a clip and animate it from left (frame0) to center (frame25), to right (frame50), total 50 frame animation. Turn on Z-buff.

You can do your own animation. Here, i use this : frame 1, position x-1800, y0, z-2000At frame 25, position x0, y0, z-800. At frame 50, position x1800, y0, z-2000 This 50frame left to right animation, we would call it as default animation.

After that, rename the axis to axisD (Dummy Layer), and hide the clip. Create a new axis, name it axisC.Load a new clip, axis1. At axis1, enter expression :
eval(axisD,(frame*axisC.position.z)-(1*axisC.position.y)+axisC.position.x)Next, load and create more clips and axis, depend on how many pages you like to have.Then, select axis2, enter expression :


eval(axisD,(frame*axisC.position.z)-(2*axisC.position.y)+axisC.position.x)


And, do the same for other axis, just change the 2 to 3 for axis3, and so on until the last axis. Remember that you can use the 'up arrow' to scroll through the previous typed expression, no need to re-type back everything, or just use 'duplicate' layer feature.


Now the expression part is done, we will focus on how to control the pages flow with axisC. If you play the animation now, nothing will happen.

At axisC, set the position to X0, Y0, Z1. Play the animation, only see one layer, because all layers all stack together.
Now, we need to set the offset of the pages. Move to frame50, and drag the Y to set the offset. Here i set Y10 for the offset. And play the clip to see the result.

Then try set the Z to 2 (200% speed), play the animation. Then try 0.5 (50% speed). For now, we will leave it at 1 (normal speed).Then, try drag the X, this will let you fetch through all the pages, you can control which page are shown on the screen with this positionX, you can animate it to have the animation go forward, backward, or freeze. When you animate this, set it to the proper curve that you want (linear, hermite, constant).You can also leave the Z to zero, and animate the whole pages flow by positionX alone.Still remember the default animation, the dummy layer ?
You can change the dummy layer animation anytime you want, add more keyframes, do some fancy move, and all the layers will change accordingly.

See, if you do this manually one by one, layer by layer, it will take hell lot of time, and if you ever need to change the animation, then 'may god bless you'. The expression technique present here, might look like a lot of work, but actually it only takes less than 15 minutes for me to do hundred layers. It's flexible, easy to animate and make changes.

No comments: