Camera Exporter

Overview

With the FlowGraph included with this page, you can export camera information from the Sandbox Editor to 3ds Max.

Installation

  1. Install the scripts attached to this page.
  2. Create a new folder inside the build root folder and put the toolkit files there. This will be the working directory and must contain the working Max file.

Use

  1. Start the Sandbox Editor and open a level.
  2. On the View menu, click Open View Pane, and then click Flow Graph to open the Flow Graph Editor.
  3. On the File menu in the Flow Graph Editor, click Open and load the camera_info.xml file from the toolkit.
  4. Note: The following step is very important to keep captures in sync: In the camera_info Flow Graph, find the System:ConsoleVariable node and the Value of the fixed_time_step value that you used for capturing the video. Click the AI/Physics button below the Editor viewport - this will run the Flow Graph and start recording the camera data.
  5. Move the camera or run a Track View.
  6. Click the AI/Physics button again to stop recording.
  7. Navigate to the build root folder and copy the Editor.log file to the working folder.
  8. Start 3ds Max and open the included Max file or any other Max file from the working folder.
  9. On the MAXScript menu, click Open Script and select the included editor_camera_export.ms file.
  10. Enable the MAXScript -> MAXScript Listener to see potential error messages.
  11. Click anywhere in the MAXScript Editor, hold down Ctrl and press E to execute the script. Alternatively, on the Tools menu, click Evaluate All. If everything goes okay, you will now have a camera in the scene.

Troubleshooting

  • MAXScript Listener says "Editor.log not found. Please save your max file and place the Editor.log in the same directory!"
    • Copy the Editor.log file from the build root folder into the working folder where the editor_camera_export.ms file is located.
    • Make sure that the current 3ds Max scene is saved in that same folder.
  • MAXScript Listener says "Error! Couldn't find fixed_time_step and fov data. Please delete editor.log and re-export camera movement with enclosed flow-graph script!"
    • Re-export the camera with the included Flow Graph and copy the Editor.log file from the build root folder into the working folder.
  • The camera moves too far in the 3ds Max scene.
    • For cases like this, a unit conversion modifier can be set. Find the fUnitScale = 100.0 line at the beginning of the script and change it until it fits. However, the default value should work if everything is set up correctly, so you might want to double-check the exported geometry from the Editor.
  • The exported camera is not in sync with a captured video from the Editor.
    • Make sure that fixed_time_step has been set to the same value at both captures.
    • Make sure that the frame rate of the video matches the frame rate of the 3ds Max scene.
    • You may have to offset the camera track in 3ds Max until the first frame matches the video. It helps to have some fast, jumpy movement at the beginning of the camera track in the Editor.