Customize 3D Hand Model¶
The plugin provides prefabs and 3d models to display detected hands as 3d models. It also supports to use your own model for display, if your model matches the assumptions and requirements below.
Note
You can compare your custom model with the model shipped in the plugin to make sure it’s setup correctly.
Requirements of Custom Model¶
The custom 3d model must be imported into Unity first to check the following requirements:
- Custom model must be rigged and contains SkinnedMeshRender component if you drag the model into the scene.
- Custom model must contain all the 21 keypoints defined in the SDK as joints. See Skeleton Mode for keypoints definition.
- This includes 1 palm joint and 4 joints per finger. All these joints must be defined and rigged, since our script will modify rotation of these joints.
- If more joints are defined, these extra joints will remain their origin rotation and never changed by script.
- The local axis of the finger joints must be same for all 21 keypoints within the model.
- For all finger joints, there should be an axis that change finger open/close status.
- For finger root joints of each finger, there should be another axis that swipe the whole finger left/right.
- All the fingers must using same local axis, including thumb finger, even though thumb finger is facing different direction globally.
Use Custom Model¶
To use custom 3d model in Hand Tracking SDK, follow the steps below:
Drag the model file into your scene.
Attach
ModelRenderer
script to the root object of the model and clickAuto detect properties
in the Unity inspector.![]()
Make sure auto detected properites are correct. Fill the values manually if detection failed.
- Check
Is Left
for left hand and uncheck for right hand. If auto detection failed, please correct it and re-run auto detection.- Check
Initial Rotation
of the model, so that palm is facing +z axis globally, fingers (except thumb) are facing +y axis globally.- Check if
Hand
is the GameObject with SkinnedMeshRenderer.- Check
Nodes
contains 21 keypoints in the same order as defined in Skeleton Mode.Setup other properties
- Check
Show confidence as alpha
if your shader supports transparency.- Select collider type if necessary.