This section describes the functions used to retarget animations.
Retargeting takes an animation pre-recorded for a character, and uses that same animation to drive the movements of a different target character that may have a very different skeleton, dimensions or characteristics. For retargeting, you need to have a source character, an HIKCharacterState that contains its current position (typically drawn from a pre-recorded animation) and a destination character. The retargeting solver creates a new pose for the destination character that mimics the source character's pose, and stores this pose in an HIKCharacterState that you provide. You retrieve this pose and apply it back to the destination character in your game.
You can also specify a variety of character properties for your destination character that control the operation of the retargeting solver. For example, you can provide Reach values that influence how closely the different parts of the destination character's body should match the positions of the source character's body. This step is done through a call to the IK solver after the retargeting process.
|
| Low-LoD Retargeting |
| This page details the functions used to perform a retargeting for a character with a low level of detail.
|
|
|
void | HIKSolveForCharacter (const HIKCharacter *pDstCharacter, HIKCharacterState *pCharacterState, const HIKCharacter *pSrcCharacter, const HIKCharacterState *pSrcCharacterState, HIKEffectorSetState *pEffectorSetState, const HIKPropertySetState *pDstPropertyState, const HIKPropertySetState *pSrcPropertyState) |
| Given source character pSrcCharacter with HIKCharacterState pSrcCharacterState , calculate HIKCharacterState pCharacterState for destination character pDstCharacter . More...
|
|
void | HIKSolveForCharacterRetarget (const HIKCharacter *pDstCharacter, HIKCharacterState *pDstCharacterState, const HIKCharacter *pSrcCharacter, const HIKCharacterState *pSrcCharacterState, const HIKPropertySetState *pDstPropertyState) |
| Simple rotation mapper between pSrcCharacter and pDstCharacter . More...
|
|
void | HIKSolveForCharacterPrepareEffectorSet (const HIKCharacter *pDstCharacter, HIKCharacterState *pDstCharacterState, const HIKCharacter *pSrcCharacter, const HIKCharacterState *pSrcCharacterState, HIKEffectorSetState *pEffectorSetState, const HIKPropertySetState *pDstPropertyState, const HIKPropertySetState *pSrcPropertyState) |
| Sync IK pEffectorSetState on source FK pSrcCharacterState and adjust IK relative to destination character pDstCharacter. More...
|
|
Given source character pSrcCharacter
with HIKCharacterState pSrcCharacterState
, calculate HIKCharacterState pCharacterState
for destination character pDstCharacter
.
This function calls the following functions in order.
- Parameters
-
Sync IK pEffectorSetState on source FK pSrcCharacterState and adjust IK relative to destination character pDstCharacter.
- Parameters
-
| pDstCharacter | Destination character. |
[out] | pDstCharacterState | HIKCharacterState for the destination character. This HIKCharacterState is used to store the final solution. |
| pSrcCharacter | Source character. |
| pSrcCharacterState | HIKCharacterState containing the current pose of the source character, which is to be adapted to the destination character. |
[out] | pEffectorSetState | HIKEffectorSetState set up by this function to control a pass through the IK solver to finalize the retargeting. |
| pDstPropertyState | HIKPropertySetState containing all character properties to be used by the solver for the destination character. |
| pSrcPropertyState | HIKPropertySetState for the source character. This state is only used if you have enabled the HIKSolvingStepContact solving step in your HIKEffectorSetState. If so, the property HIKFootBottomToAnkleId will be read from this HIKPropertySetState to define the height of the source character's ankles. This value is used to adapt the height of the poses generated for the destination character. |
Simple rotation mapper between pSrcCharacter
and pDstCharacter
.
- Parameters
-
| pDstCharacter | Destination character. |
[out] | pDstCharacterState | HIKCharacterState for the destination character. This HIKCharacterState is used to store the final solution. |
| pSrcCharacter | Source character. |
| pSrcCharacterState | HIKCharacterState containing the current pose of the source character, which is to be adapted to the destination character. |
| pDstPropertyState | HIKPropertySetState containing all character properties to be used by the solver for the destination character. |