MotionBuilder HumanIK Solver Plug-in

This plug-in uses the MotionBuilder Open Reality SDK to integrate HumanIK into a custom MotionBuilder character solver. You can use this custom solver within MotionBuilder to control your characters using features that are available within this version of HumanIK but not natively within your version of MotionBuilder, such as realistic knee solving, collar stiffness, and animation trajectory retargeting.

The solver built by this sample is analogous to the HumanIK solver that is included in the MotionBuilder release, but updated to use this release of the HumanIK libraries.

In order to compile and run this sample, you must have installed both a recent version of MotionBuilder and the Open Reality SDK.

Compiling the sample

  1. Create an environment variable called MOTION_BUILDER_LOCATION, and set its value to the installation directory of MotionBuilder on your machine.
  2. This sample is included in the solutions/<platform_and_toolset>/HIKSamples.sln solution. Open this solution in Visual Studio. The project you need to use depends on the version of MotionBuilder you have installed:

    • For MotionBuilder 2011, use the MoBuHIK2011 project.
    • For MotionBuilder 2012, use the MoBuHIK2012 project.
    • For MotionBuilder 2013, use the MoBuHIK2013 project.
    • MotionBuilder 2014 is not yet supported.

  3. After the compilation, the generated files should be copied automatically to the following sub-directory within your MotionBuilder installation directory:

    • On 32-bit Windows systems, bin/win32/plugins.
    • On 64-bit Windows systems, bin/x64/plugins.

    If they are not copied, copy them manually.

Using the sample

To use the MotionBuilder solver built by the sample:

  1. Start MotionBuilder, and open or create the character that you want to control using HumanIK.
  2. In the Navigator window, expand the Characters folder, and double-click the character for whom you added the new solver.
  3. On the Character Settings tab, find the "CharacterSolver" drop-down list, and select the entry for the new solver.
  4. To view and modify the properties for the solver, click the solver entry in the Navigator window, either under your character’s folder or under the Solvers folder, and open the Properties window.

    Most of the solver's controls directly expose character properties from the HumanIK HIKPropertySetState object. For details on these properties and their values, see the topics under Character Properties.

    The solver offers some additional controls:

    property

    description

    Weight

    Determines how much weight is given to the HumanIK solver relative to the native MotionBuilder solver—i.e. the blend between the poses resulting from the two solvers. A weight setting of 100 uses only the HumanIK solver; a weight setting of 0 uses only the native MotionBuilder solver.

    Save HIK Character

    Exports the HIKCharacter that represents the current character to a file.

    You can load this file into memory for use with HumanIK at runtime by calling the HIKLoadCharacter function.

    Save HIK State

    Exports the HIKCharacterState that represents the current pose of the character’s skeleton to a file.

    You can load this file into memory for use with HumanIK at runtime by calling the HIKLoadCharacterState function.

    Save HIK Effectors

    Exports the HIKEffectorSetState representing the current position, rotation and IK constraints of the character’s control rig to a file.

    You can load this file into memory for use with HumanIK at runtime by calling the HIKLoadEffectorState function.

    Save HIK Properties

    Exports the HIKPropertySetState representing the current setup of the character to a file.

    You can load this file into memory for use with HumanIK at runtime by calling the HIKLoadPropertySetState function.