Tagged: eyetracker, Tobii Pro Nano
- This topic has 19 replies, 5 voices, and was last updated 3 years, 1 month ago by Grant [Tobii].
- AuthorPosts
- 06/11/2020 at 12:30 #19241TesiRealterParticipant
Hello,
I’ve just started using the THC Vive Pro Eye for a research project in Unity.
I have TobiiXR SDK but I don’t know how to extract data from the integrated Eye Tracker. I have already contacted the Tobii Pro Support but they could not help me.
I have also read topics in this forum but I didn’t find what I was looking for.
Can someone help me explaining how to collect eye tracker data, please?
Thank you,
Sara08/11/2020 at 16:39 #19256Thomas AnquetilParticipantHello,
What do you mean exactly by extract data ? What are you precisely looking for ?
I’d recommend you to have a look at this page : TobiiXR Core API. It is a good starting point to work with. But we’d need you to be a little more specific about your needs !
Regards,
Thomas Anquetil08/11/2020 at 17:45 #19257TesiRealterParticipantHello,
Thanks for your reply. I’ve already look at TobiiXR Core API but unfortunately I didn’t find a solution.The data I’m looking for are the eye movements raw data that the Eye Tracker should record.
Another option is to find the “scan-path”, which should also contain the eye movements data, but I don’t know how to have acces to this.
Is it possible to save the stream video, acquired during an experiment, so that I can apply some post-processing techniques?
Thank you,
Sara09/11/2020 at 14:13 #19261Grant [Tobii]KeymasterHi @tesirealterm, thanks for your query. I am afraid that the ‘raw’ data is not exposed within the XR SDK, however the gaze location and direction are fully available.
We discuss the means to obtain the direction vector of the gaze ray (and origin) @ https://vr.tobii.com/sdk/develop/unity/documentation/api-reference/core/
TobiiXR.GetEyeTrackingData(TobiiXR_TrackingSpace)
Where we include the sample code:
private void Update () { // Get eye tracking data in world space var eyeTrackingData = TobiiXR.GetEyeTrackingData(TobiiXR_TrackingSpace.World); // Check if gaze ray is valid if(eyeTrackingData.GazeRay.IsValid) { // The origin of the gaze ray is a 3D point var rayOrigin = eyeTrackingData.GazeRay.Origin; // The direction of the gaze ray is a normalized direction vector var rayDirection = eyeTrackingData.GazeRay.Direction; } // For social use cases, data in local space may be easier to work with var eyeTrackingDataLocal = TobiiXR.GetEyeTrackingData(TobiiXR_TrackingSpace.Local); // The EyeBlinking bool is true when the eye is closed var isLeftEyeBlinking = eyeTrackingDataLocal.IsLeftEyeBlinking; var isRightEyeBlinking = eyeTrackingDataLocal.IsRightEyeBlinking; // Using gaze direction in local space makes it easier to apply a local rotation // to your virtual eye balls. var eyesDirection = eyeTrackingDataLocal.GazeRay.Direction; }
Hopefully this should be what you are looking for, please let us know how you get on.
If you are completely new to programming with Unity, it may be worth first trying out getting started guide @
https://vr.tobii.com/sdk/develop/unity/getting-started/vive-pro-eye/09/11/2020 at 14:42 #19262TesiRealterParticipantThank you very much!
I saw that page but I didn’t understand where should I put the code (I mean if I have to create something and put this script as component or what)
Can you tell me please?Is this free or do need some license?
Thank you
10/11/2020 at 18:07 #19272Grant [Tobii]KeymasterHi @tesirealter, please firstly follow the getting started guide to get a feel of how the object within the Unity Scene capture gaze data from our tutorial @ https://vr.tobii.com/sdk/develop/unity/getting-started/vive-pro-eye/
Here you will see at “Step 5: Add the TobiiXR Initializer prefab to your scene” the place to put the appropriate code above mentioned to capture gaze data.
If you could kindly clarify your project intentions that would be helpful… naturally, it does not make sense to receive eye gaze data within a Unity scene without at least one object present.
13/11/2020 at 10:59 #19293TesiRealterParticipantOkay, thank you.
I did this, the problem is that I can’t see the saved data. How can I do? I mean to see them for example on a file .txt.
Thanks
13/11/2020 at 12:38 #19297Grant [Tobii]KeymasterHi @tesirealter. Please bear in mind that the storage of gaze data requires the purchase of a special licence do to so.
You can read more about this @ https://vr.tobii.com/sdk/licences/
All the data that can be extracted from the Core SDK can be found @ https://vr.tobii.com/sdk/develop/unity/documentation/api-reference/core/
You can place the scripts anywhere in the scene to get the data, and we provide examples of how to do this in the API page (https://vr.tobii.com/sdk/develop/unity/documentation/api-reference/core/).
We don’t have a recorder or similar to automatically store data in our SDK because Unity offers plenty of ways of doing this with minimal code required.
I am afraid that the tutelage of basic Unity programming concepts is beyond the scope of this forum. Best Wishes.26/02/2021 at 13:30 #19953Raghu kiranParticipanthiii iam using pico vr i downloaded picovr sdk i given all the settings as per mentioned in document i kept TobiiXRIntializer prefab componenet in the scene but i unable to fetch gaze data .i used this code line
var eyeTrackingData = TobiiXR.GetEyeTrackingData(TobiiXR_TrackingSpace.World);
this eyeTrackingData.GazeRay.IsValid value alsways return false what would be the solution any help would be appreciated
26/02/2021 at 18:35 #19954Grant [Tobii]KeymasterHi @rvejendla, I can assume you have already ran through the Pico setup guide @
https://vr.tobii.com/sdk/develop/unity/getting-started/pico-neo-2-eye/
In this case, can you tell us if the sample applications work at detecting gaze? If not, this may indicate an issue with the headset.. are you at least able to properly calibrate and test that we may discount a physical hardware problem?
02/03/2021 at 06:07 #19963Raghu kiranParticipantit seems like i dont have any device issue can you tell me one thing if Unity Application is in dark mode thus it find any difficult in Detecting Eye tracking?
02/03/2021 at 11:08 #19965Raghu kiranParticipantSorry for my previous question eye tracking detecting every mode wheter it is light mode or dark mode it is detecting fine
02/03/2021 at 13:41 #19969Raghu kiranParticipanthiii i actually checked in demo application Eye tracking detecting and working fine .where if i implemented and merged this code in my actual application and follow the pico vr settings still iam facing this issue .thus selection of layers in G2OM layer mask can effect Eye detection which was in Tobiixr Intializer component any help?
var eyeTrackingData = TobiiXR.GetEyeTrackingData(TobiiXR_TrackingSpace.World);
this eyeTrackingData.GazeRay.IsValid value alsways return false
02/03/2021 at 16:36 #19971Grant [Tobii]KeymasterHi @rvejendla, If you carefully follow our getting started guide as linked above, it should work unless so perhaps a step has been missed somewhere?
It is difficult to advise you further without additional information.A couple of things to consdier:
– Make sure gaze aware objects have a collider AND implements the IGazeFocusable interface
– Make sure the TobiiXR Initializer prefab is set exactly as in the working scenes
– we would recommend also adding a cube with the HighlightAtGaze script attached to see if it highlight when looked atTry it out and let us know how you get on. Best Wishes.
02/03/2021 at 17:26 #19972Raghu kiranParticipantHii actually I have two scenes named as
left_eye scene other right_scene both scenes have attached with Pvr_UnitySDK prefabs .each prefab has left eye camera and right eye camera I make left eye and right eye as two seperate layers so in left_eye scene having Pvr_UnitySDK prefab I kept 3d objects in left eye cam not in right eye like that right_scene having Pvr_UnitySDK prefab I kept 3d objects in right eye cam not in left eye cam after that I take tobiixrinitializer component in both scenes so in left_eye scene having with tobiixrintializer component I check left eye layer unchecked right eye layer on G2OM LAYER MASK and in right_eye scene having tobiixr initializer component I check the right eye layer uncheck the left eye layer on G2OM LAYER MASK thus in these cases botheyes is not detecting? - AuthorPosts
- You must be logged in to reply to this topic.