Building blocks for eye tracking in Augmented Reality AR
and Virtual Reality VR
or more generally Head Mounted Displays HMD
. The purpose of this repository is do demonstrates how to implement Pupil with Unity3D. For details on Pupil computations, please have a look at the related repositories.
This guide walks you through a first time setup for your Pupil Labs VR add-on.
-
HTC Vive Add-on setup - Install your Pupil eye tracking add-on into your HMD and connect the add-on to your computer.
-
Download Pupil Software. Extract the Pupil Capture app to your Desktop.
-
Start Pupil Capture via the
pupil_capture.exe
in the Pupil Capture App folder. Pupil Capture performs the actual eye tracking and provides real-time data access via a network API. -
Download and start hmd-eyes demo app - This demo runs a VR experience. The demo app talks to Pupil software in the background. You will use it to calibrate and visualize gaze data within a demo scene. The demo app will start with settings dialog.
-
Start the demo with default values. You will see a view of the left eye of the hmd.
-
This would be a good point to put said device on your head.
-
Use the displayed realtime videos of your eyes to make sure they are as centered as possible and in focus.
-
Press 'c' on your keyboard to start a calibration and focus your gaze on the displayed marker as it changes position.
-
After a successful calibration, this scene will be loaded
- HoloLens Add-on setup - Set up the Pupil eye tracking add-on with your HMD and connect it to a PC.
- Download Pupil Software. Extract the Pupil Capture app to your Desktop.
- Start Pupil Capture via the
pupil_capture.exe
in the Pupil Capture App folder. A window like this will appear when service is running. Capture does pupil detection from eye images. - Select the
Plugin Manager
inPupil Capture
and start theHoloLens Relay
plugin - Download and install Unity 3D.
- Download the hmd-eyes source code. Extract the Unity project sources for HoloLens, located in
unity_pupil_plugin_hololens
. - In Unity3d open the
unity_pupil_plugin_hololens
as a project. Double click theShark Demo/2D Calibration Demo
to load the scene and open theHolographic Emulation
tab (Menu/Window/Holographic Emulation
) - In the
Holographic
tab, selectRemote to Device
asEmulation Mode
- Read more about Unity's
Holographic Emulation
here. - Start the
Holographic Remoting Player
on your HoloLens device. Enter the displayed device IP in theHolographic
tab underRemote machine
. Click theConnect
button. - Once connected, press
Play
in Unity Editor. - Follow the on device instructions to open the menu (double air tap) and select
Connect to Pupil
by looking straight at the button and confirming with a single air tap. - Once the connection between Unity3d and
Pupil Capture
is established two eye windows will open. Use these windows to adjust the eye cameras for good tracking. - The
Start Calibration
will now be enabled on the HoloLens display. - Calibrate - Start the calibration. Focus your gaze on the displayed marker for each displayed position.
- After a successful calibration, you should see a rotating 3D model and a visualization of your gaze
Check out the developer docs to learn how to set up dev envirmoment, make changes to code, and integrate with your own Unity3D project.
Chat with the hmd-eyes community on Discord.