![]() distributing layers in a cylinder using expressions | ||||||
This expression is customizable, and you can change many things including: the radius of the cylinder, the overall rotation of the cylinder, the spacing vertical spacing between rows of the cylinder, and the amount of layer on each level of the cylinder.
|
After Effects 7 Useful things Expressions Views: 7581 Permalink | |||||
First, create a new comp, and make sure to use square pixels. Non-square pixels can lead to some nasty issues with all the math going on in these expressions. Now, inside of your newly created comp, create a new Null Object, and name it Controls. Make this null object 3d, and position it properly, because once we create the cylinder, it will be centered around this null object. Now, you are going to add some expression controls to our null object, Controls. Expression controls are just "dummy effects" which have no impact on how the layer works. However, you can reference expression controls in an expression, and then use that value. Now, with your Null Object selected, go up to Effect > Expression controls, and add 3 Slider Controls to the layer, and one Angle Control. Now, we will rename these controls something useful. Open up the effect controls palette. Now, select you first slider control, and press Enter.
Now, name your 3 sliders height_gap, radius, and layers_per_level. Next, name your angle control cylinder_rotation. Once we have our expression, layers_per_level can be keyframed to change how many layers are in each level of the cylinder, radius can be keyframed to change the radius of the cylinder, and height gap can be keyframed to change the vertical gap between the layers. Before you continue, be sure to set layers_per_level to something positive, so it doesn't generate and error later on! Also, be sure to set layers_per_level to a whole number, so the cylinder will look even. Alright, now for the good part. Create a solid, which you will want to be square if you are replicating the look of my example. Make the layer 3d. Now add the following expression for position: Now, add this expression for orientation in order to make your layer point towards the center of the cylinder. Now duplicate your layer, by pressing Ctrl + d (or Cmd + d), until you have the desired number of layers. There you have it, a nice cylinder. Feel free to keyframe any of the expression controls from earlier, just make sure not to have num_of_layers be negative or zero, otherwise it will generate an error. Note that in order to move the whole cylinder, simply animate the position of the Controlslayer. Also, be sure not to place any layers above or in between the layers that make up the cylinder, this will cause the expression to not work, as the results of the position expression are based on each layer's number in the timeline (called the layers index in expression terminology).Keywordsvertical spacing(Min. Version: After Effects 7, Category: Useful things, Type: Expressions) | ||||||
posted by MicGyver on Sep 08, 2008
|
![]() Wiggle in one dimension | |||
|
Often very useful to wiggle only horizontal or vertical
|
After Effects 6 Useful things Expressions Views: 53439 Permalink | |
posted by jamie on Sep 05, 2008
|
![]() Ascii animation with sampleImage() | ||
More experimentation with sampleImage().
from http://www.creative-workflow-hacks.com |
After Effects CS3 Useful things Expressions Views: 7306 Permalink | |
posted by mmo on Sep 02, 2008
|
![]() 3D Shadows (Video Copilot, No. 71) | ||
Cast 3D shadows onto live action footage
Use shadow diffusion and special material options Tutorials for Visual Effects & Motion Graphics Free After Effects Tutorials & More Hosted By: Andrew Kramer |
After Effects CS3 3D Video-/Tutorials Views: 9425 Permalink | |
posted by MicGyver on Nov 11, 2008
|