Gesture Recorder
Record a pose, train a classifier on it, and use it in a scene — without writing a classifier, choosing a model, or knowing what a random forest is. The whole round trip is a few minutes of work in one editor window.
Open it at Tools ▸ Calium ▸ Vision Kit ▸ Gesture Recorder.
The window has five numbered sections and they are meant to be worked top to bottom:
| Section | What happens there | |
|---|---|---|
| 1 | What to record | Name the gesture and choose where its assets go. |
| 2 | Capture (Play mode) | Enter Play mode, hold the pose, record bursts of samples. |
| 3 | Train | Turn the samples into a trained GestureDefinition. |
| 4 | Use it | Add the gesture to a GestureSet you can assign on a config. |
| 5 | Quality | Hold the pose live and watch what the classifier scores it. |
Capture happens in Play mode. That is a deliberate design decision, not a limitation: a
camera opened by an editor window that is not playing is a source of bugs with no
compensating benefit. Section 2's Enter Play mode button opens the bundled recording
scene and enters Play for you — unless the scene you already have open contains a
Calium Hand Tracking prefab, in which case the recorder attaches to that scene's manager
and leaves your scene alone.

Step 1 — Name it and choose where it lives
Type a Gesture name. It is the asset's name and the id reported in events, so
MyGame.Salute behaves exactly like Calium.Pinch does.
The Output folder defaults to Assets/Calium Gestures. Keep your gestures in your own
project folder: if you record into a folder inside Assets/Calium/VisionKit, updating the
package can overwrite them, and the window warns you when you try.
Press Create / open the gesture and its samples asset. That creates <Name>.asset, a
GestureDefinition. It deliberately does not create a samples asset yet — the
<Name> Samples.asset (a GestureTrainingData) comes into being when your first burst is
saved, so a name you typed and thought better of leaves nothing behind.
About the background class
Every gesture is trained against counter-examples: hands doing something that is not the
gesture. The package ships that set — Calium Background.asset, 600 samples of ordinary
hand movement — so you do not have to record one before your first gesture.
You can add to it. Tick Record the background / "none" class in section 1, press Create / open the background samples asset, and record a few bursts of reaching, resting, half-formed poses and hands passing the camera in your room, in your lighting. That is the first thing to try if your gesture fires when nobody meant it to.
One rule with a reason behind it: do not record a nameable pose into the background set. Anything in there is something no gesture will ever fire on — including a gesture one of your users might want to record later. Keep the background set to hands that are not doing anything in particular.
Step 2 — Record
Press Enter Play mode, then hold your pose and press Record N samples (or the Space shortcut, which is rebindable under Edit ▸ Shortcuts as Calium Vision Kit/Gesture Recorder/Record a burst).
The controls, with their shipped defaults:
| Control | Default | Notes |
|---|---|---|
| Samples per burst | 30 | One burst is one held pose. |
| Countdown (s) | 3 | Starts when a hand first appears, not when you press the button — so you can press it and then get into position. |
| Gap between samples (s) | 0 | 0 records every tracking result. Raise it to spread a burst over a longer hold. |
| Hand | Either hand | Or pin to tracking slot 0 or 1. |
| Save each burst as soon as it finishes | on | Turn it off to review a burst before committing it; then Save or Discard in section 2. |
Things the window does on purpose, which are easy to mistake for bugs:
- Frames with no hand contribute nothing. Drop your hand out of frame mid-burst and the counter pauses; the burst still finishes at its target rather than short.
- Section 1 is greyed out while a burst is running or waiting to be saved. A burst lands in the asset it was started against, always.
- Cancel discards the current burst only. Everything already saved stays.
- Closing the window mid-burst costs that burst and nothing before it.
The preview, the distance readout, and the mirror
Section 2 draws a live skeleton preview with a Distance readout under it, because the single most common cause of a gesture that will not train is a hand recorded too far from the camera.
- The preview is a mirror by default — move your hand to your left and the skeleton moves left. Turning Mirror off shows the camera's own view. The toggle changes nothing but the picture: the distance reading and the recorded samples are identical either way.
- The distance readout is an estimate from the apparent size of your palm, using a generic hand size and a generic field of view. Uncalibrated it is usually within a cell of the truth. It deliberately measures the palm, so it does not jump when you close your hand into a fist.
- To make it exact: measure a real distance (a tape mark at 50 cm is enough), hold your hand there, type the number into Measured distance (cm) and press Calibrate to the hand in view. The calibration survives leaving and re-entering Play mode.

How much to record
For a gesture only you will use, a few bursts is often enough. For one that has to work for other people, in other rooms, cover the axes that actually make a classifier fail:
- Both hands. Left and right are genuinely different to the model.
- Three distances. Near, comfortable, and as far back as you expect the gesture to work.
- Two or three lighting conditions.
For scale: the seven built-in gestures carry 360 to 760 samples each, recorded across both hands, three distances and three lighting blocks, against 600 background samples. That is the work behind a gesture measured to generalise. A personal gesture recorded at one distance in one room works well at that distance in that room — widening it is a matter of recording the axes above, which is minutes, not a retraining pipeline.
Step 3 — Train
Assign Background samples (the shipped Calium Background.asset unless you made your
own) and press Train. It takes seconds.
| Control | Default | Notes |
|---|---|---|
| Background samples | — | Required. Training without counter-examples fails loudly rather than producing a gesture that fires on everything. |
| Also train against the other gestures in the set below | on | Uses the other gestures in your set as additional counter-examples. Leave it on if your gesture resembles one of them. |
| Trees | 50 | |
| Max depth | 12 | |
| Seed | 20260806 | The same seed and the same samples always produce the same forest. Retraining is reproducible by design. |
The report shows the split, the forest size, the validation matrix, and the counter-example sources it found — by asset and count, so a gesture that trained against less than you thought is visible rather than silent.
Two failure behaviours worth knowing, because both are deliberate:
- A failed train never leaves a working gesture broken. Retrain with the background field cleared and training fails; the gesture you trained yesterday still works exactly as it did.
- A gesture that fails to train is not left looking trained. Its tree count stays 0 in the inspector.
Recording more samples later and pressing Train again appends and retrains — you never have to start over.

Step 4 — Use it
- In section 4, press New set… (or assign an existing
GestureSet), then Add the gesture to this set. - Assign that set on a
HandTrackingConfig. The bundled default config is read-only, so duplicate it (Ctrl+D), set Gestures to your set on the copy, and assign the copy to theHandTrackingManagerin your scene. - Consume it exactly like a built-in: a
GestureEventListenerin the inspector, orOnGestureStarted/OnGestureEndedin code.
using Calium.Vision.Hands;
using UnityEngine;
public sealed class SaluteWatcher : MonoBehaviour
{
private static readonly GestureId Salute = new GestureId("MyGame.Salute");
[SerializeField] private HandTrackingManager _manager;
private void OnEnable() => _manager.OnGestureStarted += HandleGestureStarted;
private void OnDisable() => _manager.OnGestureStarted -= HandleGestureStarted;
private void HandleGestureStarted(GestureEvent gestureEvent)
{
if (gestureEvent.Gesture == Salute)
Debug.Log($"Salute on the {gestureEvent.Handedness} hand.");
}
}
If you added your gesture to a set that does not contain the seven built-ins, the
built-ins stop firing — a config evaluates exactly one set. Add your gesture to a copy of the
Calium Built-in Gestures set if you want both.
Step 5 — Check it, live
Stay in Play mode and hold the pose. Section 5 shows the live score against the gesture's enter threshold, the peak it reached, and the fraction of results it held above the bar.
It also names any other gesture that fires at the same time. That warning is the useful
part: a new gesture that scores 0.9 on itself and 0.6 on Calium.ThumbsUp will feel
unreliable in a scene, and no amount of extra recording of the new gesture fixes it — the
answer is either a more distinct pose or a threshold change.

Tuning the thresholds
Every GestureDefinition carries three numbers you can edit in the inspector:
| Field | Default | What it does |
|---|---|---|
| Enter Threshold | 0.7 | Score needed to start the gesture. |
| Exit Threshold | 0.5 | Score below which it ends. Must be lower than Enter — that gap is the hysteresis that stops flicker. |
| Debounce Frames | 3 | Consecutive qualifying tracking results before Started fires. |
Training proposes values from the score distribution; a live hand is a better judge than a percentile. The seven built-ins ship with the thresholds below, and three of them were moved by hand after a live session — in every case to a stricter value than the arithmetic proposed:
| Gesture | Enter | Exit | Source |
|---|---|---|---|
Calium.OpenPalm |
0.70 | 0.55 | live-tuned |
Calium.Fist |
0.65 | 0.40 | live-tuned |
Calium.Pinch |
0.80 | 0.20 | derived |
Calium.Point |
0.80 | 0.20 | derived |
Calium.ThumbsUp |
0.80 | 0.25 | live-tuned |
Calium.ThumbsDown |
0.55 | 0.20 | derived |
Calium.Victory |
0.70 | 0.20 | derived |
Debounce is 3 for all seven. Raise it if a gesture fires on a hand that was merely passing through the pose; lower it if the gesture feels late.
What gets written where
| Asset | Type | Created when |
|---|---|---|
<Output folder>/<Name>.asset |
GestureDefinition |
You press Create / open. Runtime-loadable, this is what ships in your build. |
<Output folder>/<Name> Samples.asset |
GestureTrainingData |
Your first burst is saved. Editor-only — never loaded at runtime — and the reason you can add samples and retrain later without re-recording. |
| Your gesture set | GestureSet |
You press New set…. |
Nothing else in your project is touched.