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

Bone capsule and distinguishing between joints and tips #6

Open
Manishearth opened this issue Jan 3, 2020 · 5 comments
Open

Bone capsule and distinguishing between joints and tips #6

Manishearth opened this issue Jan 3, 2020 · 5 comments
Labels
oculus-only Features only present in the Oculus API

Comments

@Manishearth
Copy link
Contributor

Manishearth commented Jan 3, 2020

Whereas Microsoft's OpenXR extension supports a radius for each joint, Oculus' API makes a distinction between "skinnable" joints and non-skinnable ones (these are the tip "joints"). For the skinnable joints, it also supports a "bone capsule", which describes the joint as a cylinder:

// ovrBoneCapsule
//    _---_
//  -"     "-
// /         \
// |----A----|
// |    |    |
// |    |    |
// |    |-r->|
// |    |    |
// |    |    |
// |----B----|
// \         /
//  -.     .-
//    '---'
typedef struct ovrBoneCapsule_
{
	// Index of the bone this capsule is on.
	ovrHandBoneIndex 	BoneIndex;
	// Points at either end of the cylinder inscribed in the capsule. Also the center points for
	// spheres at either end of the capsule. Points A and B in the diagram above.
	ovrVector3f			Points[2];
	// The radius of the capsule cylinder and of the half-sphere caps on the ends of the capsule.
	float				Radius;
} ovrBoneCapsule;

Do we want to expose something like this?

@Manishearth Manishearth added the oculus-only Features only present in the Oculus API label Jan 3, 2020
@Manishearth
Copy link
Contributor Author

The bone capsule, as far as I can tell, is something you can theoretically derive by computing poses between spaces. So I don't think we have to expose it, but when available it might make things faster.

@leweaver
Copy link

Some context on the capsules from the Oculus API standpoint. We provide the capsules since they can't all be calculated from the bone positions & radius values. For instance the palm is actually represented by 4 capsules with translation offsets from the wrist, to represent a larger surface.

See attached images for reference; you can (just about) see that the palm consists of several capsules that are parallel; and their wrist ends don't line up with any bones.

If capsules are to be exposed from webxr hands, I'd suggest allowing multiple capsules to be defined per bone to allow this behavior.

hand-bones
hand-capsules

@Manishearth
Copy link
Contributor Author

Is there a reason they're offset that way? Is this to provide a useful approximation to a hand mesh?

@leweaver
Copy link

The capsules are more of a physics engine helper. While Microsoft's OpenXR extension does define additional bones at the base of the wrist that would serve as a good substitute for the palm; our thumb capsule is offset slightly to better account for webbing between index and thumb.

@Manishearth
Copy link
Contributor Author

Hmm, seems like an Oculus implementation could similarly expose additional metacarpal joints instead of using a bone capsule here?

Ideally we'd also have hand mesh tracking as a spec but i'm not working on that right now (i'm interested in seeing it though!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oculus-only Features only present in the Oculus API
Projects
None yet
Development

No branches or pull requests

2 participants