Jump to content

JD Wilder

Verified Members
  • Posts

  • Joined

  • Last visited

Posts posted by JD Wilder

  1. Hello,

    Thank you!

    Is there anything in the documentation where I can read more about what wide is? 
    For GetEyeOpenness is explains openness as a value clamped between 0 and 1. For the SingleEyeDate struct, the float eye_openess it simply says its a value representing how open the eye is, but it doesn't say anything about wide.

    It seems that based upon my results that wide was behaving very differently for the two eyes. For one eye I was getting between 0 and up to 2 million. This means, if openness is between 0 and 1, that wide was sometimes very large, ranging from 0 to 2 million. For the other eye I was getting tiny values between 10^-15 and 10^-5. This means, if openness is between 0 and 1 then for this eye, the wide variable is negative, pushing the value I found to be extremely tiny. So whatever wide represents it seems to be very different for my two eyes, and it seems to entirely overwhelm any signal contained in the openness variable. 


  2. I am not sure how to do this outside of Unity, but in Unity when you import SRanipal into your project you will see a ViveSR directory in your Assets. There is a sample scene called EyeSample (and also EyeSample_v2) that will show it in action. You can see a couple of dart boards at different distances and see how as you look around the different spots on the dart board light up because they are in focus. The example will show you how to use the GetFocus method from the API to do this.

    I am sorry but I don't know the details for UE. Is anyone else familiar with that?

  3. Look at the API for GetGazeRay
    Here is one entry for that:

    static bool  GetGazeRay (GazeIndex gazeIndex, out Vector3 origin, out Vector3 direction, EyeData_v2 eye_data)


    What it does is gives you the direction the eyes are looking in the vector "direction".

    If you want to know what the object is looking at you can take the direction vector, and the origin of the vector and use RayCast to see if the gaze ray is hitting any colliders. Or, it will be easier to use the focus method:

    static bool  Focus (GazeIndex index, out Ray ray, out FocusInfo focusInfo, float radius, float maxDistance, int focusableLayer, EyeData_v2 eye_data)


    which will tell you if any colliders are being looked at, and tells you the nearest collider that they gaze hits. focusInfo will contain all of the information about what is being looked at. @Kodiak @Corvus

  4. Hello,

    I encountered an issues with measuring eye openness. I was trying to use the callback so that I can get rapid samples, and it seemed to be working until I started looking at eye openness. I was following suggestions elsewhere in this forum for counting blinks and was checking if the openness was less than a threshold, like 0.1. I was just registering blinks all the time.

    Upon more checking I found out that the left eye had a wide range of values, from near 0 to very large, reaching 2,000,000. The right eye, on the other hand, was always extremely small, 10^-15, but maxing out at small values 10^-5. 

    Wanting to check if I was just not tracking the right eye well I tried to get this information using GetEyeOpenness called from the Update method, and I get the values that are suggested in the API and forums, 1 is the max for both right and left eyes. When my eyes are completely shut the value does drop to 0. When I tried to have one eye open and the other closed it worked properly, but for some reason the left eye is registered as less open when the right is closed than the right eye is registered as open when the left is closed. This could be just how my eyes work  though.

    I have attached minimal examples of both methods of getting this information along with the output files I got. During recording I started with the eye open (you can see the tracker takes a moment to get it correct, but I expected this), then I closed and opened, then I closed again, and opened. Then I closed the left eye while keeping the right open, and then I switched. 


    Is there a reason the data in the EyeData struct should be different than the output of the GetEyeOpenness method?


    EyeDataRecordCallback.txt EyeDataRecordUpdate.txt RightLeftExample.cs RightLeftExampleCallback.cs

  • Create New...