Exchanging Keyframes between After Effects and LightWave

Part One

Plugins used: transMotion3D.lsc, crv2mot.lsc (optional)



by Al Street

 2001  Al Street. All Rights Reserved.


Overview:
Users of After Effects (AE) and LightWave 3D (LW) can enhance their animation potential by using keyframe modifiers available in one application on keyframes in the other. For example, the standard version of After Effects includes Roving Keyframes; the Production Bundle has Exponential Scale. LightWave has motion modifiers like Oscillator and Audio Channel, and any keyframes generated by a plugin or expression can be "baked" to a motion which can be converted to AE keyframes.

In this tutorial we will take keyframes from a variable-speed motion in LightWave, use After Effects' Roving Keyframes feature to make the motion constant-speed and then return the keyframes to LightWave using transMotion3D. In the animation above, the orange symbol moves slowly through the curves at each end of the oval, then moves very rapidly through the straight sections. Meanwhile, the blue symbol proceeds through the entire oval at a stately, constant pace. The keyframes shown below are the position keyframes for both of the moving objects. It's easy to see why the one object slows down in the corners; all of the keyframes are clustered there. If those keys are spaced equally in time, the object will spend the most time there.

A quick look at the frame slider confirms that the keys are spaced apart equally in time:

We could adjust the timing of the keys manually in the Graph Editor, but our goal in this exercise will be to automatically adjust the timing by using keyframe tools in After Effects, and learning to share keyframes between AE and LW.



In LightWave

Step 1: (Optional) If you wish, skip this step and go right to Step 2, where the motion path and object has already been created. In Modeler, create a flat disc and move it to the left. Kill the polygon and delete the points on the right side. In the top view, Mirror the points across the Z-axis. Now select all the points in anti-clockwise fashion.

Run Curve-to-Motion with parameters as shown below and click "Ok".

Step 2: In Layout, load the example scene file (oval_track.lws). In this scene we have a null traveling around an oval-shaped racetrack. The motion saved from Step 1 has been applied to the null. On a real racetrack, you would expect cars to move faster down a straight section of track than through the corners, although the difference would not be as great as shown here. A real-life example might be a burning fuse traveling toward a stick of dynamite. The fuse will burn at a constant speed, regardless of it's shape. This example is just meant to demonstrate a technique.

Step 3: Select Car_1 and save it's motion to a file (File > Save > Save Motion File). Save the file as "keyframes.mot". Run transMotion3D and choose the motion file you just saved as the Input File. Select LW as the input format and AE as the output format. Select "3D" as an output option, check "Use File Keyframe Data" and "Flip Y position Data". Leave the Pixel Aspect Ratio at 1.0 and the Scale Factor at 100%. Click 'Ok' to create a keyframe file suitable for After Effects. This file will be created in the same folder as "keyframes.mot" but will have the extension ".aek".

In After Effects

Step 1: Create a new Composition and a solid layer of any size and put the layer in the comp. The size doesn't matter as we just need the solid to temporarily hold the keyframes that we will be modifying. Important: Make the solid layer a 3D layer. If this step is skipped, any keyframes with negative position values will be "clipped" to zero. If you have a version of AE earlier than 5.0, you can still use this technique, but you must move your path so that all values are positive before running transMotion3D.

Step 2: In Notepad, open the file "keyframes.aek". Select All (CONTROL - A)and Copy (CONTROL - C) the contents to the clipboard. (These commands are for Windows; Mac users should use their equivalents.)

Step 3: In the timeline, select the solid layer and press 'p' to expose the 'position' track. Click on 'Position'. Paste the keyframes from Notepad (CONTROL - V) into the Position track.

Step 4: Click on 'Position' again to select all they keys that were just pasted in. Twirl down the little arrow to the left of "Position" to expose the speed graph.

Step 5: With all of the position keyframes selected, click on one of the "roving keyframes" checkboxes as shown below.

Step 6: Notice the change in the keyframes. They are no longer evenly spaced in time, and the speed graph has become a flat line, indicating constant speed. The keyframes still identify the same locations in space, but they have been adjusted in time to make the speed constant.

Step 7: With the new keyframes selected, Copy them to the clipboard (CONTROL - C). Open a new document in Notepad and paste the keyframes in (CONTROL - V). Save the Notepad file as "roving_keyframes.aek".


In LightWave

Step 1: Select the object "car_2" and then run transMotion3D. 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.

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. Check 'Flip Y Position Data'. This will invert the Y Position (and Pitch rotation, although we won't see that because it's zero). We need this because positive Y is 'Down' in AE and 'Up' in LW. Leave Pixel Aspect Ratio at 1.0 and Scale Factor at 100.0% and Click 'Ok'.

Step 2: The keyframed motion that we modified in AE has been applied to car_2. Looking in the top viewport, the keys appear to be the same for car_1 as for car_2. But looking in the keyframe slider, we can see that their location in time has changed.

Compare these keys to those of car_1.

Play the animation and observe that car_2 is now moving with a constant motion, and car_1 moves as before.

We've taken keyframes in LW, modified them in AE, and returned them to LW.

Download the LW scene file here:

PC archive

Mac Archive