Home Forums XR Discussions How to get eye coordinates from HTC Vive Pro Eye

This topic contains 10 replies, has 2 voices, and was last updated by  Grant [Tobii] 1 week, 1 day ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #11947

    Supriya Raul
    Participant

    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);
    }
    }
    }

    #11948

    Grant [Tobii]
    Moderator

    Hi @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.

    #11950

    Supriya Raul
    Participant

    Yes 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.

    #11953

    Supriya Raul
    Participant

    Grant, 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.

    #11959

    Grant [Tobii]
    Moderator

    Hi @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.

    #11963

    Supriya Raul
    Participant

    Yes, 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.

    • This reply was modified 2 weeks, 5 days ago by  Supriya Raul.
    #11965

    Grant [Tobii]
    Moderator

    Hi @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.

    #11973

    Supriya Raul
    Participant

    Thank you so much for the clarification Grant. This information helped me make it work.

    #11975

    Grant [Tobii]
    Moderator

    Hi @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.

    #11978

    Supriya Raul
    Participant

    Sure 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.

    • This reply was modified 1 week, 5 days ago by  Supriya Raul.
    #11982

    Grant [Tobii]
    Moderator

    Hi @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.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.