Mixamo Animation Retargeting

Hi, just purchased from the Epic store - I’ve tried following your tut vid but the “Retarget Mixamo Skeleton Asset” is grayed out. It is available for the mixamo animation packs but for none of my own imported characters.

Hi! The “Retarget Mixamo Skeleton Asset” action is active for skeletons assets that are compatible with the common Mixamo rig. Technically we check the bones names and we enable the option only if we found at least X% of the expected bones. Could you please share a screenshot of the bones hierarchy of your problematic skeleton? (PM me if you prefer).

I found what the problem is - I have downloaded all my characters from mixamo without animations - I just tried downloading one with animations and it worked. Are you able to get your plugin working for characters without animations? Otherwise I have to download about 50 characters again before they shut their downloads page down…

I’m glad you found a solution!

As the plugin grays-out the action only when the skeleton don’t has the expected bone hierarchy (animations are not considered for this), I suspect there is a “problem” with your characters (maybe they were using an old skeleton from Mixamo?). Can you try to re-download an up-to-date character from Mixamo (without animation) and check again? If the problem persists, please share the screenshot of the character’s bone hierarchy so that we can investigate.

Ok, tried with their stock “Pearl” character - it enabled the “Retarget to Mixamo Skeleton” which I then did - but when retargeting animations still not getting the correct results…ab974c5ad2027cf5654159d3596f2eda2560d741.jpeg

Hi, we downloaded the Pearl character from Mixamo website, fixed the translucent materials, and we didn’t experienced any problem with the retargeting:

https://.com/watch?v=xVd2b18UrTA

We checked it with both UE4.15 and UE4.16, with both one animation from the Animation Starter Pack (crouch) and one from the ThirdPersonRun (from the ThirdPerson template).

Please double check the instructions I sent you in the PM message:

  1. your target UE4 skeleton must have the rig set to “Humanoid”;
  2. on the Mixamo skeleton that you want to retarget, executed "Retarget Mixamo Skeleton Asset” contextual action and select the above UE4 skeleton as target;
  3. if you want to retarget a UE4 animation to the Mixamo character: select the UE4 animation that you want to retarget, execute the standard “Retarget Anim Assets” > “Duplicate Anim Assets and Retarget” action and select as target the Mixamo skeleton.
  4. if you want to retarget a Mixamo animation to the UE4 character: select the Mixamo animation that you want to retarget, execute the standard “Retarget Anim Assets” > “Duplicate Anim Assets and Retarget” action and select as target the above UE4 skeleton.

That is exactly what I have been doing - what options did you save the character with on Mixamo?

OK, I’ve got too many skeletons in my project, was using a skeleton for an animation set from a different folder. Once I used the correct one it is working now :slight_smile: Also, I may know what the problem with my characters not working is - a number of years ago there was an option to save the Mixamo characters with a UE4 fbx format - of course that is what I used - perhaps your plugin is thinking that they are using the UE4 skeleton because of Mixamos renaming of the bones?

You are right: the old Mixamo “UE4 FBX format” uses the UE4 mannequin skeleton so our plugin has “nothing” to do. Our plugin works only with the “standard Mixamo skeleton” (the one with the bones named Hips, Spine, Spine1, Spine2, etc). I hope this information could help other too!

Hi. First of all - bought Your pack. Happy with it. Saves me so much effort and nerves on using Maya for editing and adding the bones exporting animations and all that stuff.
The retarget pose to target skeleton is perfect. Even the bone retarget type changes to animation / animation scale/ skeleton properly.

However I need suport with root motion. The root bone is added to the skeleton, however all the animations from mixamo have the root bone not move with the character at all. instead its always stationary so making the animation root motion or not - makes no difference. I’m testing with sword and shield pack. What I am doing wrong? could you get me step by step in process of getting root motion animations? Should I tick “in place” on mixamo website. Or maybe I should do something else while importing into UE4? Please help.

Very happy that it’s useful! :slight_smile:

Nothing wrong, simply (and unfortunately) Mixamo animations don’t encode proper root motion information so they can’t be used with “UE4 root motion system”. By default the character motion is encoded in the Hips bone, unfortunately added to the local Hips motion, making it unusable. We also tested the “in place” Mixamo animations (you can export them from Mixamo flagging the “in place” option when available), but also this is not compatible with “UE4 root motion system” (it zeroes the motion - so any useful information is stripped out).

What you can do with our plugin, is to apply an existing UE4 root motion animation to a Mixamo character - this will work as expected thanks to the addition of the root bone.

workaround With another user @Konflict - thanks!) we tested a partial solution - but it must be tuned for each single animation and it could produces low-quality results (model could “slides” following the local hips/pelvis motion - this because it’s impossible to separate the local Hips motion from the character motion): use an animation blueprint that copies the pelvis/Hips translation to the root bone as needed, then “zeroes” the moved pelvis/hip transforms. In attachment you can see some screenshots of this method (credits to @Konflict).

Using root motiojn can be easily replicated… this solution however… well… Won’t.
When mixamo exported ue4 skeletons it had root motion on them :confused: and it worked :confused: Miss the change to download few hundret of those animations. :frowning:

Well at least now I can use perfectly all the in place animations. :slight_smile:

I know :frowning: Surely they have the proper informations (Hips translation and “root” translation as separate vectors) but they are not exporting them in an usable way…

Thanks :slight_smile:

@AngeIV this test was only intented to present a possible way to simply just copy the pelvis motions on the x and y axes to the root bone, and to align the IK bones which can help in certain procedural behavior (eg foot, hand IK). I was hoping that the retargeting can be extended as such to allow these copied bone transforms to be actually baked on the animation sequence thus allowing the mixamo animations to use the root and ik bones a fairly good way.

I’m not sure if that is actually possible to do in ue4, but you can perhaps bring the exported mixamo animations straight into maya and bake them on the ue4 mannequin with a good receipe (scripting?) thus allowing these bones to inherit the motions you are willing to see. Upon importing the baked animation sequences into ue4 you should be able to use the retargeted mixamo character, or any skeleton that have the root and ik bones available.

I know how to bake root motion in Maya for mixamo animations. However my trial ended and I cant afford to do that anymore :stuck_out_tongue_winking_eye:

I have made a tutorial on how to do this with Blender here: v=AYlonUyPong&t=688s

Hi can anyone tell me what settings I should be using here for exporting and importing?

548fe42b6767ac89e72dfb334d44b36bdeac43dd.jpeg

39d6f4a9bfc273b344357b185770612e84481779.jpeg

85e905dbaff289e77d0624dbc2a2c770e58ba7ea.jpeg

6600ec4f6280e32bc6f106c874dcbcff4940dfa8.jpeg

When I import the model into UE4 it ends up looking weird like this.

645fdd32e763e6f7074b40c16901aaec15e991be.jpeg

It’s a “known problem” with Mixamo: its materials are imported as translucents also if they are not. Usually forcing the materials that are not using transparencies to “opaque” should fix the issue.

Here a more articulated comment found recently on Facebook (Redirecting...):

Snip, Sorry, fixed it.

Edit:
Actually, another issue just came up. Any idea what could be causing the models head to rotate into its chest as the base skeleton?

https://dl.dropboxusercontent.com/u/12913216/Screenshots/Games/Mine/Shrd/headless.PNG

Thanks, again…

Just a quick post here for other people who would like to use this fantastic quick fix and remove root motion like I did. Below is the source code to a Python script for Blender to add the root bone to the FBX from Mixamo and remove the X/Z motion from the Hips bone. This will remove the root motion and make it easier for coders to work with especially over networked apps. This is unsupported as work 12+hrs a day and try to do this stuff at night =)

Usage: blender.exe --background --python “fixMixamo.py” – “C:\Animations\standing_aim_overdraw.fbx” (Obviously change out the folder/file)

Notes:
This will not remove the Cube in the scene so I suggest you remove all the items in the scene and save it as your Blender start up
This script will export the FBX file based on your settings so make sure to save your Operator Presets in the FBX Export to Forward: -Z Forward and Up: Y Up.
Finally the export will place the file in a path \Fixed inside the path the original FBX file was in EG: “C:\Animations\standing_aim_overdraw.fbx” ends up in “C:\Animations\Fixed\standing_aim_overdraw.fbx” –> Make sure to create the \Fixed folder, I was too lazy to do that in the script!



import sys
import os
import bpy

argv = sys.argv
argv = argv[argv.index("--") + 1:]  # get all args after "--"

bpy.ops.import_scene.fbx(filepath = argv[0])

#Select Armature
bpy.ops.object.select_all(action='DESELECT')
bpy.context.scene.objects.active = bpy.data.objects"Armature"]
bpy.data.objects"Armature"].select = True

#Armature -> Mocap tools -> Fix BVH Axis Orientation
bpy.ops.mocap.rotate_fix()

#Set X rotation to 0
import mathutils
eul = mathutils.Euler((0,0,0), "XYZ")
bpy.data.objects"Armature"].rotation_euler = eul

#Edit Mode 				
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.armature.select_all()

#Add Bone at 0, 0, 0
bpy.context.scene.cursor_location = (0.0, 0.0, 0.0)
arm = bpy.data.armatures"Armature"]
#Rename bone = root
bone = arm.edit_bones.new("root")
bone.head = (0,0,0)
bone.tail = (0,0,1)
#Select Hips + Set Parent
arm.edit_bones"Hips"].parent = arm.edit_bones"root"]
bpy.ops.object.mode_set(mode='OBJECT')


#Pose Mode
bpy.ops.object.mode_set(mode='POSE')
#Set root.keyframe(0) to 0,0,0
bpy.data.objects"Armature"].data.bones.active = bpy.data.objects"Armature"].pose.bones'root'].bone
bpy.context.active_pose_bone.keyframe_insert(data_path="location", frame=0)

#Set the active pose bone to Hips
bpy.data.objects"Armature"].data.bones.active = bpy.data.objects"Armature"].pose.bones'Hips'].bone
bone = bpy.context.active_pose_bone
name = bone.name
typ = "location"
maxLength = 0
#Get the fcurve for Hips.location
fcurves = [fc for fc in bpy.data.actions[0].fcurves if fc.data_path.startswith('pose.bones"%s"].%s' % (name, typ))]
#Set the maxLength to the last frame with data in it
for fc in fcurves: 
	for kfp in fc.keyframe_points: 
		if kfp.co[0] > maxLength: maxLength = kfp.co[0]

#Get the frames from the fcurve
for fc in fcurves: frames = [kfp.co[0] for kfp in fc.keyframe_points if kfp.co[0] >= 0 and kfp.co[0] <= maxLength]

#Remove all keyframes of Hips.location.x
for f in frames: success = bone.keyframe_delete(data_path=typ, index=0, frame=f)

#Remove all keyframes of Hips.location.z
for f in frames: success = bone.keyframe_delete(data_path=typ, index=2, frame=f)

#Set the animation timers based on the imported FBX
bpy.context.scene.frame_set(0)
bpy.context.scene.frame_start = 0
bpy.context.scene.frame_end = maxLength
bpy.ops.object.mode_set(mode='OBJECT')

lastSlash = argv[0].rindex('\\')
newFile = argv[0][0:lastSlash] + '\\Fixed'+argv[0][lastSlash:len(argv[0])]
bpy.ops.export_scene.fbx(filepath=newFile)