Home Forums XR Discussions Recording Eye Data at 120Hz

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #21541
    Ben Falandays
    Participant

    I am working on a human-subjects experiment using the Vive pro eye and Tobii XR SDK in Unity, and I am trying to record the eye data at 120Hz. If I do this in an Update() call, data is only recorded at the application framerate (in this case 90hz). However, I know the headset is actually capturing data at 120Hz. Could anyone help me figure out how to access the data at that rate?

    #21544
    Grant [Tobii]
    Keymaster

    Hi @bfalandays, thanks for getting in touch.

    There are a few different avenues you can explore:

    1) You could time sync the eye-tracking clock with the computer clock and achieve this. We have a page about it @ https://vr.tobii.com/sdk/learn/technical-information/time-synchronization/
    So you could read the eye-tracking data and timestamp more frequently (not Update()-loop) using this method in the Core API (https://vr.tobii.com/sdk/develop/unity/documentation/api-reference/core/#tobiixrgeteyetrackingdatatobiixr_trackingspace) and then compare the timestamp so to know if there is new data or not
    2) Another option @ https://answers.unity.com/questions/1190926/can-i-invoke-function-faster-than-update.html
    3) You could try placing the data capture within FixedUpdate() and adjusting the rate accordingly https://docs.unity3d.com/ScriptReference/MonoBehaviour.FixedUpdate.html#

    Please try this out and let us know how you get on. Best Wishes.

    #21546
    Ben Falandays
    Participant

    Hi @Grant, thanks for your response. I’ve already tried option (3), which unfortunately doesn’t work — as I understand it, FixedUpdate() with timing faster than the framerate just calls a function repeatedly at the start of the frame, so I can indeed get something recorded at 120Hz, but it’s actually just a repeat of previous data. I just tried option (2), which does seem to occasionally hit 120Hz, but most of the recordings are actually longer than the Update() rate of 90Hz, so in that case I’d be better off with update.

    Option (1) is interesting, but I’m not sure I understand it fully. From the page you linked, it looks like I’d need an Ocumen license to use that? Or if not, it’s not clear how syncing the computer and eye-tracking clock would actually let me call the GetEyeTrackingData() function more often than Update() runs.

    This forum has a very useful thread on how to get data at 120Hz using the Vive SRanipal SDK (https://forum.vive.com/topic/9341-vive-eye-tracking-at-120hz/), but for some reason this function doesn’t work when the Tobii XR SDK is also active in a scene. Do you have any idea why these two would conflict? As far as I understand, Tobii SDK is using Vive SRanipal under the hood to get the data, so it doesn’t seem like there should be a problem using both.

    #21547
    Ben Falandays
    Participant

    Quick update: I realized that the Tobii SDK is for some reason interfering with the MonoPInvokeCallback function from the forum thread I linked. Any clue what it could be in the Tobii SDK that causes this problem?

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.