Skip to content
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

Implement skeleton support #84

Merged
merged 2 commits into from
Apr 4, 2020

Conversation

BastiaanOlij
Copy link
Member

This PR implements skeleton support for our plugin. This allows us to present fully articulated hands to the user where OpenVR will provide the information for correct finger placement depending on sensors on the controllers.

image

There are a few things to round off but this is basically all working :)

@BastiaanOlij
Copy link
Member Author

BastiaanOlij commented Mar 31, 2020

I'll write up some more documentation on the WIKI but the asset now comes with the two required entries in the actions.json file and two premade scenes that implement the standard gloves that Valve supplies. You can use those scenes as they are or you can build your own.

Here is the right hand scene:

image

So it's inherited from the slim GLTF file that Valve supplies, this is the one without the textures but I have extracted the textures and applied them. I did this purely to save space.

So our root node is a spatial node but I have applied our OpenVRPose.gdns script to it so it can be set to our skeleton action /actions/godot/in/right_hand. It is IMPORTANT hand remains any, don't set this to right hand even though we are dealing with the right hand. Its a special type of pose.

The Rootnode is just a spatial the GLTF import adds, next is our skeleton node with the skeleton implemented that is properly setup for OpenVR. Here I have applied our new OpenVRSkeleton.gdns script. This new node has 3 properties:

image

Action is set to the same /actions/godot/in/right_hand action.
Keep bones is set to true, if you set this to false or if no bones are added the plugin will load up the bones it gets from the plugin. If set to true it will use the bones we already have.
Motion range allows us to switch between the two motion ranges OpenVR supports. With controller allows you to grip the hand around the controller, you should set this if the controller is visible. If set to Without controller you can make a full closed fist.

Finally you'll see 5 Bone attachments named after each finger. These are nodes that follow the position of each finger tips.
When using this scene you can enable editable children and add additional objects to this or add things like a physics area to detect what the fingers are touching.

@MathiasBaumgartinger
Copy link

MathiasBaumgartinger commented Mar 31, 2020

I have been working on a hand-system support the last days in here https://github.com/boku-ilen/godot-vr-toolkit, where i set different animations made in blender on the inputs for touch and pressed properties of the oculus. Finished this pretty much exactly at the time you were finishing the skeleton support ...

grafik

Pretty sad timing now 😂

@BastiaanOlij
Copy link
Member Author

I have been working on a hand-system support the last days in here https://github.com/boku-ilen/godot-vr-toolkit, where i set different animations made in blender on the inputs for touch and pressed properties of the oculus. Finished this pretty much exactly at the time you were finishing the skeleton support ...

Pretty sad timing now 😂
Why sad timing? The great thing about supporting the skeleton API for OpenVR is that OpenVR does a lot of cool stuff for us, but the big downside of it is that it's specific for OpenVR.

Having a generic implementation that just reacts to controller inputs and can therefor be used for any VR platform is still something many will be interested in.

I was thinking of renaming my https://github.com/godotvr/godot-vr-common toolkit library to godot-vr-toolkit, have to think of a new name now :)

@MathiasBaumgartinger
Copy link

I actually am very unaware of how useful my whole repository is, especially since it is all writen in GDScript as opposed to your GDNative c++ code. But if you think that some of my things could be of use I would actually feel honored if I could collaborate. One thing i really missed on the VR-common repository was input on UI on a mesh, so I made something that does work quite reliable. Feel free to contact me if I can collaborate somehow :)

@BastiaanOlij
Copy link
Member Author

I actually am very unaware of how useful my whole repository is, especially since it is all writen in GDScript as opposed to your GDNative c++ code. But if you think that some of my things could be of use I would actually feel honored if I could collaborate. One thing i really missed on the VR-common repository was input on UI on a mesh, so I made something that does work quite reliable. Feel free to contact me if I can collaborate somehow :)

The more contributors to vr-common the happier I'll be, there is only so much I can do with my attention already spread thin over all these projects. So please feel free to open issues on the repo to discuss ideas you want to add and submit some PRs with additions you think make sense.

Do please always ping me on discord or twitter when you do so, I get a flood of emails from github each day as a core contributor to Godot itself and miss a lot that are directed to my own repos.

@BastiaanOlij BastiaanOlij merged commit 7492f77 into GodotVR:master Apr 4, 2020
@BastiaanOlij BastiaanOlij deleted the finger_tracking branch April 4, 2020 09:02
@arran-nz
Copy link

arran-nz commented Jun 24, 2021

For the next person looking for more OpenVRSkeleton documentation: https://github.com/GodotVR/godot-openvr-asset/wiki/OpenVR-actions
Thanks @BastiaanOlij !

Edit: I posted the wrong link from my clipboard 🤦

@BastiaanOlij
Copy link
Member Author

@arran-nz you're welcome :)

Your link only works if you have an account but documentation can also be found here: https://github.com/GodotVR/godot-openvr-asset/wiki/OpenVR-actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Index Controller support (Finger tracked controller in general)
3 participants