Collada plugin for After Effects

More info here
Plugins and Scripts > trueSpace > Import/Export

Enhanced Collada Export for trueSpace7.61

Script for modifying the exported dae file so that the textures and the collada file are in the same folder. Exports animations for light color, spotlight cone angle and camera fov and fixes texture file paths. A copy of the collada file is modified and placed into the texture folder. The original collada file is not altered when the Copy textures option is used. The behavior of the trueSpace Collada exporter varies based on whether it is exporting workspace or modelspace materials. This script gives it a more consistent behavior. See blog notes here.

persistent base install required

Installation:

  1. install the persistent base if not already installed
  2. drag the node into the link editor
  3. delete the node from the scene after install is complete

Usage:

  1. This script only works when using the file menu to save collada files.
  2. After normal export a dialog will display giving the option to run the Collada post processor. Answer No to export without the optional enhancements.
  3. A second dialog will show, "Named and scene instanced only processing" - this adds extra transformations with the assumption that the materials are scene instanced and have a unique Name parameter assigned to them.

blankDXstyle compiledDXstyle

BlankDXMaterial on the left and Compiled material on the right as shown in the link editor.

Actual file names from workspace will only be used if the material is based on the BlankDXMaterial which is composed of shader nodes connected to a Material node. The Material Converter script can be used to convert the materials. It can be found on the materials page. A replacement Alpha Shader node can be found on the same page. It enables the export of alpha textures in the collada file even when the postprocessor is not run.

Best results from scene instanced and named materials

The name of the materials can be set by adding a node that has a "Name" input connector and exporting that connector to the D3D material node.

TODO link to material and export utility scripts for setting the material name, checking for valid material setup, unique names for everything, check mesh validity etc

you tube here

Notes:

  • This script only works when using the file menu. Dragging to a library will not work because the script uses the most recent saved file information which is bypassed when drag saving to a library.
  • If Copy textures option is selected on export the the original collada file is not altered and the enhanced version will be in the folder with the textures.
  • Objects in truespace need to be named. Automatic names like "Torus, 1" cannot be reverse matched from the Collada file for material processing. The collada file will change the name to "Torus_1". Truespace "Torus, 1", "Torus_1" and "Torus 1" will all translate to the same name in the Collada file potentially causing texture fixes to fail.
  • trueSpace does not export scene instanced materials as instanced in the collada file
  • The Materials encapsulator of the scene will export as empty nodes in the collada file
  • trueSpace will export the material name based on the material index used in the mesh object, so index 5 would be "material_5"
  • trueSpace will export invisible objects
  • Mesh objects with axis applied needs to be flattened before export when the object is animated
  • DIFFUSEMAP, ALPHAMAP and NORMALMAP Input usage must be set properly for each kind of texture bitmap. The usage is used by the trueSpace exporter to determine the type of texture exported, so if you have a diffuse use on an alpha image it will export as diffuse. These are the only options found in the View3D.dll file.
  • A color texture will create an identical specular map texture on output
  • A color texture is required before emission or specular textures will export, a small black color texture can be used
  • Godot

    • parent the collision mesh to it's target, name postfix of "-colonly", if not parented then the collision will not move with it's parent
    • postfix of -noimp will not import into Godot
    • every mesh will have a unique material unless the material has a Name node or scene instancing is used
    • alphamap will not import, transparency in godot from alpha channel of color map
  • Lightwave(Modeler):

    • top view rotate 180, right view rotate 270(left view 90)
  • Lightwave(Layout):

    • no scale(or scale=1)
    • script collada_add_spot_extra.py to make spotlights readable to Lightwave
    • import fixed file, no scale(or scale=1)
    • fix_collada_import.py if camera fov, or light properties are animated
    • spotlight color will not import
    • parent scene to null
    • rotate null heading 180, pitch 90
    • light color read
  • Blender:

    • no scale(or scale=1)
    • >
    • spotlight color will not import
    • parent scene to empty(ctrl p)
    • rotate null in z 180
    • light color read
    • material import better in older 2.79 version

November 10, 2021

  • fix multi-material object material export - was only updating the first material of a mesh

September 27, 2021

  • new instanced and named materials export option with improved error checking
  • broke script into 4, was 2000 lines now largest is about 1000 lines so bad, but only half as bad as before
  • replaced tS normalmap with FCollada compatible normalmap

September 18, 2021

  • use utility status message
  • fix bug where a texture must exists before parenting will export
  • same bug above in a couple of other places
  • parented item needed -X translation value

February 19, 2021

  • supports parenting structures
  • update safe naming to translate dash to underscore
  • no error when export scene instanced materials
  • material names are unique - before only the material id was unique
  • will use a "Name" connector for the material name
  • will trace scene instanced materials back to their source to get the material name
  • feedback on the status line
  • check that original collada file exists
  • remove dummy Materials node from the visual scene from the export

February 24, 2018

  • persistent install v2 compatible
  • compatible with new batch installer

January 12 2018: - persistent install

July 8 2014:

  • export constant colors and textures as emission nodes
  • export specular texture by using the DefaultModelTextureShader
  • fix bug where any texture ends up in the collada file diffuse and specular nodes

Sept 10 2013: - slightly improved Blender compatibility

June 14 2013:

  • bug fix - ignores a second type of compiled material which has a "D3DMaterial" connector
  • works when the normalmap bitmap connector is named "Bitmap" as well as "NormalMap"

June 8, 2013:

  • use actual texture files instead of the file_0,1,2... when materials are DX blank style
  • texture file paths are now relative for modelspace and workspace

Feb 4 2013:

  • forgotten update for Dec 18 2012
  • changes DATA to ANGLE for Blender compatibility
  • does not use vertex colors as a flag - uses a dialog instead
  • test for absolute path was finding paths with spaces instead
  • ambient and spot fixed - broken because of Unoffical Upgrade #3?

Sept 2 2012:

  • camera fov animation
  • light color animation
  • spot light cone angle animation
  • fix ambient light - changes it from mesh to a light
  • fix area light - changes it from a null to a light
  • fix spotlight angle to use the angle instead of the hotspot angle
January 01, 2012
June 5, 2013