1 slider to proportionately distribute layers in z-space
From ‘Mastering 3d Cameras in After Effects’ by Jayse Hansen
Class Preview at Post Production World Israel, Nov. 2007
Here is the code that Dan Ebberts wrote that I demonstrated in class for spreading out 3d layers proportionately using one slider control. (Thanks be to Dan!)
Basically the steps are:
- Import your psd in layers, or create a bunch of solids as I did in the example above.
- Turn them all 3d
- Add a null, apply Effects>Expression Controls>Slider (make sure this null is named ‘null1′ In other words - just don’t rename it.)
- In the Position Property of each 3d layer, add an expression by alt/opt clicking the Position StopWatch and pasting the following code:
position+[0,0,(index-1)*this_comp.layer("Null 1").effect
("Slider Control").param("Slider")]
- Set your view to a side view (Right or Left)
- Drag the slider on ‘Null 1′ and watch your layers spread like magic.
Here’s a sample After Effects Project FileSome notes:
You may find that your layers look larger as they move in z space towards you. A quick fix would be parenting all the 3d layers to a null and scaling it down.
If you need more precision and want to scale and separate at the same time so that the layers appear to remain the same size even while being moved in z-space, (very useful!) check out Zax’s excellent new plug in ‘Z-Distribution‘ in the Layer Tools set.
Hope that helps,
// jayse
Filed under: After Effects on December 3rd, 2007 | 11 Comments »
