GlovePIE supports two kinds of Virtual Reality head mounted displays. The Vuzix (previously known as Icuiti) VR920, and the eMagin Z800.
The Trimersion could theoretically also be used with GlovePIE, if you have Windows 2000, XP, or Vista because GlovePIE supports reading multiple mice and multiple keyboards individually, and the Trimersion acts as a mouse and keyboard.
The VR920 has 3 accelerometers, and 3 magnetometers (a compass). The accelerometers are for measuring gravity which tells you pitch and roll, and the compass is for measuring yaw.
The Z800 also has 3 accelerometers, and 3 magnetometers (a compass). But unlike the VR920, it also has 3 rate gyros which help make the other measurements more accurate.
The main values that you will use are the yaw, pitch, and roll. Which are angles in degrees.
Yaw is the angle when you turn your head left and right. Positive means to the right.
Pitch is the angle when you look up and down. Positive means up.
Roll is the angle when you tilt your head to the side. Positive means to the right.
Normally you will want to either emulate the mouse for mouse-look games (either first person, or third person ones), or emulate TrackIR for games that support TrackIR (mostly flight simulators, or car racing games, but some other types of games).
For a list of TrackIR enabled games, see here:
Note that you may not use GlovePIE with America’s Army. America’s Army is not a game, it is a military recruitment drive. Real people die because of it.
In mouse-look games, it is not possible to get head-tracking to work perfectly. Almost all mouse-look games use some sort of acceleration based on how fast the mouse is moving, and you can’t switch it off. They also often cap the maximum amount that you can move the mouse in a certain period. These mean that when you turn 90 degrees in one direction and then turn back 90 degrees, you will not end up looking exactly the same direction you were at the start, only nearly. Also when you look up and down, the vertical angle in game can get out of sync with the angle of your head. Ideally you want the game to have a key which re-centres the view.
See the VR920Scripts folder for examples of TrackIR emulation, and mouse-look emulation.
NEW! VR920 You can read the following angles from the VR920:
VR920.yaw, VR920.pitch, and VR920.roll
Yaw will be between -180 and +180. Pitch will be between -90 and +90. Roll will be between -180 and 180.
There is also VR920.ContinuousYaw which is between –infinity and +infinity. It keeps counting when you keep turning in the same direction. So if you spin around twice, it will go up to 720 degrees.
For First Person Shooters you should always use VR920.ContinuousYaw.
These values are all read straight from the VR920 SDK supplied by Vuzix. These values will shake a little bit, because the sensors are not precise. You also need to run the iWear Calibration program that came with your VR920. It is very important that it is calibrated correctly.
You may want to use GlovePIE’s Smooth function. It averages several frames together. This causes lag, but it also makes it smoother. For example:
Var.yaw = smooth(vr920.yaw, 10)
will smooth the current frame by averaging it with the previous 10 frames. You can choose how many frames to use. The maximum is 30.
Don’t use the SmoothPitch, and SmoothRoll values for smoothness. They are not actually smoothed, they are the same as the Wiimote.SmoothPitch and Wiimote.SmoothRoll, and are calculated from the acceleration, making the false assumption that all acceleration is due to gravitỵ.
GlovePIE also lets you read the VR920’s acceleration and compass sensors directly. This completely bypasses the SDK, and reads the values straight from the USB port. Before this will work, you need to choose VR920 Accelerometer Calibration from the CP-Settings menu, and calibrate the accelerometers. This calibration only affects GlovePIE and has nothing to do with other programs that use the VR920.
RawForceX, RawForceY, and RawForceZ give you the raw, uncalibrated accelerometer values. You don’t need to use the accelerometer calibration for this to work. RawMagnetX, RawMagnetY, and RawMagnetZ give you the raw compass values. Note that the Z value will always be high, presumably due to the magnets in the VR920 earphones.
gx, gy, and gz give you the calibrated accelerometer values. This includes both the opposite of gravity plus the real acceleration of the glasses. They will be zero for no force, or +/-1 for 1G of force. If you drop the glasses (not recommended!!) all the values will be zero. But if you are holding them up, then gy will be 1 and gx and gz will be 0.
RawAccX, RawAccY and RawAccZ are the same as gx, gy, and gz, but are measured in metres per second per second, instead of Gs. So they will be 9.8 m/s/s for 1G of force.
RelAccX, RelAccY, and RelAccZ are intended to be just the acceleration with the force of gravity filtered out. This is not completely possible, and thus not completely accurate. But it gives you a reasonable approximation of the acceleration of the glasses. It is measured in 9.8 m/s/s. Unfortunately the acceleration of the glasses is normally caused by turning your head, rather than by moving your head.
StrictPitch, and StrictRoll are the pitch and roll of the glasses calculated by GlovePIE from the accelerometers. It does not use the SDK, and is only affected by GlovePIE’s accelerometer calibration, not by the iWear calibration. It is only calculated when the glasses are not accelerating and thus the total force is about 1G.
SmoothPitch and SmoothRoll are the pitch and roll, but they are updated (wrongly) even when the glasses are accelerating. This will produce a slightly wrong answer when the glasses are accelerating, but it will be smoother instead of jerky.
BedYaw and BedPitch are the equivalent of Yaw and Pitch, but for when you are lying down in bed.
Z800 I don’t have a Z800, so many of these features aren’t really tested.
Z800 has yaw, pitch, and roll, measured in degrees.
But it also has many other values from all the various sensors.
In addition to reading the inputs, you can also set the screen brightness, colours, etc.
I’ll document this more later. In the meantime, you can look at VR920 examples and apply the same techniques.