Pose matching is a simple animation technique which automatically picks the animation starting time based on the current pose of the character. This ensures that the gap between the current pose and the first pose of the new animation is minimal and the amount of blending required is significantly reduces.
With pose matching, foot cycles being out of sync is no longer a problem and sync markers become un-necessary.
How It Works
When transitioning into an animation state, typically an animation starts from the beginning or a pre-defined offset (excluding sync marker use). With pose matching node it works differently. Instead of starting the beginning it searches through a short list of poses (generated during blueprint compilation), compares them with the current pose and then starts the animation at the time of the closest pose.
To compare the pose data with the current pose, it is necessary to use the Motion Snapshot node, further down in the animation graph. Please see the section of this manual detailing the Motion Snapshot node for more details.
The data that the pose matching node uses to compare pose includes:
List of Bones
Bone Position (relative to root)
Bone Velocity (relative to root)
For each of these pose aspects, weightings can be set to calibrate how the pose is matched. Any one of them can be ignored by setting it’s weight to zero.
In a Motion Symphony workflow, pose matching nodes effectively replace regular sequence players. However, there are a few more settings to configure to ensure that the pose matching works properly.
Step 1: To create a pose matching node, right click in your graph and choose ‘Pose Matching’ in the ‘Motion Symphony’ category.
Step 2: Select the new Pose Matching node and set its sequence in the ‘Settings’ category on the details panel.
Note: Other settings in this category are identical in nature to the regular sequence player.
Step 3: In the ‘Pose Calibration’ category, add elements to the ‘Pose Config’ for each bone that you wish to match. It is not necessary to match a lot of bones for pose matching to work. Most of the time just the left and right foot will be required but it depends on your animations and what you are trying to achieve.
Body Velocity Weight - The cost weighting of the body velocity used when calculating the closest pose. A default value of 1.0 is normal weighting, higher values will make body velocity have a higher impact.
Pose Config - A list of bones that the user desires to match
Bone - Reference to a skeleton bone to match
Position Weight - weighting (importance) of the position of this bone when comparing poses
Velocity Weight - weighting (importance) of the velocity of this bone when comparing poses
Note: The default values of 3.0 for bone positions and 1.0 for velocities is a good starting point and shouldn’t need to be altered.
Step 4: Make sure the motion snapshot node is setup near the end of your animation graph. Whatever bones you have chosen to match on the pose matching node, these must also be set up for recording on the motion snapshot node. See Motion Snapshot
This should be sufficient for a minimal setup
Some additional settings under the ‘Pose Matching’ category can be used to have an increased control of the pose matching node and make it more efficient.
Pose Interval (Default 0.1s) - The time interval between poses generated during graph compilation. The lower this value the more poses there are for potential matching.
Poses End Time - The time in the animation after which no more poses will be generated for matching. In some cases it may not be desirable to start the animation beyond a certain time point. If so, set this value to that time so only poses before this time can be generated and used.
Note: If you only desire a single pose to match at the beginning of the animation, set the PoseInterval to be greater than the Poses End Time.
The pose matching node supports runtime mirroring. If it is enabled, then additional poses will be generated for the mirrored version of the animation as well. When the node is activated (e.g. state transition) it will choose either the mirrored version or the normal version depending on how well the poses match. This could be very useful for something like a ‘staggered’ idle animation which could be either left or right foot forward.
Before using runtime mirroring, you must first setup a Mirroring Profile which is detailed in the General section of this user manual.
Enable Mirroring - Check this box if you want to enable runtime mirroring
Mirroring Profile - The mirroring profile to use for mirroring.
Pose match debugging can be turned on and off via a console command. In the UE4 editor, press the tilde (`) key and type the following command replacing the # with the relevant debug level:
0 - Turn debugging off
1 - Show the bone positions that were chosen (yellow balls)
2 - Show all pose bone positions (different colors indicate different bones)
3 - Show all pose bone velocities (i.e. arrows coming off each bone position)
These are the poses generated for a run cycle animation. Notice how the left and right foot paths are shown distinctly in different colors. With the debugging feature, it is easy to see that the pose data generated correctly because the left and right foot bone paths are consistent with the running animation itself.