Right-click the link above to download the script(save
target as/save link as). Place the script in the
lscripts folder, "...Program Files\NewTek\LightWave 3D
9\Plugins\lscripts\animate", for easy access.
Usage:
- Animate the camera zoom
-
Create a null and add the lscript, "camFOVtoTransform",
via the motion options, motion modifiers.
-
Double click the "FOV Motion Mod" to open the
dialog. Set the scale you intend to use when
exporting the collada file and select the camera from
the list. When you push OK another null will be
created that has it's controllers set to follow the
first null. If you don't select a camera the null
will not be created and only the scale will update.
-
The new null's rotation and position will change to
follow the camera's zoom.
-
Add a key at frame zero for this null so that motion
baker will see it properly. If you don't add the
key then the position keys won't bake properly.
-
Add a Motion Baker modifier to the new null
- check "Use existing..."
- check "Overwrite keys"
- check positions XYZ and rotations HPB
-
In Lightwave preferences be sure "Play at Exact
Rate" is unchecked.
-
Play the animation to bake the keys before exporting
the collada file
X and Z position will contain the zoom values for x and y
stored in the collada file x and z. Multiply by
the composition height in After Effects to get the
corresponding After Effects zoom value.
Image shows the camera zoom animation and the
corresponding horizontal and vertical zoom animations
created for After Effects.
Inside After Effects:
-
Import the collada file with the same scale used
for exporting.
-
Go to the camera settings and change the
"Measure Film Size" to Vertically.
-
Alt click the Zoom stopwatch to activate
expressions.
-
Use the pickwhip to link to the position z value of
the camera null. The position information is
actually stored on the parent of the camera null(Camera_FOVKF_Yr).
Items imported from Lightwave always have a "_Yr" parent
so that After Effects can use Lightwave's rotation
order.
-
Multiply the resulting expression by the
composition's height.
Pitch and Bank will contain the x fov and y fov in
degrees which translates to x and z rotations in the collada
file.; The signs are set so that they are positive when
imported to After Effects using the AECollada plugin.