-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenXR: Add support for hand tracking source extension #85204
OpenXR: Add support for hand tracking source extension #85204
Conversation
8ca6c36
to
5795459
Compare
5795459
to
f312e38
Compare
This extension is now supported on Quest 3 (and probably 2 and Pro as well), was able to test this successfully. Both inferred and optical hand tracking is working with the Quest 3 and it switches seamlessly between them. Tested with a slightly modified version of: |
Skimming the code, this looks good to me!
Could you share your modified version of that demo? I'd be happy to test this :-) |
Oh, it's just removing the hand interaction profile that I added, and the call that checks for this extension. |
@dsnopek project was to big for Github so I uploaded the modified project to dropbox. Quest correctly switches between inferred and full hand tracking but it's not showing the correct data source, so I'm having a look at why atm. You do need to add the vendors plugin manually (and install the compiled templates) |
@dsnopek there is an error in the On further testing I am, as before, getting hand tracking info but I'm not getting useful information from |
@BastiaanOlij Thanks! I'm seeing the same as what you're seeing with the demo project, on both Quest 3 and Quest Pro. I poked around a little bit, and the headset does seem to be reporting that it supports this extension, and so it should be initialized when calling So, either we've got a subtle mistake somewhere, or Meta is not strictly following the spec? |
@dsnopek I've asked some questions but haven't got any feedback other than "it should work", by now you have better contacts to poke then me :P For me the important thing is that hand tracking works even when you're using a controller so that we finally have parity between SteamVR and Oculus (SteamVR doesn't need this extension, it works like this by default). Getting the data source name is bonus, I don't think that part is supported by anyone but Meta atm. |
@BastiaanOlij I figured it out! We were passing the Apply this patch, and it starts working beautifully :-) |
f312e38
to
6d90e77
Compare
@dsnopek thanks! I need to look into OpenXRs validation layers so it will spit out mistakes like this. Works like a charm now, I think this is ready to be merged! |
6d90e77
to
4c806c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest version works great! The code looks good too :-)
Thanks! |
Originally the hand tracking extension in OpenXR left a few behaviors undefined. As a result only Valves runtime provided hand tracking data both when the user was using a controller (where the runtime infers tracking data from inputs and sensors) or when full optical hand tracking was available.
Other runtimes would only provide hand tracking data if actual hand tracking was used and no data when the user used a controller.
This meant that it was up to the developer to determine if hand tracking data was available and implement a fallback.
As OpenXR does not provide enough information to fully infer finger positions from controller input this was limited.
The need for the XR runtime to provide inferred hand tracking data when controllers were used has resulted in more runtimes willing to provide this feature however there needed to be a way for the runtime to communicate capabilities, and for the game to inform the runtime what it can handle.
The Hand Tracking Data Source Extension was introduced for this purpose. Enabling this communicates to the XR runtime that we want to use the new functionality and we specify which data sources we wish to receive hand tracking data for.
When polling hand tracking data we can also retrieve the source in use.
If hand tracking is enabled (see OpenXR project settings) and this extension is available, we will enable the extension. We will always request both available data sources.
The new method
OpenXRInterface::get_hand_tracking_source
allows us to query the source of the hand tracking data.