Animation clip


An Animation clip is a specialized Simulation event used for loading a new animation into Atoms Crowd. The animation clip will get its motion data from an FBX or atomsclip file as well as any other supported format.


A status icon is displayed in the item list: red means the animation clip could not be loaded while green means the clip was loaded successfully.


Users can tweak their clips by editing the following values:

  • Event Name, the name of the animation clip.

  • Clip path, the path to the clip file.

  • Sanitize joint names, When this option is on, the skeleton joint names are sanitized: 1) any "." is replaced with "_" 2) if any joint name contains a ":" then the name is broken up using ":" as a separator and the last token is used as name

  • Sanitize joint scales, When this option is on, any joint zero scale will be replaced with a small value (0.000001).

  • Additive Mode, the additive mode for this clip. The additive mode can be: "None", "Bind" or "Reference". If None, this clip plays like a standard clip. If Bind, this clip will be evaluated as the difference of the animation values of the given file and the bind pose. If Reference, you will have to provide a reference clip file, this clip will be evaluated as the difference between the two clip files. Additive clips are used only within a state machine.

  • Blend Frames After foot up, the number of frames used for blending after the foot leaves the down state.

  • Loop, if the clip is loopable. When this is off the animation clip becomes a "one-shot clip". This will affect the behaviour of any state (state machine) using this clip.

  • Start and End frames of the clip.

  • Loop Blend, the number of frames used to blend when looping.

  • Disable Foot Lock, If this option is on, the foot lock system will be disabled when playing this clip.

  • Direction type: static, pelvis, joints or clip. Static: the clip uses the vector specified in the Direction field as direction. Pelvis: the clip uses the pelvis velocity as direction. Joints: The clip's direction will be the vector travelling from the first joint to the second joint (the joint ids are selected with the Direction Joints field). Clip: the direction is taken from the "clipDirection" metadata stored on the root pelvis joint. Local: stores the input direction (provided in the Direction field) in pelvis space (useful when blending clips oriented in different directions)

  • Direction, the direction used when the direction type is set to static.

  • Direction Joints, the two joints ids used for defining the direction vector when the direction type is set to joints. The button on the right will show a pop-up dialog to help you find the right joints id for a given agent type.

  • Compatible Agent Type, the agent type compatible with this clip. This field is mandatory if you wish to retarget this clip onto a non-compatible agent type.

  • Virtual root motion, (only visible when the compatible agent type has a virtual root). The axis used for transferring the motion from the skeleton root to the virtual root.

  • Override virtual root position (only visible when the compatible agent type has a virtual root), enables the override of the virtual root position configured in the agent type.

  • Virtual root position (only visible when “Override virtual root position“ is on and the compatible agent type has a virtual root), the virtual root position for this clip. It overrides the virtual root position defined in the agent type.

  • Transitions Frames, for long clips, you might have different transition frames.
    You can either enter them manually with a comma-separated string (i.e. "10, 50, 100") or let Atoms guess them for you by pressing the Auto button. Once pressed, the field is populated, but you will still be able to edit the string. If you don't specify transition frames, only the loop end frame of the clip is used. If you set -1, then every frame is used as a valid transition frame.
    Transition Frames are used by state machines only.

  • Override Pelvis/Feet Height, from Atoms 3.2 you can override the pelvis and feet heights embedded into the clip. If on, the pelvis and feet heights are evaluated using the Ground Height field value.

  • Ground Height, the value used for computing the pelvis and feet heights when "Override Pelvis/Feet Height" is on.

  • Reverse, if this option is on, the clip is played backwards during the simulation.

  • Mirror, if this option is on, the clip is mirrored.

  • Anim Mirror Plane,  the plane used to mirror all the joints without a match.

  • Bind Mirror Plane, the plane used to find the mirror joint pairs. It is also used to mirror the joints matched in a pair.

  • Side Joints Search, the method to find joint pairs. Auto: automatic search. By Name: the joint search will be based on a string replacement.

  • String Replacement, the string replacement when "Side Joints Search" is set to “By Name“. (i.e. "Left" "Right")

  • Mirror String Repl Type, specifies where to apply the string replace for the joint search: Any (any part of the name), Prefix (at the beginning of the name), Postfix (at the end of the name)

  • Enable Sitting, if this option is on, the sitting factor on this clip is enabled. 

  • Sitting Factor, the sitting factor used by sit adaptation for the pelvis operator. The sit adaptation can be enabled on state machine and clip reader modules.

  • Enable Perching, if this option is on, the perching factor on this clip is enabled. 

  • Perching Factor, the perching factor used by the perch module for knowing if this clip is on the ground (values is 1) or not (value is 0). The variation between 0 and 1 (and vice versa) shouldn't be between two consecutive frames as it is best to allow several frames for the perch transition. The perch module uses this value for interpolating the mid air position and the landing position.

  • Foot down data, the foot down state can now be edited directly inside the Atoms UI (Atoms Crowd 2.0). Click on the "Load  From Clip" button to load the graphs for each foot. You can edit the graphs, and the changes are stored in your animation clip as soon as it is registered. The foot down curves can also be computed automatically using the foot velocity or a ground height value. After the values are calculated, users can still edit the curves. 

  • Global IK, the retargeting global IK defines how to calculate the target point for the IK of the selected chain end joint. When the value is 0, the target is the default target point used by the retargeting; when the value is 1, a different method is used. The compatible agent type must be set on this clip, and it needs to have a characterization.

  • Clip operators, the list of clip operators to apply to this animation clip.

  • Metadatas, users can attach custom metadatas to joints. Valid metadatas are of type: bool, int and double.

 

On the top bar of the UI you can find a Switch Mode button: this button can switch the mode of this agent type from GUI to Script and viceversa.

On the right corner of the UI there are three buttons (from the right to left):

  • Register: registers the animation clip and stores it in the scene

  • Revert: reverts the animation clip settings to the last saved state

  • Update (arrow icon): Each animation clip has a python script under the hood taking care of registering the asset in Atoms, this script is baked within your scenes. The script can vary between different versions of Atoms and with this button you can update it to the latest available version.

Looping

The clip loop blending happens at the end of the clip after the loop end frame. The blend frames used are endFrame → endFrame + loopBlend and startFrame → startFrame + loopBlend.
As an example if your clip has the frame 20 as start frame, the frame 40 as end frame and a loop blend of 8 frames, the frames that will blend will be 40 → 48 with 20 → 28.

Preview

The preview widget displays the animation for the selected clip. You have controls for playing/scrubbing the animation and control for changing the joint size at the bottom.
Yellow circles appearing under the feet show the foot down state for each foot (this also reflecting the changes users might apply to the foot down data).

By right-clicking on the viewport, a menu will appear with the following options:

  • Set start frame: set the Loop Start field with the current frame value

  • Set end frame: set the Loop End field with the current frame value

  • Use UI frame range: the preview will only display the frame range provided as input in the UI. 

  • Draw grid: enable/disable the grid in the viewport display

  • Draw Joint Axis: enable/disable the joint axis in the display

  • Draw Joint Names: enable/disable the joint name visibility

  • Draw Joint World Pos: enable/disable the joint world position visibility, useful for guessing the ground height for your clip

  • Draw Animated Skin Mesh: displays the skin mesh from the compatible agent type in the viewport.

  • Lock Camera: enable/disable the locking on the camera

  • Lock Camera Y: enable/disable the locking on the camera on the Y-axis

  • Reset Camera: resets the translation/rotation of the camera

  • Frame objects: frame the objects in the viewport.

  • Test Loop: enable/disable the animation clip looping

  • Copy Joint Name: copy the selected joint name to the clipboard

  • Copy Joint Id: copy the selected joint id to the clipboard

Navigation Controls:

  • Alt + left click and drag: Rotate camera

  • Alt + middle click and drag: Pan camera

  • Alt + right click and drag: zoom camera

The clip direction

You might wonder why you need to set a direction for your clips. It is quite essential. If you set the wrong static direction for a clip, you might end up having your agents going in the wrong direction. 
Also, it's essential to understand that clips for a character should all share the same direction when used in a state machine, except in a few particular cases.

Your clip direction tells Atoms how your clip moves in space. 
Atoms uses the clip direction to rotate your agent and match the actual agent direction (travelling direction), which is computed at each frame. For instance, if your clip is travelling mainly on the Z axis, and you set the direction to be the X axis, you will see your agents rotated of 90 degrees on the Y axis later, and they will move in the wrong direction.
Please check the Animation Clip chapter to understand better how to set up your agent direction.




Copyright © 2017, Toolchefs LTD.