Using Match Pose feature in Uefy 2.1

Uefy v2.1 adds a new Match Pose feature that can pose the rigged character to be the same as an imported animation.

This is significant because now we can easily copy Key Frames from existing animations. Allowing us to seamlessly blend our custom animations with existing sets like those on the Unreal Marketplace.

Prior to this feature it had to be done manually. By individually moving every single control to it’s correct position in an attempt to match the pose of an existing animation.

There are Limitations

However it is important to understand the limitations of this feature and how it works to use it effectively.

Match Pose not Retarget

This feature is not a retargeting solution, it simply matches the transforms of an imported armature with animation to the rigify rig.

This means we can not use characters with different proportions to copy the pose. If animations were authored on a different character they could not be copied over without severe distortion. Which is very limiting and not useful at all.

So we use Unreal Engine to do the retarget for us. Animations from the unreal marketplace are obtained for the unreal mannequin. But they can be retargeted using the engine to a character of any size.

By retargeting in the engine to our characters previously rigged with Rigify + Uefy. We can obtain animation that is usable for pose matching.

While this works well for overall size/scale. Some features to fine tune the retarget are specific to the unreal editor and not exported in the output FBX.

To get an accurate view of what the pose will look like in Blender. In the skeleton Retargeting Options, recursively set everything to ‘Animation’.

(Left) Production values for retargeting options. (Right) Everything set to ‘Animation’

Depending on how different the proportions of your character are to the Unreal mannequin this will introduce stretching and displacement in some places.

This is the pose that will be exported from the engine to FBX.

How to work around this

So how can we work around this?

Use the Mannequin

Well the first thing you can do is just rig the mannequin in blender and use that for creating your own animation. Since any rigged mannequin is going to match the proportions of the original. There will be minimal stretching or displacement.

Once the animation is made and imported to unreal you can retarget it to your custom characters in the editor.

But I want to use Custom Mesh

Can we use a Custom Mesh and overcome this stretching problem? Yes.

Depending on what you need this will mean different things.

If you are primarily interested in single poses for Key Frames. You can simply move the displaced bones into place. If a single pose is what you need that is all there is to it. Once corrected you can add it to the pose library and reuse as needed.


But I want the entire Animation

This trick is not going to work for a whole animation. Because that would mean updating every single frame by hand. Can we do anything in this case? Yes.

It may not be as fancy as the retargeting options in the unreal editor but Uefy does offer a couple of options to improve the pose.

(Left) Match Pose with default control file. (Right) Match Pose with customized control file resolve all issues.

You can edit the control file in Scripting workspace. It would be called ‘uefy_anim_Custom.json’ and set either location or rotation value to ‘false’ for any problem bone.

This is somewhat affected by the type of animation you are running. But for most animation selectively setting the location value to false on clavicle, thigh, upperarm, hand and toe bones will likely eliminate the most common stretching problems.

Turning off a transform on one bone might have consequences further down the chain. If your mesh has them the twist bones might also play a role. So you do need to plan this out a little.

This is not about just flipping a switch on or off. By carefully choosing whether location or rotation transforms are copied from the animation or inherited from the rig by various bones. You can remove the stretching problem almost completely.

In the cases where this is affecting animation playback you can fall back to animating with the mannequin.

Conclusion

Using a combination of manual adjustment and control file customization. We can efficiently Match Pose and extract Key Frames from existing animation. Without spending a lot of time manually moving every control in the rig. This is the primary function of this feature.

It is a great time saver added to Uefy 2.1


Blender 2.83 LTS and Uefy Script

Blender has been moving forward with new updates at light speed. Many new features have been added. Including new functionality for Rigify that is really awesome. Rigify was always a good rigging system but with these new updates it can truly stand on it own against some of the more larger systems.

These new updates and changes have been transparent to Uefy Script without any breaking effects. But there are some cosmetic changes to the interface you should be aware of when following what is shown in the older youtube tutorials.

FBX Import and Export

New location for FBX import / export options

When importing or exporting FBX files the options for the armature and animation are on the right side of the dialog box. Only the location has changed. You still get the same options and they still operate the same way.

Run Script Button

New run script button

The “Run Script” button has been shortened and looks like a play button now. It has the same function and nothing has changed.


Spine and Neck Joints

With it’s default settings Rigify requires the spine to be continuous without any breaks between the bones. With newer Blender releases it is now possible to select and move the lower spine without moving the neck and head.

However this still causes an error with Rigify when you try to the generate the rig. You can avoid this by moving the whole spine as one piece. Just make sure that when you adjust the bones the head and tail of adjacent bones in the metarig always overlap perfectly.

For example the Tail of Spine.004 should be in the exact same location as the head of Spine.003

If you do that the rig generates without any problems.

Advanced Spine and Neck Joints

It is possible to separate the neck and spine

It is actually possible to separate the neck and spine but requires an additional change to Rigify settings for metarig neck bone.

You have to turn off “Connect Chain” for Spine.004 in Pose Mode -> Bone Properties -> Rigify Type -> Options

After doing so the rig will generate without issue even if there is a break between the neck and spine. This could be great for rigging larger Brute/Hulk style characters.

This is a newer functionality that I’ve not used much but it seems to be working fine in the limited tests I’ve done with v1.3 of the script. I’ll have this fleshed out more for the next update.