Export and Import Trackview Nodes with 3ds Max

Overview

The Track View Editor can export and import camera nodes in the Collada format.

The current state of the exporter/importer is as follows:

  • Only transformation tracks and the fov track have been tested and are supported.
  • Animated FOV's are supported.
  • Only the default Collada import/export plug-ins should be used. Do not use other Collada formats such as OpenCOLLADA.

Exporting Nodes

  • In the TrackView dialog, right-click a camera node in a sequence and select Save to a COLLADA file...
  • Save it to a convenient place:
  • Input the baking (sampling) fps needed:
  • Import the saved .dae file into 3dsMax:

Now there is a camera with animation curves.

However, it would only work after modifying the Collada file manually:

Axis Issue When Exporting to 3ds Max

  • A Max camera points to -z axis, its up direction is x and its left direction is y by default. (right-handed system)
  • Considering this issue, in order to represent a camera path in Max as same as in the engine, you should apply the following patches to the exported Collada file by opening it up in a text editing program:
  ...
  <visual_scene id="RootNode" name="RootNode">
   <node id="Flying_Cam_03" name="Flying_Cam_03">
    <translate sid="translate">0 0 0</translate>
    <rotate sid="rotateZ">0 0 1 0</rotate>
    <rotate sid="rotateY">0 1 0 0</rotate>
    <rotate sid="rotateX">1 0 0 0</rotate>
    <instance_camera url="#Flying_Cam_03-lib"/>
   </node>
  </visual_scene>
  ...
  ...
  <visual_scene id="RootNode" name="RootNode">
   <node id="Flying_Cam_03" name="Flying_Cam_03">
    <translate sid="translate">0 0 0</translate>
    <rotate sid="rotateZ">0 0 1 0</rotate>
    <rotate sid="rotateY">0 1 0 0</rotate>
    <rotate sid="rotateX">1 0 0 0</rotate>
    <node id="AdjustDefaultCameraPose">
     <translate sid="translate">0 0 0</translate>
     <rotate sid="rotateZ">0 0 1 90.0</rotate>
     <rotate sid="rotateY">0 1 0 0</rotate>
     <rotate sid="rotateX">1 0 0 90.0</rotate>
     <instance_camera url="#Flying_Cam_03-lib"/>
    </node>
   </node>
  </visual_scene>
  ...
  • As you can see, a node "AdjustDefaultCameraPose" is added and the 'instance_camera' tag is moved from "Flying_Cam_03" node to the "AdjustDefaultCameraPose" node.
  • There is also a simple command line tool which can do this automatically. Please download fix_cam_axis_issue.exe (should also be available in the \Tools\ folder) and make sure, that the .exe file is in the same folder as the camera Collada file you want to modify.
    Usage: fix_cam_axis_issue.exe max CameraFromTV.dae
  • To maintain the scale of movement, you should set the unit properly in the import dialog so that it says "Scale Factor: 1,0".

Importing Nodes

  • Suppose you imported the camera path like above and modified it somewhat in Max and now want to bring it back to the engine. After selecting the camera, choose Export Selected from the menu.
  • Save the file to a convenient place, but make sure that you selected Autodesk Collada file format. Make sure that in the FBX Export - Advanced Options you specify Z as up axis.
  • Then you either have to remove by hand the two additional nodes added ('AdjustUpAxis' and 'AdjustDefaultCameraPose') or you can use the commandline fix_cam_axis_issue.exe. This will output a new file called CameraFromMax.dae
    Usage: fix_cam_axis_issue.exe max CameraFromMax.dae
  • To maintain the scale of movement, you should set the unit properly in the export dialog so that it says "Scale Factor: 1,0".
  • In the TrackView dialog, right-click a camera node in a sequence and select Load from a COLLADA file...