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

Add support for Logitech MX Ink #265

Merged
merged 3 commits into from
Sep 9, 2024
Merged

Conversation

cabanier
Copy link
Member

@cabanier cabanier commented Sep 3, 2024

First pass at support for the MX Ink.
The model still needs to be opened in blender to adjust for the rest position and add the buttons names and animations.

@AdaRoseCannon
Copy link
Member

Thank you for doing this so quickly!

It should probably be none.glb handed rather than right.glb

@cabanier
Copy link
Member Author

cabanier commented Sep 3, 2024

Thank you for doing this so quickly!

It should probably be none.glb handed rather than right.glb

The pen is always surfaced as either left or right handed so I think this is correct.

@AdaRoseCannon
Copy link
Member

Could a user potentially have two, one in each hand?

@cabanier
Copy link
Member Author

cabanier commented Sep 3, 2024

Could a user potentially have two, one in each hand?

I don't think that is supported but I will ask

@cabanier
Copy link
Member Author

cabanier commented Sep 3, 2024

Also, note that the user can still hold the regular controller in their other hand.

@AdaRoseCannon
Copy link
Member

I think it could still be "none" because it appears that the model is still the same between hands and the input profile. Is there some difference that means that we need to expose the handedness? It feels odd to me is all.

@cabanier
Copy link
Member Author

cabanier commented Sep 3, 2024

I think it could still be "none" because it appears that the model is still the same between hands and the input profile. Is there some difference that means that we need to expose the handedness? It feels odd to me is all.

The name in this directory corresponds with the "handedness" attribute of the inputSource. Since that will never be none, I don't think I need to provide that file.

@toji
Copy link
Member

toji commented Sep 4, 2024

Ada is right: If it's the same mesh that's used in both hands you can upload it as 'none.glb' and specify in the JSON that it's used for either hand. It'll still come through with the appropriate handedness in-app. See the HTC Vive asset for an example of how this works.

And yes, thanks for getting this up!

@AdaRoseCannon
Copy link
Member

This looks good to me!

@cabanier cabanier merged commit 601f7a2 into immersive-web:main Sep 9, 2024
1 check failed
@cabanier cabanier deleted the mx-ink branch September 9, 2024 20:21
@cabanier
Copy link
Member Author

cabanier commented Sep 9, 2024

@AdaRoseCannon @toji note that the model still needs to be optimized in blender to show the animations and the correct default position.

@AdaRoseCannon
Copy link
Member

I think it can't find the path:

image

I think you might need the override as described here: https://github.com/immersive-web/webxr-input-profiles/tree/601f7a2e0e6956ce431cf2e38c10b33e3e65eb34/packages/assets/tutorial#add-a-profilejson

@ferminLR
Copy link
Contributor

@cabanier I have prepared a model with the correct position and the buttons animations; but I am not sure which component is which button, apart from the obvious like tip-force. I tried to figure out which one is which using a Quest3, but the profile I get when connecting the stylus is still meta-quest-touch-plus. Can you help me with this? Whenever I get to know the buttons ids, I'll make a PR with the model in no time.

@AdaRoseCannon the viewer can't find the path because by default it tries to load the left hand model; you just have to select none in the dropdown menu on the right.

@cabanier
Copy link
Member Author

@cabanier I have prepared a model with the correct position and the buttons animations;

Thank you so much! that is awesome.

but I am not sure which component is which button, apart from the obvious like tip-force. I tried to figure out which one is which using a Quest3, but the profile I get when connecting the stylus is still meta-quest-touch-plus. Can you help me with this? Whenever I get to know the buttons ids, I'll make a PR with the model in no time.

Unfortunately, you need v69 of the OS and Browser 35.0 to get proper support.
I'd be happy to try it out and post a recording of your model.

gamepad 0 = front button (close to tip) only click - needs animation
gamepad 1 = back button (next to front button and touch area) only click - needs animation
gamepad 2 = unused
gamepad 3 = unused
gamepad 4 = tip (only force)
gamepad 5 = touch area between buttons
gamepad 6 = "docked" status.

@ferminLR
Copy link
Contributor

Thanks for your rapid response @cabanier! I just made the PR #266.

Just one thing, according to the profile:

      "gamepad": {
        "mapping": "xr-standard",
        "buttons": [
          "xr-standard-trigger",
          "xr-standard-squeeze",
          null,
          null,
          "touch-pad",
          "tip-force",
          "docked"
        ],
        "axes": []
      }

The touch-pad is in gamepad 4 and tip-force in gamepad 5, instead of them being swapped as you said; I guess the correct way is the one from the profile and your list had a typo, so I made the model considering that.

Let me know if you find any errors and I'll update the model.

Unfortunately, you need v69 of the OS and Browser 35.0 to get proper support.

I am on v69 PTC but can't update the Browser to 35.0. Not sure if there's a program to access beta versions of the browser.

@cabanier
Copy link
Member Author

The touch-pad is in gamepad 4 and tip-force in gamepad 5, instead of them being swapped as you said; I guess the correct way is the one from the profile and your list had a typo, so I made the model considering that.

Yes, my list had a typo. Sorry about that!

Unfortunately, you need v69 of the OS and Browser 35.0 to get proper support.

I am on v69 PTC but can't update the Browser to 35.0. Not sure if there's a program to access beta versions of the browser.

I can send you a private build to try. Are you on the WebXR Discord? If so, you can dm me there at @rc

@ferminLR
Copy link
Contributor

@AdaRoseCannon the viewer can't find the path because by default it tries to load the left hand model; you just have to select none in the dropdown menu on the right.

I was wrong, the model should appear no matter which handedness you choose in the viewer. The error appears because the left and right models aren't properly linked with the node.glb file. Fixed in #266.

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

Successfully merging this pull request may close these issues.

4 participants