Forte Data Gloves

Working with the Forte Data Glove Unity SDK

On this page

    Glove Controller Script

    At the heart of the SDK is the Glove Controller script. This script can be dragged onto any hand model in order to control that hand’s rotation and finger positions.

    At runtime it instantiates the two plugin modules that handle bi-directional communication with the glove over USB and Bluetooth.

    If you are using our hand model then you can simply drag the hand prefab into your scene for instant glove integration. Or if you have a different hand model you would like to use, you can make the assignments manually.

    Integrating the Forte Data Glove with a New Hand Model

    In order to integrate the Data Glove into an existing project, follow these steps.

    1. GloveController script requires that each moving finger bone be assigned.

    To make an assignment, with the GloveController script instance selected, drag a bone from the hand’s armature in the hierarchy window into the corresponding finger slot of script. Make sure to not select the bone you are dragging or else you will need to reselect the script component again. The finger assignments are 5 element arrays ordered by finger number where the thumb is 0, the index finger is 1, the middle finger is 2, the ring finger is 3 and the pinky is 4. In the Hand Controller script, the assignments are grouped by joint starting with the knuckle joints, that control the first finger bones, followed by the middle joints, that control the second finger bone, and last there are the tip joints which control the third finger bone. Please note that the thumb is considered to be a two bone finger and so does not have a tip joint assignment.

    2. Assign the hand rotation points. This is the point that the whole hand will rotate upon. The first is a wrist rotation point, the other is an elbow rotation point. In cases where the hand should be able to reach both sides of the screen, the elbow rotation point should be used because the hand will have a larger range.

    To make an assignment, with the GloveController script instance selected, drag a bone from the hand’s armature in the hierarchy window into the corresponding finger slot of script. Make sure to not select the bone you are dragging or else you will need to reselect the script component again. The finger assignments are 5 element arrays ordered by finger number where the thumb is 0, the index finger is 1, the middle finger is 2, the ring finger is 3 and the pinky is 4. In the Hand Controller script, the assignments are grouped by joint starting with the knuckle joints, that control the first finger bones, followed by the middle joints, that control the second finger bone, and last there are the tip joints which control the third finger bone. Please note that the thumb is considered to be a two bone finger and so does not have a tip joint assignment.

    To make an assignment, with the GloveController script instance selected, drag a bone from the hand’s armature in the hierarchy window into the corresponding finger slot of script. Make sure to not select the bone you are dragging or else you will need to reselect the script component again. The finger assignments are 5 element arrays ordered by finger number where the thumb is 0, the index finger is 1, the middle finger is 2, the ring finger is 3 and the pinky is 4. In the Hand Controller script, the assignments are grouped by joint starting with the knuckle joints, that control the first finger bones, followed by the middle joints, that control the second finger bone, and last there are the tip joints which control the third finger bone. Please note that the thumb is considered to be a two bone finger and so does not have a tip joint assignment.

    Haptics

    Up to 16 unique haptic sound files can be resident on the glove with new files rapidly uploaded over Bluetooth or USB. The glove’s custom haptic actuators are non-resonant with a 4+ octave frequency response of 100 Hz to 2000 Hz. The 6 actuators are located on each of the 5 fingertips and palm, with the palm haptic conveying possession of an object. The haptic signals can be pitch shifted and volume adjusted in real-time. Signals can loop continuously or operate in a single play mode. Our API includes easy commands to control the haptics.

    Haptic Synthesizer

    The Data Glove has the ability to play back waveforms with looping granular control. A grain is simply a portion of a sound file that plays back in a loop. The loop size can be increased to maximum so that the entire sound file loops, or can be decreased so small that the loop covers a minute portion of the larger sound file.

    Complex sounds can be created on any given actuator with creative use of the following parameters:

    • Pitch – Also known as playback speed, this is the rate at which the loop is played.
    • Grain Volume – The playback loudness. A new note with a volume of zero is a note off message.
    • Grain Location – This is the loop start location point within the waveform where the loop will begin.
    • Grain Size – The length of the loop.
    • Grain Fade – The length of the fade in and out of each grain.
    • Waveform Selection – The current selected sound file.
    • The haptic controller script is an optional helper script that can be dragged onto the same game object as the glove controller. Other scripts can then find this component to send the glove haptic commands.

    Specified Actuator:

    • SetGrainLocation
    • SetAmplitude
    • SetPitchBend
    • SetGrainSize
    • SetGrainFade

    All Actuators:

    • SetAmplitudeForAllActuators
    • SetPitchBendForAllActuators
    • SetGrainSizeForAllActuators
    • SetGrainFadeForAllActuators
    • SetGrainLocationForAllActuators

    One Shot Haptic Commands:

    • PalmOneShot
    • ThumbOneShot
    • IndexOneShot
    • MiddleOneShot
    • RingOneShot
    • PinkyOneShot
    • OneShotAllFingers
    • OneShotAllActuators

    Loop Haptic Commands:

    • PalmLoop
    • ThumbLoop
    • IndexLoop
    • MiddleLoop
    • RingLoop
    • PinkyLoop
    • LoopAllFingers
    • LoopAllActuators

    Silence Haptic Commands:

    • SilenceHaptics
    • SilencePalm
    • SilenceThumb
    • SilenceIndex
    • SilenceMiddle
    • SilenceRing
    • SilencePinky

    Example Scenes

    The Examples package can be found here:

    Unity SDK Examples

    Import the Examples package to have access to the following example scenes.

    Simulator Scene

    Open the Simulator scene by opening: /Assets/DataGlove/Scenes/Simulator.unity

    This scene has six demo examples that showcase ways to use the glove in a virtual environment. Point the hand to the right to rotate the camera and view the various objects on the table. Make a fist on an object to enter the corresponding demo example. Once in a demo, point the hand straight up while holding a fist to exit to the main menu screen. Pressing the ‘Q’ key will also exit the demo.

    There are 7 examples in total:

    • Water – Move your hand in water to feel a haptic effect on your figertips
    • Gardening – Grab seeds from a bag and drop them in the ground, then water the ground to grow flowers
    • Heart – Feel a heartbeat in your fingers
    • Keyboard – Play musical notes on the glove haptic actuators
    • Gun – Shoot zombies with lazer blasts
    • Free Mode – A still scene for checking finger tracking
    • Haptic Sequence – A scene for testing that all haptic actuators are working

    Dashboard Scene

    • Open the Dashboard scene by opening: /Assets/DataGlove/Scenes/Dashboard.unity

    This scene allows haptics to be tested on the glove buttons and sliders in the scene. This scene also demonstrates the usage of the Haptic Controller script methods.

    • Haptics Functions: The items in the Haptics Functions dropdown menu send haptic commands to the various actuators on the glove.

    Waveform Slots: Set the waveform on all the actuators to the selected slot (0-15 slots)

    • Sliders: grain location: set a grain location value from 0.0f – 1.0f grain volume: set a grain volume value from 0 – 127 grain size: set a grain size value from 0 – 127 grain fade: set a grain fade value from 0 – 127 pitch bend): set a bit crush value from 0 – 127

    • Silence Haptics Button: turn off current haptic effect

    • Glove Sensor and IMU Data: Glove sensor values for each finger and the IMU rotation quaternion values are displayed.

    Creating a Build

    When creating a build of scene, do the following:

    1. With the desired scene open, got to “File -> Build Settings”
    2. Select the “Add Open Scenes” button
    3. Select the x86_64 architecture to allow our 64 bit plugin to operate correctly
    4. Press the “Build” button