CormacGeorge Posted June 7, 2023 Share Posted June 7, 2023 Hello all, If you are attempting to determine where someone is looking within a scene using a raycast, is it generally better to use the built in focus point data, or to construct your own raycast using a combo of the gaze origin and gaze direction? Additionally, are gaze origin and direction absolute/world coordinates or are they relative/local to the camera? Finally, for the focus point data when finding where a person is looking, what would be the origin of the raycast? would it be the camera, or would it be some midpoint between the eyes? Thanks, George Link to comment Share on other sites More sharing options...
Alex_HTC Posted June 8, 2023 Share Posted June 8, 2023 @CormacGeorgeTo the other points: 1) Generally better to use built-in focus point data or raycast The built-in focus point data is generally more accurate than constructing your own raycast using the gaze origin and gaze direction. This is because the focus point data is calculated using a variety of factors, including the user's eye position, head position, and the scene geometry. However, if you need to be able to raycast to a specific location, such as an object that is not in the user's field of view, then you may need to construct your own raycast. This takes into accound ipd and other factors. Constructing your own raycast using the gaze origin and gaze direction might be necessary if you require more control over the specifics of the raycast, or if you want to implement additional logic that isn't covered by the built-in focus point data. For instance, you might want to implement your own raycast if you are designing a system that needs to differentiate between 'active' and 'passive' gaze (i.e., when the user is consciously looking at something vs. just glancing around). 2) Absolute/world vs relative/local The gaze origin and gaze direction values are typically provided in the local space of the VR headset (i.e., relative to the position and orientation of the headset). This means that you will need to transform these values into world space if you want to use them for raycasting in your scene. This transformation is typically done by multiplying the gaze origin and gaze direction by the headset's world transformation matrix. 3) Origin of the raycast The origin of the raycast when using the focus point data is usually a point in the middle of the user's eyes. This is often referred to as the "combined eye", which is a hypothetical single eye located at the midpoint between the two actual eyes. This is used because it simplifies the calculations needed for binocular vision and gaze tracking. There is some more information on our eye tracking tutorial page as well https://hub.vive.com/storage/app/doc/en-us/UnityXR/UnityXREyeTracking.html Let me know if you have any other questions! -Alex Link to comment Share on other sites More sharing options...
CormacGeorge Posted August 23, 2023 Author Share Posted August 23, 2023 On 6/8/2023 at 3:54 PM, Alex_HTC said: @CormacGeorgeTo the other points: 1) Generally better to use built-in focus point data or raycast The built-in focus point data is generally more accurate than constructing your own raycast using the gaze origin and gaze direction. This is because the focus point data is calculated using a variety of factors, including the user's eye position, head position, and the scene geometry. However, if you need to be able to raycast to a specific location, such as an object that is not in the user's field of view, then you may need to construct your own raycast. This takes into accound ipd and other factors. Constructing your own raycast using the gaze origin and gaze direction might be necessary if you require more control over the specifics of the raycast, or if you want to implement additional logic that isn't covered by the built-in focus point data. For instance, you might want to implement your own raycast if you are designing a system that needs to differentiate between 'active' and 'passive' gaze (i.e., when the user is consciously looking at something vs. just glancing around). 2) Absolute/world vs relative/local The gaze origin and gaze direction values are typically provided in the local space of the VR headset (i.e., relative to the position and orientation of the headset). This means that you will need to transform these values into world space if you want to use them for raycasting in your scene. This transformation is typically done by multiplying the gaze origin and gaze direction by the headset's world transformation matrix. 3) Origin of the raycast The origin of the raycast when using the focus point data is usually a point in the middle of the user's eyes. This is often referred to as the "combined eye", which is a hypothetical single eye located at the midpoint between the two actual eyes. This is used because it simplifies the calculations needed for binocular vision and gaze tracking. There is some more information on our eye tracking tutorial page as well https://hub.vive.com/storage/app/doc/en-us/UnityXR/UnityXREyeTracking.html Let me know if you have any other questions! -Alex Hey Alex, thank for the advice! So I was actually looking into using dot product to determine how far off from a target an individual's gaze is in a 2d axis. This is because we are artificially blocking their central vision, forcing them to use their periphery to see objects. For example, if someone is looking above and to the right of the target with their actual gaze, thus using the bottom left portion of their vision to see the target. Would you have any advice on determining where this point is, or if it would be something that is easier to do using the original focus point data, then transform it afterwards? I have also attached a picture to illustrate my point; we are interested in determining what someone's eccentric fixation might be like in the far right picture in which they position their central vision to the left of the tree due to an inability to use their central vision. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now