Be Epic Posted November 11 Posted November 11 We have a Unity VR environment running on Windows, and a HTC Vive XR Elite connected to PC. The headset also has the Full face tracker connected and tracking. I need to just log the face tracking data (eye data in specific) from the headset to test. I have the attached code snippet as a script added on the camera asset, to simply log the eye open/close data. But I'm getting a "XR_ERROR_SESSION_LOST" when trying to access the data using GetFacialExpressions as shown in the code snippet below. And the log data always prints 0s for both eye and lip tracking data. What could be the issue here? I'm new to Unity so it could also be the way I'm adding the script to the camera asset. Using VIVE OpenXR Plugin for Unity (2022.3.44f1), with Facial Tracking feature enabled in the project settings > OpenXR. Code: public class FacialTrackingScript : MonoBehaviour { private static float[] eyeExps = new float[(int)XrEyeExpressionHTC.XR_EYE_EXPRESSION_MAX_ENUM_HTC]; private static float[] lipExps = new float[(int)XrLipExpressionHTC.XR_LIP_EXPRESSION_MAX_ENUM_HTC]; void Start() { Debug.Log("Script start running"); } void Update() { Debug.Log("Script update running"); var feature = OpenXRSettings.Instance.GetFeature<ViveFacialTracking>(); if (feature != null) { { //XR_ERROR_SESSION_LOST at the line below if (feature.GetFacialExpressions(XrFacialTrackingTypeHTC.XR_FACIAL_TRACKING_TYPE_EYE_DEFAULT_HTC, out float[] exps)) { eyeExps = exps; } } { if (feature.GetFacialExpressions(XrFacialTrackingTypeHTC.XR_FACIAL_TRACKING_TYPE_LIP_DEFAULT_HTC, out float[] exps)) { lipExps = exps; } } // How large is the user's mouth opening. 0 = closed, 1 = fully opened Debug.Log("Jaw Open: " + lipExps[(int)XrLipExpressionHTC.XR_LIP_EXPRESSION_JAW_OPEN_HTC]); // Is the user's left eye opening? 0 = opened, 1 = fully closed Debug.Log("Left Eye Blink: " + eyeExps[(int)XrEyeExpressionHTC.XR_EYE_EXPRESSION_LEFT_BLINK_HTC]); } } }
VIVE_chengnay Posted November 11 Posted November 11 Hi @Be Epic, May I know which version of VIVE OpenXR Plugin and VIVE Hub did you install?
Tony PH Lin Posted November 11 Posted November 11 We also replied same question on Discord. Could you try to register OpenXR layers in VIVE Hub Settings as shown in attachment and try again?
Be Epic Posted November 12 Author Posted November 12 (edited) On 11/10/2024 at 11:33 PM, VIVE_chengnay said: Hi @Be Epic, May I know which version of VIVE OpenXR Plugin and VIVE Hub did you install? VIVE OpenXR Plugin: 2.4.2 VIVE Hub: 2.1.7 On 11/11/2024 at 1:36 AM, Tony PH Lin said: We also replied same question on Discord. Could you try to register OpenXR layers in VIVE Hub Settings as shown in attachment and try again? Nothing opens up after I clicked on register even though I tried both wearing/connected and shutdown/disconnected headset along with it. Edited November 12 by Be Epic
VIVE_chengnay Posted November 13 Posted November 13 Hi @Be Epic, After clicking Register button, it won't open up any window. It will modify OpenXR API Layers in SteamVR Settings. Only those used by PC Streaming will be enabled. 1
Zhengtai Gou Posted November 14 Posted November 14 Hi I encountered similar issue when trying to get pupil data. I'm using 2.2 4a beta version of vive hub and 2.4.2 version of vive openxr plugin. I tried register for openxr extension in vive hub, but it seems that in SteamVR settings no openxr API layer is installed. Do you guys have any idea? Thanks
VIVE_chengnay Posted November 18 Posted November 18 Hi @Zhengtai Gou, Please try to reboot your PC and update VIVE Hub without enabling Unity Editor.
Be Epic Posted November 20 Author Posted November 20 On 11/12/2024 at 6:03 PM, VIVE_chengnay said: Hi @Be Epic, After clicking Register button, it won't open up any window. It will modify OpenXR API Layers in SteamVR Settings. Only those used by PC Streaming will be enabled. I attached the settings that I see, and I think mine misses a few options that I see on yours. And yeah clicking on register does nothing and those SteamVR remain as shown in the image.
VIVE_chengnay Posted November 21 Posted November 21 8 hours ago, Be Epic said: And yeah clicking on register does nothing and those SteamVR remain as shown in the image @Be EpicThis means that previously you already enabled the API Layer that supported by our Vive Streaming. This is just to ensure there is no unsupported API Layer enabled. You can test by enable "ViveVR OpenXR SRWorks" then click Register button again, you will see it will be switch to Off.
Zhengtai Gou Posted December 7 Posted December 7 On 11/18/2024 at 3:19 AM, VIVE_chengnay said: Hi @Zhengtai Gou, Please try to reboot your PC and update VIVE Hub without enabling Unity Editor. Hi @VIVE_chengnay Both my vive hub(2.2.5 beta) and steamVR are the latest versions, still I can't register the openXR layers.
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