Home › Forums › XR Discussions › How to get eye coordinates from HTC Vive Pro Eye
Tagged: Eye coordinates, eye tracking, HTC Vive Pro Eye
- This topic has 23 replies, 5 voices, and was last updated 2 months, 3 weeks ago by Supriya Raul.
- AuthorPosts
- 29/08/2019 at 00:59 #11947Supriya RaulParticipant
I am using HTC Vive Pro Eye with Tobii eye tracking with Unity and want to know if I can fetch the eye coordinates of the user. I have used Tobii 4C eye tracker for the desktop before and have used TobiiAPI.GetGazePoint() to do similar task. Please suggest if there’s a way similar to this one :
using Unity.Engine;
using Tobii.Gaming;public class ExampleClass : MonoBehaviour
{
void Update()
{
GazePoint gazePoint = TobiiAPI.GetGazePoint();
if (gazePoint.IsRecent()) // Use IsValid property instead to process old but valid data
{
// Note: Values can be negative if the user looks outside the game view.
print(“Gaze point on Screen (X,Y): ” + gazePoint.Screen.x + “, ” + gazePoint.Screen.y);
}
}
}29/08/2019 at 09:46 #11948Grant [Tobii]KeymasterHi @supriya and thanks for your query. Can you kindly confirm that you are using the Tobii Pro SDK Unity bindings in conjunction with the HTC Vive Pro?
In that case, please kindly get in touch with The Tobii Pro support directly for an answer to your question @ http://www.tobiipro.com/contact/contact-support/ and the team there will reply to you shortly.
Thanks for your understanding and best wishes.
29/08/2019 at 16:47 #11950Supriya RaulParticipantYes I am using TobiiXRSDK_1.4.1.152.unitypackage and Vive-SRanipal-Unity-Plugin.unitypackage. Thank you for your quick response. I would contact Tobii Pro support then.
29/08/2019 at 17:27 #11953Supriya RaulParticipantGrant, I have one more question. I am trying to sign up for the Tobii pro support and it needs the device serial number. Is it Tobii device serial number? Please let me know where to find it.
30/08/2019 at 10:12 #11959Grant [Tobii]KeymasterHi @supriya, in fact the XR SDK is part of the Tobii Tech Business department (us!) so we can help you regarding this query.
I understand you are trying to the find the eyeball co-ordinates in 3D space? I am afraid the individual eye ball co-ordinates are not exposed with the XR SDK but instead for a unified combined eye position for which we describe the methodology for obtaining this @ https://vr.tobii.com/sdk/develop/unity/documentation/api-reference/
Origin Vector3 The point in world space for the origin of the gaze ray.
You can also check out usage example @ https://vr.tobii.com/sdk/develop/unity/documentation/usage-examples/ which show the code in action.
Hopefully this answers your query, please let us know if we can provide any further information.
30/08/2019 at 21:31 #11963Supriya RaulParticipantYes, I tried using the eye origin but it doesn’t seem to working as expected. Let me explain what I am trying to do. I need the gaze coordinates on a 2D plane i.e. on the viewport of the camera. I am just trying to move a sphere gameobject with user’s gaze. Now, if I try to keep the sphere at TobiiXR.EyeTrackingData.GazeRay.Origin it doesn’t seem to follow the gaze and if I move my head it goes out of the field of view. I used these coordinates for the sphere’s position :
var rayOrigin = TobiiXR.EyeTrackingData.GazeRay.Origin;
sphere.transform.position = new Vector3( rayOrigin.x, rayOrigin.y, (camPosition.z + camForward.z * 1f));
Do you have any suggestions for me Grant? Thanks in advance.02/09/2019 at 14:35 #11965Grant [Tobii]KeymasterHi @supriya you will need to use the gaze direction as well as the gaze origin. Whilst the gaze origin is a point in world space where your eyes are looking from, the gaze direction is world space direction vector.
The gaze direction originates from the gaze origin in the direction whee you are looking which finally provides the final gaze location.
Unfortunately, your user case is non-trivial, but perhaps our included samples with Unity can help you get started.
Hopefully this helps you in your project.04/09/2019 at 23:46 #11973Supriya RaulParticipantThank you so much for the clarification Grant. This information helped me make it work.
05/09/2019 at 09:50 #11975Grant [Tobii]KeymasterHi @supriya, great! glad to hear you this working 😀 If you would care to share your code on github (or similar) I am sure that would be most appreciated by other users.
06/09/2019 at 23:33 #11978Supriya RaulParticipantSure I will do that. 🙂
Can you help me with one more thing? Do you think it’s possible to run the eye calibration, that we usually run from system dashboard, from within my unity application? It would have been easier to run every time a different user tries the application.
Otherwise, it would have been amazing if we had the option to save multiple user profiles and switch between them (similar to the Tobii 4C eye tracker software).
Thanks in advance.10/09/2019 at 21:21 #11982Grant [Tobii]KeymasterHi @supriya, I am afraid that for the time being, within the Tobii XR SDK calibration is only currently possible via the Tobii Core Software System Tray Icon.
As a possible workaround, you can launch a quick calibration via an internal windows command:
c:\Program Files (x86)\Tobii\Tobii EyeX Config\Tobii.EyeX.Configuration.exe –quick-calibration
But this may not necessarily provide sufficient accuracy for new users. Our Apologies for any inconvenience caused, hopefully, this does not hinder your project development. Best Wishes.
19/09/2019 at 15:48 #12009Supriya RaulParticipantThanks for trying to help me out Grant. I am switching the users from Tobii Core Software System Tray Icon right now. However, I definitely look forward to a feature that would let me save multiple user profiles.
19/09/2019 at 17:06 #12014Grant [Tobii]KeymasterOkay, thanks for letting us know, will pass along your suggestions to the developers for consideration in a future release. Please don’t hesitate to get in touch again should require any further information. All the best.
20/09/2019 at 16:06 #12020Supriya RaulParticipantThank you so much Grant! I really appreciate all your quick assistance.
Also, I would like to pay the developers a compliment. I love how precisely Tobii eye trackers work and make my work easier! We have been using Tobii 4C eye tracker and HTC Vive pro eye. Really appreciate the efforts Tobii developers have put into it. Look forward to more amazing features and products. 🙂24/09/2019 at 10:06 #12023Grant [Tobii]KeymasterThanks Surpiya! You are very welcome and I will happily pass along your compliments to the development team.
Feel free to get in touch in the future should you have any further questions or comments. 🙂
- AuthorPosts
- You must be logged in to reply to this topic.