Animation File Specification (STT files) (for MindRender (TM) Products) (c) Themekit Ltd., 1997 This information is given freely by Themekit Ltd and may be used to support the STT data files for third party applications. The STT data file allows animation information for a polygonal model to be represented. The STT file complements and refers to the ODT file which contains the actual model architecture information. STT stands for State Transition Table although the animation methods and information contained within this file now go beyond simple state transitions. File Format: The first line of the STT file is the file version specifier: #MINDRENDER 1.1 Next, the number of animation states to follow is specified: For each state, the state name is specified between curly braces: <{state name}> The state information is then specified. This varies depending on whether the state has a type of SINGLE or KEYFRAME. State definition for SINGLE states: The keyword SINGLE is specified: SINGLE Next, the number of nodes in the state is specified: Then for each node in the state, the following is specified: First, the node name is specified between curly brackets: <{node name}> Next, the node behaviour is specified, the format of which varies depending on the node behaviour type (STATIC or DYNAMIC). For STATIC node behaviours: First the node behaviour type is specified: STATIC The next line contains the node displacement vector: Vx Vy Vz The next line contains the node translation vector: Tx Ty Tz The next line contains the node orientation vector: Ox Oy Oz For DYNAMIC node behaviours: First the node behaviour type is specified: DYNAMIC The next few lines describe the dynamic displacement behaviour: First, the starting displacement vector: Start_Vx Start_Vy Start_Vz Next, the end displacement vector: End_Vx End_Vy End_Vz Next, the period, offset and animation type for displacement (see later): Period_V Offset_V AnimType_V The next few lines describe the dynamic translation behaviour: First, the starting translation vector: Start_Tx Start_Ty Start_Tz Next, the end translation vector: End_Tx End_Ty End_Tz Next, the period, offset and animation type for translation (see later): Period_T Offset_T AnimType_T The next few lines describe the dynamic orientation behaviour: First, the starting orientation vector: Start_Ox Start_Oy Start_Oz Next, the end orientation vector: End_Ox End_Oy End_Oz Next, the period, offset and animation type for orientation (see later): Period_O Offset_O AnimType_O State definition for KEYFRAME states: The keyword KEYFRAME is specified: KEYFRAME Next, the number of keyframes in the state is specified: Next, the animation type for the keyframe sequence is specified: Next, the starting keyframe name is specified between curly brackets: <{starting keyframe name}> Then for each keyframe in the state, the following is specified: First, the 'exit' flag is specified (whether the state can be switched when in this particular keyframe (1) or not (0)) Next the forward and backward keyframe transition times are specified: Next the forward and backward transition flags are specified (with zero specifying a 'switched' transition and one specifying a smooth 'morphed' transition. Next the keyframe name is specified between curly brackets: <{keyframe name}> End of file format. Notes: All times are in seconds and can contain fractional parts (eg. 123.45 means 2 minutes 3 seconds and 45 hundredths). Dynamic node behaviour animation types: 0 No animation 1 Loop forwards (starting at start) 2 Loop backwards (starting at end) 3 Ping-pong (start forwards) 4 Ping-pong (start backwards) 5 One way (start forwards) 6 One way (start backwards) 7 Sinusoidal (uses offset and period and goes between start and end) 8 Start (stays at start values) 9 Delta (increments by start values) Keyframe animation types: 0 None 1 Loop Forwards 2 Loop Backwards 3 Ping-pong Forwards 4 Ping-pong Backwards 5 One way Forwards Examples of STT Files: Example 1 : A simple single static state. #MINDRENDER 1.1 1 {my_first_state} SINGLE 1 {my_static_node} STATIC 0.000000 50.000000 0.000000 0.000000 0.000000 0.000000 0.000000 45.000000 0.000000 This describes one animation state with a single static node which has displacement of 50 in the Y-axis and an orientation of 45 degrees around the Y-axis. Example 2 : A simple single dynamic state. #MINDRENDER 1.1 1 {my_second_state} SINGLE 1 {my_dynamic_node} DYNAMIC 0.000000 -50.000000 0.000000 0.000000 50.000000 0.000000 2.000000 0.000000 3 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 8 0.000000 -80.000000 0.000000 0.000000 180.000000 0.000000 4.000000 0.000000 7 This describes one animation state with a single dynamic node which has a sinusoidal rotation around the Y-axis from -180 degrees to 180 degrees with a sinusoidal period of 4 seconds, the node also has a ping-pong motion for displacement from -50 to +50 along the Y-axis with a repetition period of 2 seconds. Example 3 : Keyframing between the states described in examples 1 and 2. #MINDRENDER 1.1 3 {my_keyframe_state} KEYFRAME 2 3 {my_first_state} 1 4.000000 4.000000 0 0 {my_second_state} 1 4.000000 4.000000 0 0 {my_first_state} {my_first_state} SINGLE 1 {my_dynamic_node} STATIC 0.000000 50.000000 0.000000 0.000000 0.000000 0.000000 0.000000 45.000000 0.000000 {my_second_state} SINGLE 1 {my_dynamic_node} DYNAMIC 0.000000 -50.000000 0.000000 0.000000 50.000000 0.000000 2.000000 0.000000 3 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 8 0.000000 -80.000000 0.000000 0.000000 180.000000 0.000000 4.000000 0.000000 7 This describes three animation states, the last two being similar to the animation states described in examples 1 and 2. The first animation state describes a keyframe state containing 2 keyframes. The keyframe animation is of a ping-pong (forwards) type and the start keyframe is called 'my_first_state'. The two keyframes switch between each other at 4 second intervals and the transitions are 'switched' (as opposed to morphed).