Exchanging Keyframes between After Effects and LightWave
Part Two
Plugin used: transMotion3D.lsc
![]()
by Al Street© 2001 Al Street. All Rights Reserved.
Overview:
Footage taken with a handheld camera can contain vertical and horizontal components of 'jitter' which may need to be removed. Stabilization can be achieved automatically in After Effects (Production Bundle) or manually by keyframing the footage layers' Anchor Point. In either case, the stabilization process tends to take out both components of movement. But if the footage results from a camera pan, we would want to keep the horizontal movement and just suppress the vertical. This can be accomplished after stabilization using Motion Math. But for the budget-restricted animator without the Production Bundle, or those not comfortable with using Motion Math, a simple alternative is presented. In this exercise, we take the footage generated in part one, stabilize it in After Effects, then import the keyframes into LightWave where we remove the stabilization from one channel, then return the modified keyframes to After Effects.
In After EffectsStep 1: Import your footage or the jpeg sequence created in Part One into After Effects. Create a comp and drag the footage into the comp to create a layer.
Step 2: Stabilize the footage, using either the Motion Stabilizer or manually by keyframing the layer's Anchor Point.
Step 3: With the footage layer selected, press "a" to expose the Anchor Point track. With the Time Marker at the first frame of the comp, note the x-coordinate of the anchor point. In this example, it's 360. Click on Anchor Point to select the keyframes. Copy the keyframes to the clipboard (Control-C). Open Notepad and paste the keyframes. Save the Notepad file as "AE_keys1_.aek".
In Layout
Step 1: Add a Null and run transMotion3D.
Step 2: Select the file you just made from Notepad (be aware that Notepad may add the extension '.txt' to the filename). Choose 'After Effects' as the Input Format and select "Anchor" to read the Anchor Point keyframes. Choose 'LightWave' as the Output Format and check 'Load Motion File to selected item". Check 'Use File Keyframe Data'. This will cause keys to be created at the same frames as those in the Notepad file from AE. Since we won't be keeping the keyframes in LightWave, we won't bother to flip the Y data, so leave that checkbox unchecked. Click "Ok" to convert the file and load the motion to the Null in Layout.
Step 3: With the Null still selected, open the Graph Editor. Select all the keys for Null.Position.X. Go down to the Value field and change it from "(mixed)" to the Anchor point X-coordinate you noted earlier. For our example, it was 360. This will force the Anchor Point to be constant for the range of the animation, which has the effect of not stabilizing that component of the motion, therefore preserving our pan motion.
Step 4: Close the Graph Editor and save the motion file as "LW_keys_y-only.mot".
Step 5: Run transMotion3D and convert the motion file you just saved to AE keyframes as shown.
Step 6: In Notepad, open the file "LW_keys_y-only.aek". Select all and copy to the clipboard.
In After EffectsSelect the Anchor Point track of the footage layer and paste in the keyframes. Preview the animation. The vertical "bounce" is gone, and the original pan is retained.