Announcement

Collapse
No announcement yet.

Mixamo Animation Retargeting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by RichardB View Post
    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...
    Hi, we downloaded the Pearl character from Mixamo website, fixed the translucent materials, and we didn't experienced any problem with the retargeting:



    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.
    Last edited by UNAmedia; 05-25-2017, 08:33 PM.
    Mixamo Animation Retargeting - Stereo Panoramic Player

    Comment


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

      Comment


        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 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?

        Comment


          Originally posted by RichardB View Post
          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 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!
          Mixamo Animation Retargeting - Stereo Panoramic Player

          Comment


            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.
            Click image for larger version

Name:	Przechwytywanie.PNG
Views:	1
Size:	547.2 KB
ID:	1128662
            Last edited by AngeIV; 05-27-2017, 12:38 PM.

            Comment


              Originally posted by AngeIV View Post
              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.
              Very happy that it's useful!

              Originally posted by AngeIV View Post
              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.
              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 [MENTION=236686]Konflict[/MENTION] - 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 [MENTION=236686]Konflict[/MENTION]).

              Click image for larger version

Name:	MAR-InPlace-1.png
Views:	1
Size:	774.6 KB
ID:	1128656

              Click image for larger version

Name:	MAR-InPlace-2.jpg
Views:	1
Size:	297.0 KB
ID:	1128660

              Click image for larger version

Name:	MAR-InPlace-3.jpg
Views:	1
Size:	276.9 KB
ID:	1128661

              Click image for larger version

Name:	MAR-InPlace-4.png
Views:	1
Size:	298.8 KB
ID:	1128663
              Attached Files
              Last edited by UNAmedia; 05-27-2017, 12:51 PM.
              Mixamo Animation Retargeting - Stereo Panoramic Player

              Comment


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

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

                Comment


                  Originally posted by AngeIV View Post
                  Using root motiojn can be easily replicated.. this solution however... well... Won't.
                  When mixamo exported ue4 skeletons it had root motion on them :/ and it worked :/ Miss the change to download few hundret of those animations.
                  I know Surely they have the proper informations (Hips translation and "root" translation as separate vectors) but they are not exporting them in an usable way...


                  Originally posted by AngeIV View Post
                  Well at least now I can use perfectly all the in place animations.
                  Thanks
                  Mixamo Animation Retargeting - Stereo Panoramic Player

                  Comment


                    [MENTION=567051]AngeIV[/MENTION] 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.
                    * Sharp and responsive Temporal Anti-Aliasing tips and tricks
                    * Pitch-shift source effect (DSP) over the network (VOIP)
                    * My Portfolio and Developer Blog

                    Comment


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

                      Comment


                        Originally posted by AngeIV View Post
                        I know how to bake root motion in Maya for mixamo animations. However my trial ended and I cant afford to do that anymore ;P
                        I have made a tutorial on how to do this with Blender here: https://www.youtube.com/watch?v=AYlonUyPong&t=688s

                        Comment


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

                          Click image for larger version

Name:	rigsett.JPG
Views:	1
Size:	73.2 KB
ID:	1128925

                          Click image for larger version

Name:	qdl.JPG
Views:	1
Size:	52.3 KB
ID:	1128926

                          Click image for larger version

Name:	importswat.JPG
Views:	1
Size:	43.4 KB
ID:	1128927

                          Click image for larger version

Name:	nosmoothgroup.JPG
Views:	1
Size:	60.5 KB
ID:	1128928

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

                          Click image for larger version

Name:	weirdugly****.JPG
Views:	1
Size:	80.8 KB
ID:	1128929

                          Comment


                            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 (https://www.facebook.com/groups/ue4d...62924273905941):
                            This crops up often, especially with Fuse-exported models. It's a depth sorting issue caused by surfaces with translucent materials rendering on top of one another, the renderer unsure which to display first. The reason you're getting it specifically is because Fuse consolidates all the main body features into one diffuse texture, including the eye lashes which have alpha transparency. Consequently ALL of the body that uses the texture are included in the transparency pass and inherit the problem. How do you fix it? Either set your material blend mode to masked (a form of transparency that doesn't have the same issues but is only 1-bit: pixels are either completely solid or completely transparent. Plug your alpha into Opacity Mask instead of Opacity) or edit your model to use two materials, one for the lashes and one for everything else, with the lashes blend mode set to translucent and the other material set to opaque. If you opt for the masked option, note you can mitigate the lack of smooth transparency by passing your alpha channel through a node called Dither Temporal AA before plugging it into the opacity mask to feather it out a little using a dithering technique.
                            Last edited by UNAmedia; 05-31-2017, 08:03 PM.
                            Mixamo Animation Retargeting - Stereo Panoramic Player

                            Comment


                              *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?


                              Thanks, again..
                              Last edited by thelazylion; 06-01-2017, 01:02 AM.

                              Comment


                                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!

                                Code:
                                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)

                                Comment

                                Working...
                                X