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 Service app to your Desktop.
-
Start Pupil Service via the
pupil_service.exein the Pupil Service App folder. A window like this will appear when service is running. Service does pupil detection from eye images.
-
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.exein 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 ManagerinPupil Captureand start theHoloLens Relayplugin
- 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_hololensas a project. Double click theShark Demo/2D Calibration Demoto load the scene and open theHolographic Emulationtab (Menu/Window/Holographic Emulation) - In the
Holographictab, selectRemote to DeviceasEmulation Mode - Read more about Unity's
Holographic Emulationhere. - Start the
Holographic Remoting Playeron your HoloLens device. Enter the displayed device IP in theHolographictab underRemote machine. Click theConnectbutton. - Once connected, press
Playin Unity Editor. - Follow the on device instructions to open the menu (double air tap) and select
Connect to Pupilby looking straight at the button and confirming with a single air tap.
- Once the connection between Unity3d and
Pupil Captureis established two eye windows will open. Use these windows to adjust the eye cameras for good tracking. - The
Start Calibrationwill 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.
