Locomotions assets allow for blending of animation clips based on the value of two inputs. These inputs are two agent metadata: "targetLinearVelocity" and "targetAngularVelocity".
These metadata are used for building a 2D point which is then used to sample the right animation in the Locomotion graph. targetLinearVelocity is used as the X value, while targetAngularVelocity is the Y value.
These metadata are usually modified by Atoms Behaviour modules during simulation time, but can also be edited by the user.
Usually locomotion assets are useful for blending clips such as idle, walk, run, jog, etc
From AtomsVFX 5.4.0, a new metadata has been introduced for handling unsync clips: "targetFrameAngularVelocity"
This metadata contains the value of the angle between the current direction and the previous direction.
Before you can start building a Locomotion asset, you need to ensure your animation clips are properly set up as failing to do this could lead to unexpected results:
The graph X value represents the linear velocity of the agent (meaning the velocity in which the agent is moving) while the Y value represents its angular velocity (meaning how much the agent is turning). Both velocities are considered per frame.
To add animation clips to the graph you can right click on the viewport or click on the Animation Clip Dialog button . The Animation Clip Dialog will show up, you can then either drag and drop an animation clip from the dialog onto the viewport (you can only drag one at a time) or select multiple animation clips and press on the "Import" button.
When adding new clips Atoms will evaluate the best position on the graph for each clip.
Atoms uses the following logic:
Based on this logic, your clips might appear on different places depending on which clips you are importing or have imported.
Once you have imported all the clips for your locomotion, you can make Atoms to layout them again according to the method described above, by selecting the clips and pressing the layout button .
The position of your clips in the graph is very important when building a locomotion asset.
It is important to understand that:
For this reason, it is ok if users move the animation clips to adjust the graph.
Every time a new clip is added, moved or deleted new triangles will be rebuilt. These triangles serve a simple purpose: helping Atoms find the the right clips to play at every frame.
At every frame Atoms will:
Atoms locomotion system provides support for unsynced clips. Unsynced clips are clips required for specific actions, such as turning 90 or 180 degrees.
These clips cannot be usually integrated in a locomotion system as they might create weird artefacts during the animation blending.
Once Atoms finds a suitable unsynced clip for a specific change of direction, it will wait for the right transition frame for the clips currently playing, then will play the unsynced clip by itself.
To make a clip "unsynced" users can use the toggle in the inspector and provide blend in and out frames.
Once a clip is made unsynced, all the triangle edges containing that clip will turn orange.
There is one final thing to know about unsynced clips.
The lookup for these clips is one by using the (targetLinearVelocity,targetFrameAngularVelocity) pair, while standard clips use (targetLinearVelocity,targetAngularVelocity).
This is because these clips should play only when the direction angle variation at the current frame matches their Y value.
Additionally you can also provide a value for "Wait Frames" to make sure the agent plays an unsync clips only when the direction angle variation happens for a number of frames. It is recommended to keep this value to 0.
Unsynced clips should always the outer clips of a locomotion graph. |
Please find below a list of mouse actions which can be performed in the node viewport.
Please find below a list of keyboard shortcuts: