webxr-input-profiles icon indicating copy to clipboard operation
webxr-input-profiles copied to clipboard

[Documentation] Unclear why controller glb models all look backwards

Open hybridherbst opened this issue 2 years ago • 2 comments

After looking at the GLB files and the Readme for creating them, I think it's unclear why the GLB files are all reversed (they all look "backwards" with the forward axis not pointing along the imagined controller ray but away from it).

The gltf 2.0 spec defines +Z as forward, so the model is backwards everywhere:

"Front" view in Blender image

"Back" view in Blender image

Threejs Editor image

Is this a relic from gltf 1.0 where -Z was forward? Or is there another reason? In any way, it would be great if that was documented (or the documentation in a more obvious place, I couldn't find it).

hybridherbst avatar Dec 17 '21 12:12 hybridherbst

It's because +Z is backwards when talking about XR grip spaces: https://immersive-web.github.io/webxr/#dom-xrinputsource-gripspace, and these models apply there

Manishearth avatar Dec 17 '21 13:12 Manishearth

Thanks for that link. It doesn't necessarily explain why the models are backwards in the GLTF format (contrary to what would be forward in that format) - it could also be that they are forward and then rotated accordingly, depending on what other format the models might be coming from. Just saying that this is confusing, not that it's wrong - and that it would be great if it could be documented in this repo here for preparing the models better (e.g. explicitly calling out that there's an assumption that model coordinates are in grip space when they are defined in gltf, contrary to the gltf spec).

hybridherbst avatar Dec 17 '21 18:12 hybridherbst