EN RU

Proprietary AI products as well as product development and R&D services for non-standard and science intensive tasks.

Contact Us

Retargeting of a single and multiple animations in MotionBuilder

A step-by-step instruction.

Get in Touch

SEE MORE AND SUBSCRIBE:

Animation retargeting is the process of transferring animations intended for one character onto another. The skeleton structures and their proportions may differ. Retargeting allows you to use the same set of animations on different characters.

In this article we will retarget motion capture animations created by the Motion Capture Center of the ACCA (The Advanced Computing Center for the Arts and Design), the Ohio State University: http://accad.osu.edu/research/mocap/mocap_data.htm. From the presented on the page we use one of the following sets of animations in BVH format: Female 1, Male 1, Male 2.

The target character is Izzy from Reallusion. Character is available for download at Unity Asset Store https://www.assetstore.unity3d.com/en/#!/content/50690 .

We will use Autodesk MotionBuilder 2015 for retargeting and iClone 3DXchange5 for auxiliary purposes.

Our goal is to show all the stages of the retargeting process, including mocap import and animation export to BVH. We will also solve problems that will arise.

Steps

Notice! To adjust the T-pose of any of the skeletons, you must remove the [ ] Characterize option from both characters.

  1. When you import the animations in MotionBuilder (we work with Male2_*.bvh), you can see the following picture. You can correct this "skewness" problem by exporting the animations from iClone 3DXchange to BVH with the "Reset bone offset" flag.
  2. That's what we mean by "skewness" of Hips when importing Male2 animations into MotionBuilder:
    'skewness' of Hips
  3. After the import to iClone 3DXchange the model is fine:
    after the import to iClone 3DXchange the model is fine
  4. Drag-n-drop any of the Male2_*.bvh into iClone 3DXchange.
  5. Then drag-n-drop all the rest animations you need into the Motion Library:
    drag-n-drop all the rest animations you need into the Motion Library
  6. Press Add All to Perform.
    Add All to Perform
  7. Now we have all the animations in the Perform Editor section.
    Now we have all the animations in the Perform Editor
  8. Export them. File -> Export to Other 3D Format -> Export BVH...
  9. Set [x] Reset Bone Offset and press OK.
    Set [x] Reset Bone Offset and export the animations`
    Note: “File Name” is a prefix. Also, this field cannot be empty.
  10. Male2 animations are fixed:
    animations are fixed
  11. Now we can move on. Open Girl.fbx in MotionBuilder (you can download it at Unity Asset Store https://www.assetstore.unity3d.com/en/#!/content/50690).
  12. Click File -> Motion File Import…, choose any of the fixed *Male2_*.bvh, for example *Male2_A5_PickUpBox.bvh.
  13. Import Options:
    Import Options
    Note that we select Create (not Merge).
  14. The scene looks like this:
    the scene
    the scene, hierarchy
    Avatar — reference Girl;
    RL_G6_Hip — Girl root bone (Hips);
    BVH:reference — Male2 reference;
    BVH:Hips — Male2 root bone (Hips).
  15. Select Asset Browser Templates / Characters / Character.
    Asset Browser Templates / Characters / Character
  16. And drag-n-drop onto the Girl skeleton. The Characterize tooltip pops up. Click it.
    Characterize tooltip
    Alternatively, you can drag-n-drop onto the Hips bone in the Navigator / Scene
    Alternatively, you can drag-n-drop onto the Hips bone in the в Navigator / Scene
  17. The following message pops up:
    The following message pops up
    Press Ok.
  18. One more message:
    One more message
    Press Close.
  19. Rename the newly created character (Character)...
    Переименуем только что созданного персонажа
    ...to GirlChar.
    rename to GirlChar
  20. Double click on the GirlChar.
  21. Make sure that Character: GirlChar is selected in Character Controls and the Definition tab is opened.
    Make sure that Character: GirlChar is selected in Character Controls and the Definition tab is opened
  22. Now - the process of mapping the bones. LMB (click with the left mouse button) on the bone in the viewport:
    the process of mapping the bones
  23. RMB (right mouse button click) on the corresponding bone in Character Controls / Definition, Assign Selected Bone:
    Character Controls / Definition, Assign Selected Bone
  24. Hide the model:
    Hide the model
  25. A good sign is the correspondence the character bone names and the internal representation in MotionBuilder:
    correspondence of the names of the Girl's bones and the internal representation in MotionBuilder
  26. Do not forget about smaller bones, such as Shoulder (Clavicle):
    Do not forget about smaller bones, such as Shoulder (Clavicle):)
  27. The minimal set to map is all the bones from the "Base (required)" group.
    The minimal set to map is all the bones from the 'Base (required)' group
  28. Now set Characterize.
    Now set Characterize
  29. Select Biped:
    Select Biped
  30. Go to Male2. Drag Character onto Male2 skeleton:
    Drag Character onto Male2 skeleton
    Press Characterize.
  31. Select Biped:
    Select Biped
  32. Rename the newly created Character to MaleChar.
    Rename the newly created Character
  33. Male2 bone mapping is allright.
    bone mapping is allright
  34. The thing is its current pose will be considered a T-pose.
    The thing is his current pose will be considered a T-pose.
  35. Turn off [ ] Characterize from MaleChar.
  36. Select BVH:Hips, RMB -> Select Branches.
    BVH:Hips Select Branches
  37. RMB -> Zero -> Rotation.
    Zero -> Rotation
  38. Will get this:
    after Zero -> Rotation
  39. Now we need to turn this into a T-pose.
  40. Rotate the bones with the MaleChar [ ] Characterize switched off until we are happy with the T-pose.
  41. Turn on MaleChar [x] Characterize.
  42. Turn on GirlChar [x] Characterize.
  43. Open GirlChar Character Settings and select Input Type: Character, [x] Active; Input Source: MaleChar.
    GirlChar - select Input Type: Character, [x] Active; Input Source: MaleChar
  44. Play the animation. Girl skeleton must reproduce the Male2 animation.
    Play the animation
  45. To "bake" the retargeted animation, press Plot Character.
    press Plot Character
  46. Select Skeleton.
    Select Skeleton
  47. The default settings are fine.
    The default settings are fine
    A detailed description of these parameters:
    http://mocappys.com/retargeting-animation-motionbuilder/#Plot_Properties_Window_Explained
  48. Check that the plotting was successful.
    plotting was successful
    With these settings, the GirlChar character will keep the animation.
  49. Select the Hips bone of the Girl character.
    Select the Hips bone
  50. File -> Motion File Export…
    File -> Motion File Export
    Make sure that "Content: Selected Models and Children" is selected.
  51. The message pops up:
    The message pops up
    Press Yes (three times).
  52. See the "RL_G6_Hair 1" bone:
    RL_G6_Hair 1
  53. Rename this bone to "RL_G6_Hair_1".
  54. Select the Hips bone and press File -> Motion File Export.
  55. The operation should be successful.
  56. Open the exported BVH in iClone 3DXchange. Play the animation.
    Open the exported BVH in iClone 3DXchange
  57. It would seem that everything is fine.
  58. Let's check how MotionBuilder sees this BVH.
  59. Create an empty MotionBuilder project.
  60. File -> Motion File Import. Import the newly created BVH.
  61. Notice something wrong with the head pose.
    something wrong with the head pose
  62. The workaround is to export the BVH from iClone 3DXchange with the [x] Reset Bone Offset flag.
  63. Export.
    Export
  64. Rename the fixed BVH:
    Rename the fixed BVH
    Everything is fine.
  65. This is how we retargeted a single animation.
  66. Now let`s retarget multiple animations at once.
  67. Open our main scene with MaleChar and GirlChar.
  68. Select BVH:Hips.
  69. File -> Motion File Import.
    File -> Motion File Import
  70. When importing a large number of animations, the following error may occur:
    When importing a large number of animations, the following error may occur
  71. In this case, divide the original set into several parts and import them separately. We are fine with two batches, approximately 75 animations each.
  72. After you have finished importing all the necessary animations, select GirlChar and link it to the MaleChar:
    link GirlChar to the MaleChar
  73. Double click the takes to start the playback of the corresponding animations
    Double click the takes to start the playback of the corresponding animations
  74. Next we call Plot Character on the GirlChar.
    call Plot Character on the GirlChar
  75. Select Skeleton:
    Выбираем Skeleton
  76. Important checkbox to enable — [x] Plot All Takes.
    [x] Plot All Takes
  77. Check the retargeting quality by observing behaviour of the model. Check the retargeting quality by observing behaviour of the model
  78. Select the root bone (Hips) of the Girl character and File -> Motion File Export.
    Select the root bone (Hips) of the Girl character and File -> Motion File Export
  79. As you might have guessed, the BVH animations been produced must be re-exported with iClone 3DXchange and it`s [x] Reset Bone Offset flag on.
    the BVH animations been produced must be re-exported with iClone 3DXchange and it`s [x] Reset Bone Offset flag on
  80. Victory!
    Victory!
  81. Now import those BVH animations into the empty MotionBuilder scene to check that they are fine:
    import the BVH animations into the empty MotionBuilder scene to check that they are fine
  82. Check all the animations (double click on the takes).
    Check all the animations (double click on the takes)
  83. Now we can use these BVH animations to train the deep neural network.

References

  1. http://mocappys.com/retargeting-animation-motionbuilder/#for_retargeting_Multiple_File (this section in particular and the entire document as a whole)
  2. http://www.3dbuzz.com/forum/threads/186992-Multiple-bvh-s-in-MotionBuilder



Got questions? Contact us:


Contact Us
info@ocutri.com
Or just type here and click 'Send':