Collada plugin for After Effects

More info here
Tutorials - Truespace Unreal (OLD)


PRE 2015/UE4 Below this point

The t3d and fbx exporters have been updated (March 23 2014) to take hidden geometry into account, so these instructions need an update to express an improved workflow.  April 12 2014 t3d exports animated lights and spotlight angle and the fbx export was improved so camera and light animations work. Recently the layers system was fixed to work with actors.  Can now rename materials in the tag panel? Rename limited to one material on the mesh?

T3D exporter will export staticmeshes as interpactors if they have a keyframe applied to them.

T3D script will export cameras, but does not import cameras.

T3D script can export a plane as a terrain - assumes plane is square not rectangular

Export a scene from trueSpace into UDK :

UDNMale psk sample has import skinning problems, fixed by heal skin with autoskin holes and normalize skin selected.
Truespace standalone version needs a tsx folder. This can be created from the setup aspect of the script.
PSA export uses the timeline play range.

More Notes:
When importing PSK or PSA files use the 2 buttons. "..." and "Load PSK" to load a mesh file and use "..." and "Load PSA" to load an animation file.
When exporting just use the single buttons "Save PSK" and "Save PSA".
The PSK exporter does not work with IK handles and locks.
The PSA exporter will make a copy of the mesh without IK handles and locks and will bake the animation into the copy before saving it.
The PSK export uses the default pose.
When assigning IK handles for the hips also assign IK handles for the feet. The feet tend to float around if they don't have handles. The IK full stop is not enough to stabilize their motion.
Recommend for each handle to set interpolation to IK, posing only unchecked and global locks unchecked.
Truespace IK does not work with translation animation of the hip joint and proper limits must be set to work with other joints reliably. The PSK importer creates joints with no rotation limits on the joints. It may be best to set these limits on IK chains though the imported models seem to already be bent to a preferred angle.

When importing animation to UDK/UT3 editor uncheck Anim Rotation Only(bAnimRotationOnly or add the "b_Hips"(assuming the ut3 psk format) joint to the list of translation bones.

May 19, 2013

Transfer a trueSpace scene to the UDK Game Engine - A Rough Outline of the process

The Unreal Import/Export and FBX Import/Export script and plugin sets are used together to transfer a trueSpace scene into an Unreal level map. FBX is used to transfer mesh and animation. T3D portion of the Unreal scripts is used to transfer the scenes initial layout, CSG geometry, Terrain objects, Cameras and Lights as well as references to the static and skeletal meshes exported via the FBX exporter.

The first step is to create a folder to hold all the textures used in the scene and the exported FBX and T3D files. Having everything together in one place makes it easier to maintain and allows the UDK FBX importer to find the texture files. One trueSpace scene is created with the layers script used to control visbility.  Invisible objects are not exported by the Unreal and FBX plugins.

Transfer to Lightwave for complex actors:

  • character animation in truespace is limited
  • have "defaultPose" clip active with the default pose keyed at frame -10
  • export with entire scene with single clip option for animation
  • lightwave does not import spotlights
  • do not have spaces in item names (maybe avoid underscores too?)
  • parent to a world null with pitch set to 90 degrees
  • copy textures to fbx file destination folder and run the Rt to fix the path
  • export truespace scale = 10
  • import lightwave scale = 10
  • export to unreal from lightwave scale = 0.1 ?

Plugins and scripts:

  • unreal psk/psa/t3d script
  • fbx import/export
  • layers
  • character fk controls
  • automatic keyframes
  • keyframe interpolation toolbar
  • ik handle footprints
  • joint orientation helper works to help orient one joint at a time or zero all joints
  • controlSkeletonScript - create fake skeleton and update fake skeleton (not published yet)
    • show joint rotations - for scripting xyz rotations
    • show joint axis orientation
    • shows the invisible root joint
  • freeze transforms
  • old constraint scripts may be useful for some animations
  • maybe update near clipping plane control for control of near and far - far useful for large scenes
  • refresh bitmaps useful for moving scene files between computers
  • material converter for objects with non-blankdx style materials
  • lightwave is now an option for creating static and skeletal meshes

Rules for creating the scene:

  • ALL JOINTS MUST BE NAMED PROPERLY BEFORE ANIMATION BEGINS - renaming a joint breaks animation in truespace
  • all objects must be at the scene level, not grouped
  • work at a scale of 10 if skeletal meshes used in the scene, export at scale of 10 or 5, 5 gives 1uu=2cm
  • terrain objects can only be created from plane geometry
  • materials need to be non-compiled d3d materials similar to the BlankDXMaterial's node structure
  • give all the materials unique names or they will overwrite each other when imported to UDK
  • give all texture files unique names or they will overwrite each other
  • all textures must be size power of 2
  • max texture size 4096x4096
  • texture file types - bmp, tga, pcx and png
  • choose a naming convention for the texture files, the "---" might be the mesh name if it's the only texture for the mesh:
    • T_---_D = diffuse
    • T_---_N = normalmap
    • T_---_S = specularmap
  • characters only animated with skeleton controls - full character node motion is not exported by the fbx plugin - fbx exports the skeleton and the mesh as seperate items and joins them via skinning so any animation on the character as a whole is ignored and only joint animation exports. the exception is exporting for matinee mode exports the character as a null so that the whole character motion can be used in combination with the standard default mode which gives the normal skeleton animations
  • if the character is animated using only controls and joints there will be no motion in the matinee style export
  • if the character is animated as a whole object then the default export will show no animation but the matinee will export the motion as a null named after the character
  • do not have animation keys on the whole object and the root joint at the same time
  • non-whole character(joint/skeleton) is the most flexible way to animate a skeletal mesh - it works in all cases
  • actor joints should have meaningful names
  • limbs must be unencapsulated before fbx default mode export
  • skeleton root is the invisible joint used to move an actor
  • careful of y rotations that go <-90 or > +90, this condition can result in flipping
  • move the whole skeleton to place and rotate the invisible joint (skeleton root)
  • use shape skeleton tool to place the first 2 joints into position after the root is set
  • can use parenting to temporarily resize a scene, make large scene fit in tS working space
  • tS practical limits of 100x100x100 meters - slightly bigger than the Apollo 11 level
  • ut3 default is 1uu = 2 cm, ue4 units is in cm
  • csg on boolean subtract a simple mesh from an existing boolean object or a simple mesh, do not boolean subtract a boolean object from anything else
  • csg exports as triangulated meshes with bad uvs, easily fixed in the editor - fixed in the ue4 export version
  • no need to name the csg meshes in truespace

Items that will transfer:

  • CSG Add Geometry - any mesh that does not have a static or skeletal tag, simple subtraction CSG too
  • Static or InterpActor meshes - meshes and animated meshes
  • Skeletal or CinematicSkeletal meshes - skeletal and animated skeletal meshes
  • Terrain
  • Materials and Textures
  • Camera and limited animated cameras
  • Lights and limited animated point and spot lights
  • Object transform animation
  • Skeleton joint animation

Skeletal mesh notes:

  • freeze mesh transforms with front of the mesh facing in the +X direction
  • triangulate the mesh before export
  • vehicle tires will rotate on their Y axis
  • create a skeleton with joint spread = 180 in yaw and roll, 90 in pitch
    • create a 2 joint skeleton
    • inside the Skeleton node reset the Skeleton root nodes Root transform connector
    • reset the Matrix connector of the Skeleton node
    • move the whole skeleton to set the location of the invisible root joint
    • use the shape skeleton tool to position the 2 joints
    • build the rest of the skeleton and set joint limits as needed
  • use the joint orientation helper to set the rotation of a joint - helper can be scaled - or maybe don't use it except for things animated prcedurally/programmatically in unreal
  • use ts unofficial update vertex snap for precision placement of joints
  • do not animate(move) the whole character unless exporting to matinee mode
  • do not animate(move) the whole character and the skeleton root at the same time - unpredictable
  • animate the skeleton root with ik/fk controls or direct selection - see character fk controls script
  • be sure to remove any animclip nodes and animtrack connectors from the skeleton - so all animclips are inside the actor instead of the skeleton.
  • there is a process from the doom3 scripts to transfer animated skeleton to an actor with the animclips placed in the actor.
  • unencapsulate Limbs before exporting via fbx
  • the info panel cannot be trusted - seems to show bounding box center of actor instead of matrix values
  • set a keyframe to lock in the default pose - problems with default pose not working if joint orientations don't have z pointing to the next joint
  • unencapsulate limbs so fbx export can see the internal joints

Hard object skinning process:

  1. weight paint tool
  2. select bone
  3. (optional) convert skin weight to soft selection
  4. Choose a point edit selection mode(painting, rectangle, lasso, soft selection) to enter PE mode
  5. make a selection, does not have to be vertex selection
  6. convert soft selection to skin weight - first right click be sure "replace" is the chosen method
  7. right click to exit PE mode
  8. repeat at step 2 for each bone

Animation notes:

  • place different animations on different tracks
  • can rename the clips - will rename the animclip nodes
  • disable all clips except one for fbx export - TODO code fbx to read clips as fbx animation stacks (old fbx term is takes)
  • only disable clips when in default pose (frame is -10)
  • theory - x best axis for hinge rotation and f-curve manipulations - no fcurve has problems, stick with z axis and dont use fcurve unless x and y rotations are zero
  • set play range ending to end of the clip - NO fbx reads range of animation on the object, not the play range so using clips is only good if all animations are the same length


Before creating the scene:

  • create a folder to gather all the assets - texture files, mesh files...
  • choose a naming convention for the texture files, the "---" might be the mesh name if it's the only texture for the mesh:
    • T_---_D = diffuse
    • T_---_N = normalmap
    • T_---_S = specularmap
  • Terrains are created from plane primitives
    • create the original plane with size of power of 2 in width and height / export scale. Export scale of 10 sizes would be something like 6.4, 12.8, 25.6, 51.2
    • position the plane so that the corner at the minimum X and Y is at the origin and freeze the transforms - it can be repositioned afterward?
    • Common power-of-two values used for terrain include 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024.
  • Terrains that will be converted to Landscapes
    • The Max Component Size must be a 1x, 2x, or 3x multiple of one less than a power of 2 (e.g. 1, 2, 3, 6, 7, 9, 14, 15, 21, 30, 45)
      The Num Patches [X/Y] must be multiples of the Max Component Size
      The Max Tessellation Level must be set to 1 inside the editor
  • Optionally setup the Unreal Grid system

Prepare the scene:

  • create objects at a scale of 1- small scale for actors and their controls but useable
  • Name all the meshes in the scene
    • S_ = staticmesh
    • SK_ = skeletalmesh
  • Ungroup all the grouped meshes
  • Be sure all static meshes have UV applied to uv set 1 and 2
  • uv set 1 can be copied to uv set 2 using the UV editor Synchronize UV button
  • UV set 2 should not have overlapping UV's for use in the lightmap
  • If materials are not BlankDXMaterial style convert them, the Convert materials script might help
  • If textures are not all in one place they can be copied to the Assets folder and the references updated in the scene by using the Refresh Bitmaps script
  • give all the materials unique names
    • M_---, "---" maybe the same name as the mesh if it's the only material
    • materials are the nodes connected to the Material List node, often named like Material_0, Material_1 etc.
    • If two meshes do have identical materials then use the same material name for both of them
    • script has function to rename a meshes materials
  • Decide on a package name - all assets will be gathered within the named package
  • Apply tags using the MarkMesh tab of the Unreal UI
    • tag the static and skeletal meshes and terrains - if the name field is blank it will use the mesh name used in the scene
    • meshes that are not tagged will export as CSG geometry(Add operation)
    • limited support for subtracted meshes with history enabled, always subtract from the pre-established boolean objects.  do not subtract a boolean object from a mesh the t3d exporter will not see it
    • use the package name, "Mesh" is a good group name and the mesh name is how the UDK browser will see them
    • the t3d map file will import with the scene name of the object and the tag is used to identify the object in the UDK object browser
      • S_--- = staticmesh
      • SK_--- = skeletalmesh
    • all identical meshes should have identical tags
    • Terrains
      • MaxComponentSize typical value is 4
      • NumPatchesX is set to the value of the plane primitives width segments when it was created.
      • NumPatchesY is set to the value of the plane primitives height segments when it was created.
      • trueSpace is limited to about 128 segments in width and height
      • the plane cannot be modelled with any technique that adds or subtracts geometry. It can only be reshaped. Keep the vertex X and Y positions unchanged and only alter the Z value.
    • Terrain Landscapes
      • The Max Component Size must be a 1x, 2x, or 3x multiple of one less than a power of 2 (e.g. 1, 2, 3, 6, 7, 9, 14, 15, 21, 30, 45)
      • The Num Patches [X/Y] must be multiples of the Max Component Size
      • The Max Tessellation Level must be set to 1 inside the editor
  • use layers to organize the scene
    • skeletal mesh archtype layer
    • static mesh archtype mesh layer
    • csg geometry for scene layer
    • terrain
    • staticmesh and skeletal mesh for scene layer

The Process(Dec 2014):

  • decide on a package name(not needed for ue4)
  • new scene
  • add layers - csg, sk proto, sm proto, terrain, sk mesh, s mesh, maybe animated static?
  • model to scale - truespace actor is little small but useable
  • unique material names - use BlankDXMaterial style
  • store textures in fbx export folder for truespace
  • add actor at the origin
    • rename to SK_..
    • tag/mark with same name - blank field will copy from node name
    • group - Mesh(not matter for ue4)
    • triangulate mesh
    • unique joint names within actor, unencapsulate limbs
    • expand matrix so cannot accidentally move actor node
    • export fbx default/standard mode
  • place in skeleton prototype layer - note if need invisible do in layers then do manual to complete
  •  layer visibility controls NOT WORKING PROPERLY WITH SKELETON
  • copy, rename for the scene and move to the skeleton mesh layer
  • set animation frame rate to 30 fps
  • add anim track
  • position using skeleton root not the whole truespace actor and key it
  • disable defaultPose clip?
  • add csg use primitive
  • use unreal grid
  • set snapping to power of 2
  • subtract csg with keep history and only subtract from existing boolean object
  • export obj file scale = 1 and do uv mapping in blender
  • to uv map an actor
    • assign some random uv
    • copy the actor
    • unskin the copy
    • export obj
    • import to Blender and uv map it
    • export obj and import to tS
    • use copyuv script, select imported mesh(source) and mesh inside the actor(destination)
  • add static meshes
    • rename to SM_...
    • tag/mark
    • group - Mesh
    • collision mesh named UCX_SM_name
    • uv2 for lighting
    • frozen transforms
    • triangulate
    • export fbx udkstaticmesh mode
  • place in static mesh prototype layer
  • copy, rename and move to static layer
  • don't copy collision mesh - keep it in the collision layer
  • exporting
    • make static prototype and collision layers visible, all others invisible and export udkstaticmesh mode fbx, no animation, scale 100
    • make skeletal prototype visible export default mode fbx, no animation, scale 100
    • make csg, static and skeletal layers visible and export t3d
    • export static mesh animations with udkmatinee mode, single clip and animation checked
    • export skeletal mesh animations one at a time ( 1 sk mesh and 1 clip at a time) - not scene export, scale 100, default mode fbx, use the fbx offset option with the actor at the initial t3d file position
  • import skeleton mesh to unreal
    • clear name in dialog
    • import materials
    • override full name
    • group Mesh
    • package to match tag
    • after import set Yaw to 180, change Roll to -90
  • import static same
  • import t3d into a blank map after skeletal and static mesh prototypes have been imported
  • animated static mesh import fbx animation
    • select the animated item in the scene
    • open kismit
    • add matinee and open it
    • add an empty group with name === mesh name in the truespace scene
    • import fbx
    • docs say only 1 movement track per group(object) - can import more than one by creating an extra movement track, but no way to activate more than one at a time - maybe a seperate matinee for each section of a long animation?
  • import skeletal mesh animation
    • udk content browser select mesh, right click - new animset
    • import fbx animation - name will come from the fbx file name, rename if desired
    • select animset in the content browser
    • select the skeletal mesh in the level
    • go to matinee and add blank group
    • group anim sets - add new item
    • in new slot push - "use selected item in content browser"
    • add an anim control track to the group
    • press enter to add a keyframe - select the animset from the list

Export a T3D file

  • at this point all the meshes and materials are named, uv has been assigned to set 1 and 2 of each mesh and tags have all been applied
  • hide the archtype layers
  • set t3d scale to 10 so final combined scale is 100 = 1 cm tS== 1 uu
  • export the scene
    • animated static meshes will export as map InterpActors
    • animated skeletal meshes will export as CinematicActors
    • untagged geometry will export as CSG-add
    • boolean subtract will export as CSG-Subtract

Export FBX files - order and process is a little murky for skeletal meshes

  • At this point a T3D map/scene file has been generated, but it refers to meshes that don't exist yet
  • all exports will have scale set to 10
  • idea is have archtype layer with unique items at origin named to match the tags
  • archtype layers show
  • hide all the CSG meshes and Terrains
  • hide all scene meshes
  • move all the geometry to the origin (0,0,0), adjust and set pivot if needed
  • use the Freeze Transforms script
  • if items are animated maybe set a key at frame -10 and be there when exporting
  • export fbx skeletal mesh and animation
    • if joints are animated export - check animation export
    • select the character
    • export mode = default
    • frame -10 should have the default pose keyed if the mesh is animated
    • repeat for each actor - do them one at a time? is it possible to export multiple skeletal meshes?
  • export the scene archtype layers as an fbx file or choose one by one and export
    • export mode = udkstaticmesh
    • scale = 10
    • deselect for scene export
    • uncheck animation export
  • export fbx animations non-skeletal - matinee
    • if any static meshes are animated they must have at least 2 keyframes
    • parenting is ok since the udkmatinee mode uses world coordinate system, not local
    • select the mesh
    • check animation export
    • export mode = udkmatinee
    • export the fbx file - name it to match the mesh with some kind of Anim postfix
    • repeat for each animated mesh or export all as single file for one import to matinee
  • the only way to control the names of actors in the level is to use t3d to add them to the map. So to add a new animated mesh:
    • export the fbx mesh
    • mark it as staticmesh or skeletalmesh and export a t3d of the mesh
    • in udk import the fbx mesh to the proper package and group then add to the map via the t3d import
    • now can use matinee to import the mesh animation
  • if add mesh to the level from the content browser then must rename the mesh in truespace to match the name in the map (something like "InterpActor_xx"), export the fbx matinee and now can import the animation to the mesh

import the fbx file that was created with udkstaticmesh mode into the UDK editor:
uncheck explicit normals if a normalmap is applied(not sure of this)
import materials and textures
note: the import process can be a little slow

import skeletalmesh and static mesh, set Yaw to 180, change Roll to -90
if udkstatic mesh mode then no rotation on import

clear to a blank map
import the t3d file - into the existing map

use kismet/matinee to import any staticmesh and whole tS character animations

mesh names in the fbx file must match the mesh names in the map/level to import fbx via matinee

use animset to import skeletal animations

  • name will be filename plus the animation stack name
  • can be renamed in udk

use the animset in matinee - add animset to blank group at the bottom then add track for it

enter to add keyframe and select animation from the animset

create light importance volumes and default killzones

add a player start and build all(geometry and lighting)
clear the name field so mesh names will come from the fbx file

The mesh name in truespace must match the name in the UDK map in order to import the animation via matinee.

The tag in the t3d map must match the imported name of the mesh in the object browser.

miscellaneous notes:

matinee fbx mesh animation import - geometry name in the file geometry name in the level
camera fov will reset if import matinee fbx and no fov animation is included - easy fix
camera aspect will need to be adjusted


truespace -> UDK
color -> diffuse
constant -> emissive
specular -> specular
normalmap -> normalmap

lightwave node based materials do not export
lightwave must embed textures for fbx export or save fbx to same folder as the texture files
only uv mapped material items uvs are exported now
lightwave -> udk
color -> diffuse
luminousity -> emissive
specular -> specular
glossiness -> specular power
bump -> normal

collada from lightwave will import to blender3d if the mesh and fbx_bone_heirarchy_standin are parented to the same null
blender3d fbx -> see internet for techniques and they are working on it

fbx maybe best format ts <-> lightwave
collada best format ts <-> blender3d

dynamic lighting does not use light maps

emitter materials set to create light do not produce color blead effects

May 19, 2013