Custom rigged hands

How to set up custom rigged hands

HPTK supports other rigged hands apart from the included ones (from Oculus Package). However, custom rigged hand models have to fulfill some requirements in order to be compatible with HPTK and its modules. HPTK package includes a component called AutomaticHandSetup to generate valid HPTK proxy hands from arbitrary hand armatures that fits the following certain requirements that are specified in the following section.

Requirements

  • Wrist and bone local rotations match world axis when these local rotations are set to 0 (Quaternion.identity).

  • Each finger is required to have a leaf bone that will be considered as finger tip.

  • At least two fingers are required (index and thumb). This makes grabbing possible.

  • For Automatic Hand Setup script to work properly, hand armature is required to follow a defined structure (see Armature section).

The following pictures shows expected axis for wrist and bones. Wrists are not rotated or scaled.

Included hand armature (Oculus)

Simplified hand armature

Recommendations for hand tracking

If Input module will be used and its InputDataProvider will get hand data from hand tracking, the following points are highly recomendable:

  • If InputModel's InputDataProvider is getting data from hand tracking, real wrist might not match model's wrist and this can break self-perception and, therefore, breaking immersion. Therefore, set Generate Master Offset to true on AutomaticHandSetup*. This will generate a new object that is children of master wrist and parent of master fingers. HandPhysicsController will make slave wrist to match master offset (if existing).

  • Scale hands to match the size of your users's hands before generating. Make sure that local scale equals Vector3.one for original armature bones.

Armature

The following pictures shows the expected hierarchy for hand armatures to be parsed by Automatic Hand Setup component. Armatures with less fingers (at least index and thumb) and less phalanges (at least 1 bone and its fingerTip) are also valid for Automatic Hand Setup.

Input module will move wrist. HandPhysics module will make slave's wrist to reach master's wrist (or master's wrist offset if existing).

Automatic Hand Setup

HPTK package contains a script to set up all needed from a basic hand armature. This script will create different hand representations with their points, triggers, colliders, ConfigurableJoints, rays and data models (ProxyHandModel, HandModels, FingerModels and BoneModels). This script is a Unity component that you can attach anywhere in the scene. Following points describe some of its parameters:

  • Finger radius: Radius of the capsule colliders that will be generated for each bone. These colliders can be edited after generation if fine tuning is necessary.

  • Index and Thumb root bones: First transforms of thumb and index fingers. They are required to be children of wrist (or wrist offset if it's used).

  • ProxyHandModule: HPTK module prefab that will be instantiated in the generated hand. Included in the HPTK package.

  • Default palm mesh: If there is no specific mesh for palms available, using a Cylinder primitive is highly recommended.

  • Skin physic material: Physical material that will be applied to generated colliders.

  • Generate armature anchors: Original armature will be modified to include anchors which are empty gameobjects placed on each armature bone but preserving valid home rotations (world axis). These anchors can be set only as children of pre-existing bones or as parent. This operation will throw exceptions if applied on armature prefabs. In that case, unpack prefab first.

  • Use original armature as: Use original armature bones as master or slave bones. If don't expect to use hand physics, use them as master. If you expect to use hand physics, use them as slave. If you don't want to modify the original armature, set this option to None.

  • Children of wrist (or wrist offset if it's used) with child count >0 will be considered as fingers and the children of these fingers can only have one single child recursively (clean branch).

  • Generated HandModels will only contain references to FingerModels for Index and Thumb. Other detected fingers will have their generated FingerModels but the references to these FingerModels have to be added in each HandModel manually.

  • Master, slave and ghost hands will be generated. If slave or ghost hand representations are not needed, they can be deleted.

HandModels, FingerModels and BoneModels are also generated as children of ProxyHandModel. If a hand representation is removed, its model has to be removed too.

Last updated