Configuration

Introduction

Input module not only transfers hand data to master hand, but it also can apply filters and post-processing to this hand data by predicting movement when tracking is lost, smoothing tracking noise and clamping or limiting the maximum linear or rotational speed of wrist and fingers. These filters can be applied only if InputModel.inputDataProvider.confidence drops under a certain threshold.

Variables

Control

  • Update Wrist: Should the wrist be moved?

  • Update Forearm: If appliable, should the forearm be moved?

  • Ignore Tracking Loss: Should Input module react to tracking loss?

Tracking loss

  • Hand Tracking Lost Under Confidence: Hand tracking will be considered lost when InputModel.inputDataProvider.confidence goes bellow this threshold.

  • Fingers Tracking Lost Under Confidence: Fingers tracking will be considered lost when InputModel.inputDataProvider.confidence goes bellow this threshold.

  • Hide Master When Lost: Shoud master visuals be disabled when hand tracking is lost?

  • Hide Slave When Lost: Shoud slave visuals and puppet physics be disabled when hand tracking is lost?

Master or slave visuals refers to the SkinnedMeshRenderer of a hand, referenced in the master os slave representation of the wrist:InputModel.hand.root.reprs[representation].skinnedMeshRenderer.

HandView offers two functions to toggle hand visuals and physics:

  • HandView.SetHandVisuals(bool enabled, string representationKey);

  • HandView.SetHandPhysics(bool enabled);

Predictive tracking

When tracking is lost, InputController can keep wrist moving, decelerating in a linear trajectory using last recorded speed and trayectory as starting state.

  • Use Predictive Tracking When Lost: Should tracking be predicted on tracking loss?

  • Max Prediction Time: How long (in seconds) should take wrist to stop from initial speed?

  • Max Prediction Displacement: How far (in Unity units) should wrist move as maximum?

Noise reduction

Smoothed bone tracking is calculated with moving averages (weighted or not) from a window or historic of bone data of a certain size.

  • Record Tracking: Should the bone data historic be updated?

  • Save Hand Historic Over Conficence: Bone data historic (for noise smoothing) will be updated when confidence is greater than this threshold.

  • Moving Average: What moving average algorithm should be used to calculate the smoothed bone data?

  • Window Size: How big is the window size? How main entries shoudl the bone data historic have? The bigger the window size, the more smoothed the movements will be.

  • Apply To Wrist Position: Should wrist position be smoothed?

  • Apply To Wrist Rotation: Should wrist rotation be smoothed?

  • Apply To Fingers Position: Should fingers position be smoothed?

  • Apply To Fingers Rotation: Should fingers rotation be smoothed?

InputController don't apply finger bone positions so smoothing fingers positions won't have any effect but their values would be smoothed anyways, which might be useful for other components or custom modules. Keep InputConfiguration.applyToFingersPosition disabled if this is not your case.

Hand clamping

  • Use Hand Clamping: Should wrist's linear and angular speed be limited to a maximum value?

  • Gradual Hand Clamping: Should wrist clamping increase as confidence decrease?

  • Start Decreasing Hand Clamping Under Confidence: Confidence threshold from which clamping will be applied to wrist.

Finger clamping

  • Use Finger Clamping: Should finger's angular speed be limited to a maximum value?

  • Gradual Finger Clamping: Should finger clamping increase as confidence decrease?

  • Start Decreasing Finger Clamping Under Confidence: Confidence threshold from which clamping will be applied to fingers.

Samples

HPTK package contains 3 samples of InputConfiguration in Packages/HPTK/Samples/Configurations/Input:

  • Confident: It uses noise smoothing and hand clamping. Fingers won't move under mid confidence but hand will keep moving under low confidence. Recommended for devices with high tracking noise and erratic movements under low confidence.

  • Predictive: Similar to Confident but using tracking prediction.

  • Raw: It transfers hand data to master hand without post-processing.

  • Unsmoothed: It is the same configuration as Confident but without noise smoothing. Recommended for Quest hand tracking.

Last updated