Skip to main content
New Participant
March 28, 2023

Obtaining foveated tracking information from OpenXR SDK function

  • March 28, 2023
  • 3 replies
  • 2185 views

Hi, 

I'm using Meta Quest Pro to develop an application that supports dynamic foveation.

I found that there are some functions that can get the coordinates of foveated center as shown below:

            XrFoveationEyeTrackedStateMETA foveationState{XR_TYPE_FOVEATION_EYE_TRACKED_STATE_META};
            foveationState.next = nullptr;
            CHECK_XRCMD(xrGetFoveationEyeTrackedStateMETA_(m_session, &foveationState));
 
and get the values through 
foveationState.foveationCenter[eye].x and 
foveationState.foveationCenter[eye].y.
 
However, these functions didn't work as expected as I always get (0, 0) from (foveationState.foveationCenter[eye].x , foveationState.foveationCenter[eye].y).
 
The official document doesn't have the description of this part, does anyone know how to get the foveated information from these functions?

3 replies

Inspiring
March 29, 2023

Is this a standalone Quest app or PC VR over Link. I don't think the foveation extension is exposed / works on PC VR (maybe it does now, but it didn't back in january when I still had my Quest Pro).

 

If your question is for a native mobile app, you probably need to request eye-tracking permission from Java code (yes, this implies having a non-pure C++ app and calling addlibrary with the name of your C++ project / lib). It's a bit of a pain to set up but there are a few examples on github for that.

Group03Author
New Participant
March 30, 2023

Hi, 

Do you mean if the application is open on the PC then the foveation extension is not working?

I'm using an open-source cloud streaming project called ALVR, which is an OpenXR app, and I want to enable this feature (dynamic foveation) in ALVR.

(By the way, this project has already implemented the permission request part!)

Now I can normally get the eye position and orientation in the project through oculus OpenXR API, however, I can not get the foveation center through the above mentioned API.

I wonder whether my implementation is wrong or it is because the extension has not been opened yet?

Thanks a lot for your kind help!

Inspiring
March 30, 2023

I haven't tried this particular eye extension. I seem to remember that OpenXR Toolkit got foveated rendering on Quest Pro working a while back (for PC VR games), you might want to ask them or check their github how they did it. It may not be using that same function call though. I was told (here) that the social eye tracking extension wasn't suitable for foveated rendering due to some lag introduced by filtering the noisy eye data. Anyway I don't have a Quest Pro anymore so I can't help you even if I wanted to, sorry.