Collada plugin for After Effects

More info here
Lightwave Plugins and Scripts
 
Collada Weight map loader scripts and program

Lightwave lscript and executable for loading weightmaps from Collada files so that bones will bind to the proper vertices.  daeSkin2weight.exe reads a collada file and creates a text file in the same location.  the text file contains the weight map information.  daeSkinLoad.ls is an lscript to read the text file generated by the daeSkin2weight program and assigns the vertices to their weight maps.  boneweightmap.ls is a layout script that sets  the selected bones to use a weightmap with the same name as the bone.

Usage:

  1. if the collada file does not load properly into lightwave, load it into blender3d(2.5 alpha) and export a new collada file
  2. run the daeSkin2weight program and open the collada file.  a text file will be created with the same name as the dae file but with a txt extension
  3. load the collada file into layout to get both mesh and bones
  4. load the resulting lwo file into modeler and run the daeSkinLoad script to load the weightmaps from the text file
  5. load the updated object back into layout
  6. run the boneweightmap script to assign the weightmaps to the corresponding bones

Note:

The executable won't work for files that have spaces in their path.  so it won't work in paths like "C:\Program Files" or "C:\Documents and Settings\All Users"

source code - uses visual studio 2008 and the colladadom2.2 sdk

May 04, 2010
 
Morph Sequencer script

Lightwave lscript for converting a a series of morphs into a morph sequence.  The script creates intermediate morphs that can be added to the final morph at set intervals to simulate a  morphing sequence.  

Usage:

  1. type number of morphs to use - the first morphs listed will be used
  2. type a prefix name for the new intermediate morphs
  3. choose morph order from the drop down lists
  4. choose whether interpolation is linear or not(no effect on the last morph)
  5. press ok to generate the intermediate morphs and the expressions to drive them
  6. copy the expressions to a temp location
  7. in layout: copy the expressions to the corresponding morphs
  8. final result: intermediate morphs are driven by the final/last morph values to create a sequential morph action
February 26, 2010
 
Poly Chain to Curve script

Lightwave lscript for converting a 2 point polygon chain to a curve.  Right click the link to download the script.  Install this script to modeler to use the multiple poly chains to curves script below.

Usage:
Set a background layer to receive the new curve.  Select the first point of the polygon chain in the foreground layer then run the script.  A curve based on the poly chain will be created in the background layer.

Multiple Poly Chains to Curves script can be used to call the poly chain to curve for multiple selections.  Right click to download.

Usage:
The "single poly chain to curve" script above must be installed to modeler before using the "multiple poly chains to curves" script.  Set the background layer to receive the new curves and select the first point of each of the 2 point poly chains in the foreground layer.  Run the script and it will call the "single poly chain to curve" script for each point selected.

Note: Converting many poly chains can take time.

February 12, 2010
 
Place Camera FOV animation on a null's transform

Lightwave collada does not export camera field of view(FOV) animation.  This lscript transfers the animation to the position and rotation of a null so that whatever program reads the Lightwave collada file can reconstruct the camera animation.  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:

  1. Animate the camera zoom
  2. Create a null and add the lscript, "camFOVtoTransform", via the motion options, motion modifiers. 
  3. 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.
  4. The new null's rotation and position will change to follow the camera's zoom.
  5. 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.
  6. Add a Motion Baker modifier to the new null
    1. check "Use existing..."
    2. check "Overwrite keys"
    3. check positions XYZ and rotations HPB
    4. In Lightwave preferences be sure "Play at Exact Rate" is unchecked.
  7. Play the animation to bake the keys before exporting the collada file

null camera fov bake dialogs

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.

lw camera zoom graph lw cam null fov graph

Image shows the camera zoom animation and the corresponding horizontal and vertical zoom animations created for After Effects.

pick whip camera zoom

Inside After Effects:

  1. Import the collada file to using the same scale used for exporting.
  2. Go to the camera settings and change the "Measure Film Size" to Vertically.
  3. Alt click the Zoom stopwatch to activate expressions.
  4. 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.
  5. 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. 

October 14, 2009
 
Place Light animation on a null's transform

Lightwave collada does not export light color or spotlight cone angle animation.  This lscript transfers the animation to the position, rotation and scale of a null so that whatever program reads the Lightwave collada file can reconstruct the light animation.  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:

  1. Animate the light color and/or cone angle
  2. Create a null and add the lscript, "lightConeColorToTransform", via the motion options, motion modifiers.
  3. Double click the "Light Attr Motion Mod" to open the dialog.  Select the light from the list.  When you push OK another null will be created that has it's controllers set to follow the first null. 
  4. A new null now exists and  it's rotation, position and scale will change to follow the light's cone angle and color. 
  5. Add a Motion Baker modifier to the new null
    1. check "Use existing..."
    2. check "Overwrite keys"
    3. check positions XYZ, scale XYZ and rotations HPB
    4. In Lightwave preferences be sure "Play at Exact Rate" is unchecked.
  6. Play the animation to bake the keys before exporting the collada file

lightwave light graph lw light null graph

Image shows the animation graph for a spot light and the null created by this script.  The scale null values are too small to see here because After Effects uses a 0 to 100% for scale instead of 0 to 1.0

The rotations HPB will each contain a copy of the light's cone angle.  Color will be stored in the scale values and position will also contain the same color data.  However, the position for color is only valid if the scene is exported with the default 0.01 scaling.  The signs are set so that they are positive when imported to After Effects using the AECollada plugin. 

 

lw light bug

 lw light bug fixed

First step after importing to After Effects is to fix the light type.  Lightwave exports spot lights as point lights.

 

light vals from null

Image above shows the resulting expressions from pick whipping values from the light null's scale and xRotation values.  The scale of the Lightwave export is not an issue.

 

light values from parent

This image shows the result of pick whipping cone angle and color to the light null's parent(Light_LITKF_Yr).  The collada file was exported at a scale of one and so the color expression had to be divided by 100 as shown.

Use the pickwhip to link the animation to the corresponding light.

October 14, 2009
SubD UV Preparation script for Lightwave

Lscript that converts subd uv's into an clean format for eps export.  Right click on the link to download the script.

subpatch    frozen    subd prep
default subd eps export,  frozen mesh eps export, "subd preped" eps export

Usage:

  • Save the object file to insure it's safety.
  • Set the uv subpatch interpolation to "Subpatch".
  • Run the script.
  • Export the UV by using the EPS export.

The script copies the geometry to a new layer, assigns a unique surface to each face, freezes the mesh and combines the polygons based on their surface.

March 27, 2010
 
Doom3 Plugins for Lightwave

Click the link above to go to the old Doom3/Quake import export plugins page.

September 13, 2009
September 13, 2009