Collada plugin for After Effects

More info here
Tutorials - Truespace Unreal Import Export

Unreal Engine 4

Use the Unreal Import/Export T3D script and FBX to transfer a scene from Truespace to the Unreal Engine.

Unreal Engine 4.13 T3D import crash and no T3D import option in menus

Access the T3D file import

  • File > Import Into Level...
  • type *.* in the File name field
  • press the enter key
  • now all files are visible and you can choose a T3D file

Edit the T3D file to prevent crashes on import

  • UE4 T3D, look for an actor at the end of the file just before End Level that seems to refer to the map and remove those lines

    from UE4.13 Minimal_Default map

          Begin Actor Class=Minimal_Default_C Name=Minimal_Default_C_0 Archetype=Minimal_Default_C'/Game/StarterContent/Minimal_Default.Default__Minimal_Default_C'
             Begin Object Class=SceneComponent Name="DefaultSceneRoot"
             End Object
             Begin Object Name="DefaultSceneRoot"
             End Object
          End Actor

    from UE4.6 Minimal_Default map

          Begin Actor Class=Minimal_Default_C Name=Minimal_Default_C_2 Archetype=Minimal_Default_C'/Game/StarterContent/Maps/Minimal_Default.Default__Minimal_Default_C'
          End Actor
  • UE3 T3D, remove all lines that have the pattern of xxx=BrushComponent'yyy'

    • open the T3D file in Notepad++ or another text editor that supports regular expressions -
    • Search > Replace...
    • set the Search Mode to Regular expression
    • type into the Find what field without the quotes "^\s*\w*\(*\w*\)*=BrushComponent'.*'.*\R"
    • make the Replace with field blank
    • press the Replace All button and save the result to a new T3D file
  • Now the T3D file will probably not cause a crash
  • for a detailed explanation of the regular expression used, you can go to

When exporting a whole level from UE4 select everything except the first item in the World Outliner and use the export selected option. This will keep the bad "level" Actor from exporting and crashing on import.

UE2 and UE1 files don't seem to cause a crash.

Scripts and plugins used(todo links directly to page and section):

  • unreal psk/psa/t3d script
  • fbx import/export
  • layers
  • joint orientation helper works to help orient one joint at a time or zero all joints
  • freeze transforms
  • refresh bitmaps useful for moving scene files between computers
  • fk controls to select the root joint for animation
  • texture file report to make sure bitmaps files exist in the filesystem and can be imported by unrealed

Rules for creating the scene:

    • renaming a joint breaks animation in truespace
    • the names should be meaningful and have no spaces
  • all objects must be at the scene level, not grouped
  • landscape objects can only be created from square one sided plane geometry
  • materials need to be non-compiled d3d materials similar to the BlankDXMaterial's node structure
  • do not use scene or object instanced materials
  • give all the materials unique names or they will overwrite each other when imported to Unreal
  • give all texture files unique names or they will overwrite each other
  • Optional: place all texture files in the same folder that will be used to export fbx files from truespace.
  • all textures must be size power of 2
  • maximum texture size 4096x4096
  • texture file types - bmp, tga, pcx, jpg, jpeg and png (and dds and hdr ?)
  • choose a naming convention for the texture files, the "xxx" might be the mesh name if it's the only texture for the mesh:
    • T_xxx_D = diffuse
    • T_xxx_N = normalmap
    • T_xxx_S = specularmap - new materials in UE4, how handle? maybe ok fbx format read may adjust
  • only animate truespace actors with skeleton controls and joints
    • full character node motion is not exported by the fbx plugin
    • the fbx plugin exports the skeleton and the mesh as seperate items and joins them via skinning
    • any animation on the character as a whole is ignored and only joint animation exports.
    • the skeleton root is the invisible joint used to move and animate a truespace actor as a whole unit
  • the truespace actor can be locked by expanding the matrix input - so only skeleton root can move the whole thing
  • do not have animation keys on the whole truespace actor and the root joint at the same time
  • only animate the whole actor if the animation is like static mesh animations (no joint motion)
  • limbs must be unencapsulated before fbx default mode export
  • y rotations that go less than -90 or greater than +90 can result in flipping
  • when creating a skeleton use the shape skeleton tool to place the first 2 joints into position after the skeleton root position and rotation is set
  • tS practical limits are about 100x100x100 meters - slightly bigger than the Apollo 11 level
  • ue4 units are in cm, ut3 default is 1uu = 2 cm
  • for csg geometry boolean, only subtract a simple mesh from an existing boolean object or another mesh
  • do not subtract an existing boolean object from anything else
  • Landscape:
    • square single sided plane
    • size in meters should match the width and height segments, so 15x15 segments would be 15x15 meters
    • width and height segments
      • 7x7
      • 15x15
      • 31x31
      • 63x63 - may be the upper limit here
      • 127x127
      • 255x255
    • result will be landscape with 1 section and 1 component

Items that will transfer from Truespace to Unreal:

  • CSG Add Geometry - any mesh that does not have a static or skeletal or terrain tag
  • simple Subtraction CSG - only subtract a mesh from another mesh or a boolean object
  • Static or InterpActor meshes - meshes and animated meshes
  • Skeletal or CinematicSkeletal meshes - skeletal and animated skeletal meshes
  • Landscape/Terrain - square planes
  • Materials and Textures
  • Camera and limited animated cameras
  • Lights and limited animated point and spot lights
  • Object transform animation
  • Skeleton joint animation
  • particle system standin - like static and skeletal meshes the particle system must already exist in ue4

Skeletal Mesh Notes:

  • uv map the mesh before skinning to the skeleton
  • freeze mesh transforms with front of the mesh facing in the +X direction
  • triangulate the mesh before export - best practice
  • vehicle tires will rotate on their Y axis (true for udk not sure about ue4)
  • create a skeleton
    • 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 procedurally in unreal
  • use ts unofficial update vertex snap for precision placement of joints if needed
  • 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
  • expand the matrix connector of the truespace actor to lock the whole body movement
  • animate the skeleton root with ik/fk controls or direct selection - see the 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 which will place the animclips inside 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 at frame -10 there is a problem with default pose if joint orientations don't have z pointing to the next joint

Animation Notes(needs work):

  • place different animations on different tracks with each track holding only one clip
  • first clip for tS actors named "DefaultPose" with key at -10
  • can rename the clips which will rename the animclip nodes but will have no effect on import to ue4
  • disable all clips except one for fbx export. ok to keep the default pose key
  • 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

Prepare for export to Unreal:

  • create a folder to gather all the assets - texture files, mesh files...
  • new scene
  • set animation frame rate to 30 fps
  • add layers to control visibility for export
    • csg
    • skeletal mesh prototype
    • static mesh prototype
    • landscape
    • skeletal meshes
    • static meshes
    • static mesh collisions
  • model to scale - truespace actors are a little small but useable
  • unique material names and use BlankDXMaterial style
  • name the joints for skeletal meshes, also rename the Skeleton root, no spaces for max compatibility
  • store textures in the fbx export folder for truespace
  • use the boolean tools keep history option when creating csg  subtraction geometry
  • name all the materials for the prototype static and skeletal meshes
  • unencapsulate limbs inside the skeleton
  • create collision meshes for the static mesh prototypes
  • uv map for textures and lightmaps for static meshes
    • uv1=for material application
    • uv2=for lightmaps lightmap non-overlapping
    • uv3 - there is a technique to add a 3rd uv map - see fbx notes
  • tag the skeletal and static mesh prototypes and any landscapes
  • give the prototypes the same name as their tags so the t3d matches the fbx exports
    • SK_xxx for skeletal meshes
    • SM_xxx for static meshes
    • UCX_SM_xxx for the static mesh collisions
  • copy the prototypes to create the scene instances and rename if desired
  • to use pre-existing skeletal meshes use the group to make the path match.  for example set group to Character on a skeletal mesh named HeroTPP to end up with a full name of "/Game/Character/HeroTPP.HeroTPP".  The exported path always starts with "/Game/", the group name is appended and the mesh name is appended after that.
  • preexisting static meshes don't seem to need the path to match up
  • expand the matrix of the actor instances to prevent animation of the whole actor
  • set the pivot of landscapes to the most negative X and Y vertex and flatten the axis
  • freeze the static mesh and collision matrices
  • freeze skeletal mesh before skinning

Unreal Batch Export:

  • simplifies the export of multiple objects, only visible items eligible for export
  • the fbx modes control fbx export behavior and restricts object selections
  • best use is exporting all the prototype meshes and all the animations on each skeletal mesh
  • matinee may be better as a manual process to produce one file for the entire scene
  • note that the matinee export modes may not be in fact useful modes for batch exporting
  • exports in binary format fbx 2015
    • Static Mesh - selects the meshes that have the Static Mesh tag name === object name, the static mesh prototypes. each file comes from the mesh name. no animation is exported. uses the fbx plugin udkstaticmesh mode so items are the correct orientation during import to Unreal
    • Skeletal Mesh - selects the meshes that have the Skeletal Mesh tag name === object name, the skeletal mesh prototypes. each file comes from the mesh name. no animation si exported. uses the fbx plugin default mode
    • Skeletal Mesh Animation - selects the meshes that have the Skeletal Mesh tag name that have animations. the file name is the form meshname_animationClipName.fbx . only active clips will export.
    • Static Mesh Matinee - - selects the meshes that have the Static Mesh tag name that have animations. the file name is the form meshname_animationClipName.fbx . only active clips will export. uses the udkmatinee mode export so items will work with the non-standard fbx format used in matinee
    • Skeletal Mesh Matinee -- selects the meshes that have the Skeletal Mesh tag name that have animations. the file name is the form meshname_animationClipName.fbx . only active clips will export. uses the udkmatinee mode export so items will work with the non-standard fbx format used in matinee. This mode exports the mesh as if it were a single null item.

Export to Unreal file formats:

  • Actors:
    • make skeletal mesh prototypes visible, hide everything else
    • triangulate the mesh
    • fbx export
    • export scale 100
    • export mode default
    • no animation
    • set the file name to be the same as the prototype and tag
    • can use batch exporting, name will come from the object
    • DefaultPose clip active
    • export each clip one at a time
    • export animations one at a time by setting the clips enable/disable - export will be slow
    • DefaultPose clip will not export
    • fbx anim is shifted to start at zero when clip does not
  • Static meshes:
    • make static mesh prototypes and their collision meshes visible, hide all others
    • triangulate the meshes
    • fbx export
    • export scale 100
    • no animation
    • export mode udkstaticmesh or use default with import rotations of -90 0 and 180 in ue4
    • select and export each static mesh along with it's collision mesh
    • batch export will not work with combination static mesh and their collisions, end up in different files
  • Animated Static meshes
    • make all visible except prototypes and collisions (include collisions??)
    • export whole scene
    • export mode udkmatinee
    • single clip
    • animation
  • Map
    • make all visible except prototypes and collisions
    • unreal t3d export
    • time frame 0
    • scale 100

Import to Unreal Editor:

Import the static and skeletal meshes and create any particle systems then import the t3d map.

  • import skeleton mesh to unreal
    • import mesh
    • import skeleton
    • import materials
    • import textures
    • import normals
    • create physics asset - maybe better to do phys assets manually
    • override full name - so uses the file name
    • rotation -90 roll, 180 yaw
  • import static mesh
    • all settings same as skeletal mesh
    • if exported as udkstaticmesh mode no rotations needed on import
  • import t3d
    • into a blank map after skeletal and static mesh prototypes have been imported
    • fix uv on any csg geometry
    • if landscape imported
      • select it
      • landscape > manage > change component size > apply without any changes
  • animated static mesh import fbx animation
    • select the animated item in the scene - no need to select it, animation is already tied to the scene instance
    • add matinee and open it
    • import corresponding fbx file
    • docs say only 1 movement track per group(object)
  • import skeletal mesh animation
    • ue4 content browser select mesh and open it's editor
    • switch to animation editor mode
    • import fbx animation
      • name will come from the fbx file name, rename if desired
      • do not import mesh
      • select the skeletal mesh in the level
      • go to matinee
      • select the skeletal mesh in the level
      • add new skeletal group
      • zero out location and rotation in the Movement track
      • press enter to create a keyframe in the Anim track, select the skeletal animation

That's all.

matinee fbx import matches via the mesh name in the level/scene

Truespace FPN is 1.8 meters tall which is close to the ue4 size. TS FPN can be customized to match precisely.


May 19, 2013