Table of Contents
Export 3D Animation To Video
Overview
The Export_3D_Animation_To_Video command is used to create a video file (.avi) of the 3D animation displayed in Visual3D's viewer.
- Unlike Export_3D_Animation_To_Image, which captures static snapshots, this command records a sequence of frames and compiles them into a playable animation.
- Useful for exporting video clips for presentations or visual analysis.
Pipeline Command
The command below is as seen on the Visual3D application, it has many parameters as there are many options to manipulate this command.
Export_3D_Animation_To_Video ! /FILE_NAME= ! /VIDEO_FILE_NAME= ! /EVENT_SEQUENCE= ! /EXCLUDE_EVENTS= ! /OUTPUT_FRAME_RATE_DIVISOR=1 ! /OUTPUT_WIDTH=320 ! /OUTPUT_HEIGHT=240 ! /AUTO_CLOSE_OUTPUT_DIALOGS=FALSE
Command Parameters
The following table shows the command parameters and descriptions:
Parameter | Description |
! /FILE_NAME= | Name of the motion file (e.g., 'Subject01.c3d'). Wildcards (e.g., '*.c3d*) can also be used. |
! /VIDEO_FILE_NAME= | Full path and name of the '.avi' file to be created. |
! /EVENT_SEQUENCE= | Specify an event range (e.g., LHS + LTO) to define the segment to export. |
! /EXCLUDE_EVENTS= | Events that, if present, will cause sequences to be skipped. |
! /OUTPUT_FRAME_RATE_DIVISOR = 1 | A divisor applied to the original frame rate. For example, '2' means every second frame is kept. |
! /OUTPUT_WIDTH=320 | Width (in pixels) of the output video. Must match a supported resolution. |
! /OUTPUT_HEIGHT=240 | Height (in pixels) of the output video. Must match the supported resolution. |
! /AUTO_CLOSE_OUTPUT_DIALOGS=FALSE | If 'TRUE', suppresses file dialog popups during batch processing. |
Dialog
The command can be inserted manually or adjusted using the Visual3D dialog editor. The dialog box allows users to configure settings such as output file, resolution, and playback frame rate.
- Motion File: Path to the input motion file used for generating the video.
- Exported Video File: Destination file path and name for the '.avi' video file.
- Frame Rate Divisor: Adjusts playback speed. A value of '2' halves the frame rate.
- Output Size: Choose video resolution (e.g., '320×240). Must match a standard aspect ratio.
- Defined Events/Event Sequence: Restrict the export to a defined event range (e.g., 'LHS' to 'LTO'.)
- Exclude Sequences Containing These Events: Optionally remove sequences containing listed events from the output.
Examples
The following example will go through the use of the Export_3D_Animation_To_Video Command in the Visual3D application.
Example 1: Simple Use Case
This example exports a video between 'LHS' and 'LTO' using the default resolution and no frame rate change. This is useful for exporting one complete stance phase of the left leg.
Export_3D_Animation_To_Video /FILE_NAME=Subject01_Trial1.c3d /VIDEO_FILE_NAME=Z:\Videos\LHS_to_LTO.avi /EVENT_SEQUENCE=LHS+LTO /EXCLUDE_EVENTS= /OUTPUT_FRAME_RATE_DIVISOR=1 /OUTPUT_WIDTH=640 /OUTPUT_HEIGHT=480 /AUTO_CLOSE_OUTPUT_DIALOGS=TRUE ;
Frame rate divisor of 1 means the video plays in real-time speed. 'AUTO+CLOSE_OUTPUT_DIALOGS=TRUE' ensures this can run as part of a batch pipeline.
Example 2: Complex Use Case
This example exports reduced-speed videos for all trials in the workspace matching '*.c3d'. It halves the frame rate for slow-motion playback, increases the resolution, and excludes sequences that contain the 'LOFF' events.
Export_3D_Animation_To_Video /FILE_NAME=*.c3d /VIDEO_FILE_NAME=Z:\ExportedAnimations\SlowMo_ /EVENT_SEQUENCE=RHS+RTO /EXCLUDE_EVENTS=LOFF /OUTPUT_FRAME_RATE_DIVISOR=2 /OUTPUT_WIDTH=800 /OUTPUT_HEIGHT=600 /AUTO_CLOSE_OUTPUT_DIALOGS=TRUE ;
This approach allows comparison of propulsion phases from multiple participants with visual consistency. Output videos are smoother but play at half speed for better observation.