Collada plugin for After Effects

More info here
Plugins and Scripts > Lightwave

Fix Exported Collada python script for LW11

The Fix Collada export script is a Lightwave 11 Python script that is run on a LW exported Collada file to clean it and add camera and light animation. The script also fixes some issues with material exports.

Fix Exported Collada python script for LW11 (Layout)

Fix Exported Collada python script for LW11 (Modeler)

right click the links above to download

Installation steps 1,2 and 3 can be skipped if Lightwave was installed with the Expand Python Runtime set to Yes. They can also be skipped for Lightwave 2015 installations. I think it expands the runtime without asking.

Installation:

  1. Find the python27.zip file in the bin folder of the Lightwave installation - C:\Program Files\NewTek\LightWave11.0\bin
  2. Open the zip file and copy "pyexpat.pyd" out of python27.zip and into the bin folder
  3. Restart Lightwave
  4. Copy the "fix_collada.py" file into the plugins folder or some subfolder like C:\Program Files\NewTek\LightWave11.0\support\plugins\scripts\Python.
  5. Use the Utilities/Add Plugins button to add the python file as a button
  6. The plugin/script will appear as "Python Fix Collada" in the Additional dropdown list

Alternate for steps 1 and 2 from a Newtek forums post :

Since Python 2.7.2 cannot load shared libraries from a Zip file, you must extract the Python library files found in "bin/python27.zip" to a folder called "bin/Lib". Once extracted, delete or rename "python27.zip", run LightWave, and Python should be able to locate and use all the shared libraries bundled within the "Lib/" folder (including "bin/Lib/pyexpat.pyd").

collada fixer

Usage:

  1. Export a Collada file from Lightwave
  2. Run this script and select the file
  3. Choose a save as file/location for the new file - can be the same as the source file
  4. Choose your options and press OK

Options:

  • Remove <extra> nodes - the LW collada file is full of extra mostly useless information, this removes it from the file
  • Remove extra rotation nodes - LW adds several rotation nodes with zero rotation values, this removes those nodes
  • Remove extra translation nodes - LW adds several translation nodes with zero values, this removes those nodes
  • Add Camera FOV animation - the camera zoom animation is converted to degrees and added to the collada file
  • Add Light properties animation - light color and spot angle animations are added to the collada file
  • Fix mesh and materials - removes a dummy material from the file, exports phong instead of lambert, prevents crashes in Blender, assigns textures for color, specular, transparency and bump in a standard way(note there is no standard bump so FCOLLADA profile is used)
  • Convert image paths to relative - converts image paths from absolute to relative style for easier sharing of assets
  • Apply mesh pivot to the vertices - adds the rotate pivot to the translation and subtracts the uncorrected inverse pivot from the mesh vertices. The result is that the meshes are converted to use the origin plus vertex translation instead of the pivot. The corrected inverse pivot is the negative of the inverse pivot as written by Lightwave.
you tube here

Notes

  • It cleans the file by removing all the extra tags and the translation and rotation tags that don't add any useful information.
  • The default LW 11 scene containing a light and a camera exports as a 36Kb file. It drops to 3Kb after cleaning.
  • Modeler will not export parenting relationships. So if you setup a heirarchy in Modeler be sure to export the Collada file from Layout.

September 29, 2015 (version 1.5):

  • fix for LW 2015
  • quick fix so may not be bullet proof

January 19, 2014 (version 1.4):

  • fixed a bug in the previous inverse pivot fix
  • new option to apply the pivot to the mesh vertices
  • version number included in the title bar

December 6, 2013:

  • added transparency tag to the export
  • fixed color export - was rgb changed to rgba

September 8, 2013:

  • Make animation export more compatible with Blender import. Blender can see the translation, rotation and scale animations.
  • inverse pivot fixed

June 23, 2013:

  • new Modeler version
  • fix for materials export
  • multiple surface channels with shared uv do not crash Blender when imported
  • relative image paths
April 8, 2012