3D Hand Tracking
To make it easier for you to mix-and-match our different examples, this template has been converted to an importable asset in the Asset Library with the name Default 3D Hands
, Frog 3D Hands
, Skeleton 3D Hands
.
The 3D Hand Tracking template applies a 3D hand model to your hand in virtual space. Let's see how this template works!
Guides
Here is what we'll go over in the template:
- 3D Hand Tracking Component - The component that enables your models to track with the hand
- The Hand 3D Model - The example hands provided with the template
- Swap Hand Model with Match Hierarchy - How to track your own models with the hand
- Hand Skeleton Controller - How to track models to different joints of the hand
3D Hand Tracking Component
The 3D Hand Tracking Component allows you to track hands in 3D space. The tracking data appends 2 rigged 3D hand models to match your left and right hand.
Enable the Two hands
option within any of your hand tracking assets to track more than one hand at a time. Enabling Two hands
for any hand tracking asset in your scene automatically enables it for all other hand tracking assets.
If you only need to track one hand, disable Two hands
tracking for device optimization. If Two hands
tracking is disabled, and your Lens detects more than one hand, it randomly picks one of them to track.
The Hand 3D Model
The 3D Hand Tracking Component provides two pairs of Hand 3D models as references and inspirations for tracking hands in 3D space. Try them by clicking on the checkboxes
besides the object in the Scene Hierarchy
panel.
You can see the rigging of custom models in green and riggings from tracking component in grey. Please check out the Object Tracking 3D page to learn more about joint display in scene!
Swap Hand Model with Match Hierarchy
You can bring in your own custom 3d models and track it to the hand. While working on your own hand model, make sure the rigging structure of each bone matches the examples we provided in the template exactly.
If the new hand model has the same rigging hierarchy as our default hand models, you can use the Match Hierarchy
button to automatically append your 3D hand model to the 3D hand tracking component.
If Match Hierarchy doesn’t work, manually drag the bones to their correlated Attachment Points
slot on the Object Tracking 3D
component. Otherwise, your model will not be tracked to the hand.
Make sure your hand model has its scale set to (1,1,1)
and has its raw scale set similar to the scale of the example models.
Hand Skeleton Controller
The Hand Skeleton Controller
can be found under the Skeleton 3D Hands
example.
This script appends custom joints and bones to the hand object instead of using a rigged 3D Hand model. Input one model for each joint, finger bone and palm bone and the script automatically applies them to hands.
There’s a Basic Bones set and Cartoony Bones set applied to different hands by default. See what they look like with your left and right hand!
The 3D Hand Tracking template is a great way to get started with using the 3D Hand Tracking component. Have fun creating with the 3D Hand Tracking template!
Previewing Your Lens
You’re now ready to preview your Lens! To preview your Lens in Snapchat, follow the Pairing to Snapchat guide.