Solving at a Lower Level of Detail

The HumanIK inverse kinematics and retargeting solvers allow you precise, finely grained control over your characters’ movements, with configurable settings that can further increase the realism of your animations. However, that level of detail (LoD) comes at a certain performance cost that is not always necessary.

For example, if a certain area or segment of your game contains a very large number of characters, it may be preferable to accept small inaccuracies in the realism of each character’s movements in order to reduce the resources consumed in each calculation. Similarly, if your characters are far away from the player or viewer, small inaccuracies will likely not be visible; in these scenarios the full level of detail offered by HumanIK may not be necessary.

HumanIK offers low-LoD implementations of both the inverse kinematics and retargeting solvers, offering faster performance and reduced CPU requirements.

Inverse kinematics

To use the low-LoD inverse kinematics solver, call the HIKSolveForEffectorSetLowLOD() function instead of the HIKSolveForEffectorSet() function introduced in Inverse Kinematics Solving. The HIKSolveForEffectorSetLowLOD() function requires exactly the same arguments as the HIKSolveForEffectorSet() function.

This low-LoD solver has the following limitations:

Retargeting

To use the low-LoD retargeting solver, call the HIKSolveForCharacterLowLOD() function instead of the HIKSolveForCharacter() function introduced in Retargeting Solving. The HIKSolveForCharacterLowLOD() function requires exactly the same arguments as the HIKSolveForCharacter() function.

The actual retargeting operation performed by the low-LoD retargeting solver is identical to that performed by the normal retargeting solver. However, the low-LoD retargeting solver calls the low-LoD inverse kinematics solver to generate the final position for the target character, increasing the speed of the IK pass.

Maximizing performance

With equivalent settings, the low-LoD IK and retargeting solvers should run up to 10 times faster than their regular counterparts. However, some simple changes to the parameters of the solve, detailed below, can improve the CPU performance even further.

Note that some of the approaches listed below may introduce additional compromises between the CPU time taken for the computations and the accuracy of the final results.

Limb solving

Approximately 30% of the CPU time used by the low-LoD solvers is spent solving limbs. You can reduce this by de-activating the solving for some or all of the character's limbs. You can de-activate solving for each limb either partially or totally.

  • To de-activate solving totally for a limb, exclude the solving step for that limb from the solving steps set up for your HIKEffectorSetState. For details, see Solving Selected Body Parts.
  • To de-activate solving partially for a limb, you can set either the Reach Translation or Reach Rotation value of the limb to 0.0f in your Effector Set State, using the HIKSetTranslationActive() or HIKSetRotationActive() function. Setting the Reach Rotation value to 0.0f is usually good practice when using the low-LoD solvers.

Spine solving

Approximately 13% of the CPU time used by the low-LoD solvers is spent solving the spine. In many cases, this has very little effect on the final pose. You may be able to safely de-activate spine solving without significantly compromising the final result.

To de-activate spine solving, exclude its solving step from the solving steps set up for your HIKEffectorSetState. For details, see Solving Selected Body Parts.

Pull accuracy

Approximately 20% of the CPU time used by the low-LoD solvers is spent in the simplified pull algorithm. You may be able to reduce this time significantly by lowering the value of the HIKPullIterationCount character property. The lower you set this property, the fewer iterations will be performed. This leads to lower CPU consumption, but may result in a less accurate of the final result.

For details, see Retargeting-Specific Properties.