Advanced HumanIK retargeting

 
 
 

If size discrepancies exist between your source character and your target character, you can adjust the Retarget Specific attributes to fine tune your retargeting result.

Set up the scene

  1. Open the scene file named Pepe.mb. You will not be saving the previous scene.

    This file can be found in the GettingStarted2014LessonData\HumanIK directory that you set as your Maya project.

    Two HumanIK defined characters appear in the Maya scene, the target character (Pepe), and the source character (WalkExample).

  2. Select Skeleton > HumanIK to open the Character Controls window.
  3. Ensure that Pepe is selected in the Character menu and WalkExample is selected in the Source menu.
  4. With the scene in side view, play back the animation.
    NoteYou may need to dolly and track the camera to view both characters in the scene.

    By default, the target character (Pepe) is acting in its own action space (where the character performs motion), which automatically compensates for the scale difference between the source and target characters. However, in this example, the retargeting does not take into account that Pepe's foot proportions are also different. Since his feet are longer than WalkExample's feet, the retargeting result is affected. For example, at frame 1 Pepe's right foot penetrates the ground and his stride is very short.

    Several Retarget Specific attributes can be adjusted to account for differences in scale and proportions between your source and target characters.

To use the Match Source property

  1. Set the Time Slider to frame 23.

    Both characters are repositioned mid-stride.

  2. In the Character Controls, Select > Edit > Definition > Edit Properties.

    The HIKproperties1 tab opens in the Attribute Editor.

    TipClick Copy Tab at the bottom of the Attribute Editor to float a copy of these attributes in a new window.

  3. Expand the Retarget Specific section.

    These attributes let you define special settings for your target character.

  4. Turn Match Source On.

    When turned on, this property makes the target character act in the source character's action space, enabling you to reach the IK Blend goals of the source.

    By default, the IK Blends (IK Blend T and IK Blend R) on Pepe's hips and feet are set to 1.00, which inidcates that these body parts are reaching toward WalkExample's body parts.

    As a result, the hips and feet reach to match the position of WalkExample.

    However, when Pepe's feet are placed in the same positions as WalkExample, his stride looks over-exaggerated and unrealistic.

  5. In the Character Controls, select the effector for Pepe's left hand and set the IK Blend T property to 1.00.
  6. Repeat the previous step for Pepe's right hand.

    Pepe's hands reach the source character's hand positions.

  7. Select Pepe's reference locator in the Character Controls.
  8. Select the Scale tool and increase the scale of Pepe's reference locator.

    After increasing the scale, Pepe is significantly larger and his hands closely match the position of WalkExample's hands. This illustrates that IK Blend goals of the source character are reached differently depending upon the scale of the target character.

    As an alternative to using the Scale Tool you can also select the Channel Box and set each of the Scale X, Scale Y, and Scale Z values to 2.5.

  9. In the Retarget Specific section of the HIKproperties1 tab ( > Edit > Definition > Edit Properties), turn Match Source Off because the result of this adjustment is undesired for this example.

    We can adjust other attributes to achieve a more realistic stride for Pepe.

  10. If you changed the scale of Pepe's reference, re-set using the following steps:
    • Select the reference locator in the Character Controls.
    • Open the Channel Box and set the Scale X, Scale Y, and Scale Z values to 1.

    Let's adjust other properties to achieve a more realistic stride for Pepe.

To achieve a realistic stride for Pepe

  1. In the HIKproperties1 tab, set Action Space Compensation to User.

    This attribute lets you set an exact value to determine how retargeting is scaled to compensate for different sizes in your source and target characters.

    NoteWhen Action Space Compensation has a value of 0.000, the target character (Pepe) is immobile and disappears from the scene.

  2. Enter 10.000 into the Action Space Compensation field.

    Maya applies this value as a percentage to the size of all movements carried out by the source character when determining positions for the target character. The higher the value, the longer the character's stride. The smaller the value, the smaller the stride.

  3. Playback the animation.

    Since the Action Space Compensation value is low, Pepe's stride is still very short.

  4. Change the Action Space Compensation value to 48.000.
  5. Playback the animation.

    Pepe's stride is significantly longer when we apply a User defined value instead of keeping the default Auto setting. We can see this improvement at frame 54:

    Setting only this attribute gives us a good retargeting result. Now that we've fixed the stride, we can look at other properties that can help us achieve a good retargeting result.

To adjust retargeting using other properties

  1. Set the Time Slider to frame 54.
  2. Set Ankle Height Comp mode to User.

    By default, Auto mode ensures the feet relate correctly to the floor. When set to Off, ankle height compensation is disabled. When set to User, you can adjust the distance between the model's feet and the floor manually by setting the Ankle Height Compensation value.

  3. Set the Ankle Height Compensation value to 5.000.

    This value adjusts the distance between the character's foot and the floor. This value is often adjusted when your character has special height requirements (for example, shoes with high heels or boots) or your character's feet are very large.

  4. Reset Ankle Height Comp Mode to Auto.

Other Retarget Specific attributes

The following attributes let you further refine your retargeting result.

Mirror Animation
When turned on, the target character mirrors the movements of the source character. The solver flips the position of each of the source character's nodes along the X-axis to determine the desired position of the corresponding node of the target character. In the following example Mirror Animation is on and Pepe mirrors the actions of WalkAnimation.
Feet Spacing Mode
By default, Auto mode adjusts the distance between your target character's left and right ankles. The solver adds its value to the spacing between the source character's left and right ankles in order to determine the spacing between the target character's left and right ankles. When set to Off, no adjustment occurs. When set to User, you can enter a specific Feet Spacing value to adjust the ankles. In the following example Feet Spacing is set to a value of 8.000.
Mass Center Comp Mode
When on, Mass Center Comp Mode smooths leg movements by preventing the character's hips from pulling down too quickly when the legs are moving, and by preventing heavy footfalls. The default Mass Center Compensation value is 80.000.
Hips Level Mode
This attribute calculates the hip height of your character. Adjusting the Hips Level value lets you control the level of the hips relative to its center of gravity.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License