Friday, 26 October 2018

Animation Retargeting

Using the default FPS pack in Unreal provides you with a set of animated robotic arms. If you look down, or around it is not possible to see any legs or body, and the robotic arms do not fit in with my theme.


I downloaded the Animation Starter Pack by Epic Games on the Unreal Marketplace. I found the term "Animation Retarget" which will allow me to use these animations on another character.

After doing some searching, I came across Mixamo, by Adobe. They offer 3D animated characters you can customize and download. After a while, I discovered they have a free asset pack on the Unreal marketplace.


I found a written tutorial on the Unreal Engine website. Following this, I began by opening the Animation Starter Pack skeleton mesh and using the "Set Up Rig" for both skeletal meshes.


By doing this I am matching up the bone structure of each character. There is an advanced tab, which will include individual fingers etc.



The auto mapping only completed a few correctly. I went through the entire list manually and assigned it the most accurately as I could.


Going into the Animation Starter Pack and right-clicking to access the Retarget Anim Assets > Duplicate Anim Assets and Retarget option will allow us to duplicate the animation from the starter pack into an animation we can use with our new character.


This confirms which skeletal mesh we want to create the new animation for. Once I had completed this, according to the tutorial it should be functioning with the possibility of slightly deformed fingers.

My character was not animated at all, so I opened the Blueprint file for my First Person Character and changed the Animation to the MixamoAnimBP_Adam (Blueprint file included for my selected character in the Mixamo Character Pack).


Once I had done this, my character was animated. However, the animations were deformed and not functioning as expected.


All of the animations were behaving oddly, except for the standing idle default animation. I attempted to fix this by using the Retargeting Options:


This was advised to fix issues concerning the fingers. I attempted to use this method to fix the arms too but did not succeed.


I came across a setting in the Animation tab "Root Motion". If I selected each animation and selected the root lock option, by doing this the character was no longer beneath the ground. This did not help with the deformed body animation.

I skipped over the last step of the written tutorial, not realizing the importance of the last step at the time. Instead, I found a YouTube tutorial which stressed the importance of ensuring both skeletal meshes have the same pose in order for the animations to be compatible.


This was required on both skeletal meshes.


By matching their poses and saving this, all my animation issues were resolved. I now have a fully functioning character as I had hoped for.

The fact I have a realistic looking character that is moving is very satisfying, and I found it quite a complex task which was a little confusing the first time around. Now that I have completed it once, and understand what is happening after learning about the issue I had encountered, I feel confident to go ahead and do animation retargeting for further characters. However, there is still more work to do before I can say my character is complete.

If I play my game currently, my character has changed and he does move. But he is not holding a gun correctly, and he is not changing animations from walk to sprint etc and I must set these animation switches up next.

No comments:

Post a Comment

Unreal: Project Evaluation

Unreal is visually enticing and appears to be extremely user-friendly. In the beginning stages, I found it really nice to use and I was exc...