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
Indicating how to render an input source model #336
Comments
You mentioned that one tension with Gamepad's To break out of that here and help with normalization, perhaps we just double down on the purpose of this attribute being specifically for render model lookup in a CDN or other asset library. Especially if we intend to return null or empty string when the controller can be seen, apps can't count on this name to be a human-readable source name to show in a list, since on AR headsets you'd get no string for the list. Therefore, we can go all the way in picking a canonical naming pattern here that optimizes for lookup without being human-readable. Strawman suggestion:
If we can agree across vendors that a controller with a given VID+PID+handedness will always have the same physical form (we've committed to this for Windows MR controllers), this could provide a reliable id by which to index into a CDN to find a left and right render model. For today's WebVR input, Since the new simplified input model pares all of this back to just select events, apps won't be able to fully articulate the render model yet anyway, and so a CDN would just need to establish a common format for a model with its origin at gripMatrix that can perhaps articulate its |
Thanks, Brandon and Alex, happy to see movement in the right direction ;) I like the idea with "" identifier (without a dash, case insensitive too). It will not reduce fingerprinting, but it will eliminate the issue we recently had, when accidentally the name of the controller was changed from "Gear VR controller" to "GearVR controller" and some frameworks stopped working with it in our browser. |
Related to issue #392 |
May I add that there may be multiple permutations of meshes representing a single physical. In particular, there may be a representation of a users’ hand (eg with Oculus touch), another representing just the controller, and perhaps one with both combined. Perhaps various LOD levels may be needed in the case where a multi user environment includes representation of the controllers or hands from other users on the network. Expressing the whole taxonomy in a single string could lead to something like the X logical font description string, which IMHO is a bit confusing: https://wiki.archlinux.org/index.php/X_Logical_Font_Description To ensure that this is extensible, could the Gamepad.id rather reference a json formatted file unique to each vendor+device combo? In addition to providing the metadata informing the selection of a model to display, perhaps the json file could also assist in mapping input axis/button indices to bone transforms / slerps for articulated skinned mesh models. |
Issue of HOW the models are selected is resolved: It will be communicated via the |
The topic of how/if we indicate to developers what to render for handheld input sources has come up repeatedly. (For example, see comments from @Artyom17 here and @leweaver here
It was previously my feeling that we should omit any information about controller models for V1 of the API and try to address it more robustly in a followup. But Lewis' prototype revealed and interesting quirk in that AR headsets like HoloLens may need to expose as
'hand'
input source that has a validgripMatrix
, and yet not want a generic controller model rendered over the top of the user's actual hand. This makes a lot of sense, and it's probably best to address that scenario early.We could easily handle that specific case with a
renderable
boolean on theXRInputSource
. However since we know that the request to give some sort of indication of the controller type is a popular one it may make more sense to address both cases with a single mechanism.It would be nice to expose a renderable mesh directly to the page, but there's significant logistical issues to doing so. Where do the meshes come from? What format is it delivered in? How should it be animated? Etc. It seems more realistic to instead expose some form of well-formatted ID to indicate what type of device, if any, should be rendered.
In WebVR the Gamepad
id
served this purpose, but there were several issues that made it difficult to use:If we're going to expose something similar we can and should do better.
For the sake of discussion I'm going to assume that we'd expose a 'renderModelName' string attribute on
XRInputSource
. (Name subject to bikeshedding) I'd propose that it have the following properties:XRInputSource
orXRInputPose
. Specifically, something like handedness should be omitted. (So 'oculus, touch' rather than 'oculus, left touch' even though the left and right controllers are different devices with different meshes.)The end goal being to make it as practical as possible for developers to maintain a CDN of controller meshes that work cross-browser.
Also, this is prime fingerprinting material, so we'd want to take steps to mitigate that. To that end I think we should enforce that
XRInputSources
are only allowed to have arenderModelName
of empty string orunknown
in a non-exclusive session. That way there's at least a requirement that the page have been given a user gesture before it can start delivering fingerprintable information. And if there was a particular browser that was still concerned about exposing that information they could easily report empty string or 'unknown' in all cases.That's my initial thoughts on the matter, curious what others think and if anyone has more concrete suggestions for ensuring stable controller names across implementations.
The text was updated successfully, but these errors were encountered: