Skip to content

Conversation

@keveleigh
Copy link
Contributor

@keveleigh keveleigh commented Mar 14, 2025

No change to rigged hands:
{CBB528F2-8BD5-47AF-85D5-E9901F7B53E2}

But support is added for platform hand meshes via XR_MSFT_hand_tracking_mesh:
{EAF63092-09A6-4CF7-B73A-E6038E1207AF}

Follow-up: #1020

@keveleigh keveleigh self-assigned this Mar 14, 2025
@keveleigh keveleigh force-pushed the platform-hand-mesh branch 2 times, most recently from cdbea90 to f39667a Compare March 18, 2025 18:59
@keveleigh keveleigh changed the base branch from main to feature/XRI3 March 18, 2025 18:59
@keveleigh keveleigh changed the title Add support for XR_MSFT_hand_tracking_mesh Add support for XR_MSFT_hand_tracking_mesh and XR_ANDROID_hand_mesh Mar 19, 2025
@keveleigh keveleigh marked this pull request as ready for review March 19, 2025 16:29
@keveleigh keveleigh requested a review from a team as a code owner March 19, 2025 16:29
@keveleigh keveleigh closed this Mar 20, 2025
@keveleigh keveleigh reopened this Mar 20, 2025
@keveleigh keveleigh force-pushed the platform-hand-mesh branch from 9c3a4e2 to d147fb1 Compare March 21, 2025 16:07
@keveleigh keveleigh force-pushed the platform-hand-mesh branch 2 times, most recently from 34ae37f to 5ed65a5 Compare March 28, 2025 23:33
Copy link
Contributor

@MaxPalmer-UH MaxPalmer-UH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made some comments based on the code review.

@MaxPalmer-UH
Copy link
Contributor

Still need to test this but have made some comments based on reviewing the code.

@keveleigh keveleigh force-pushed the platform-hand-mesh branch from c9bc683 to 9eb5771 Compare April 10, 2025 16:18
@Cameron-Micka
Copy link

Hey @keveleigh, this is super cool! I think I see two issues with the android hand mesh. Both of these issues are because the existing hand mesh's vertex colors drive certain effects - and we don't have these vertex colors anymore.

(1) We lost the wrist fade - the hand is rendered in 3 steps (with 3 different shaders). If you look at the second step the wrist fade is controlled by the red channel of the hand model's vertex color (this line). The new hand model doesn't have this info. We could try and get an artist to supply it.

Or... I recently had to fix a similar issue and went down the programmatic approach.
What I did is created a component that passes a sphere into the shader at the wrist's location (if the hand isn't rigged and skinned this is even easier, you just pass a constant sphere position and radius into the shader) then in the shader do a fade based on pixel's distance from the sphere:
image

(2) We lost the outline around the hand - plus pinch outline animation. Similar issue to above, the outline is rendered in the third render pass and is controlled by the green channel of the vertex color (this line). This is a bit harder to fix. You could just go down the route of making the outline a constant width (ignore the vertex color). You lose the pinch animation but still get a nice looking outline. Or you will need to programmatically specify which vertices get outline more when pinching (make a sphere around the joints that pinch?) or have an artist paint in those vertex colors.

@MaxPalmer-UH
Copy link
Contributor

MaxPalmer-UH commented Apr 11, 2025

Hi @keveleigh, I'm having some issues trying to test this. I've pulled your repo/branch and am not certain which non MRTK packages / versions I need to expose this functionality for both OpenXR features: XR_MSFT_hand_tracking_mesh and XR_ANDROID_hand_mesh. I have added an openxr_left/right_hand.prefab from the MRTK Input package and can see that it has a PlatformHandMesh GameObject, but the MeshFilter mesh is set to None. What's meant to set that up (should it be unassigned by default?) I feel I'm missing a step. Also, will be away next week so will get back to this the following week.

image

@MaxPalmer-UH
Copy link
Contributor

Oh, also I can't see a Changelog entry for this change.

@keveleigh keveleigh force-pushed the platform-hand-mesh branch from aa13212 to 3a5227e Compare April 11, 2025 17:18
@keveleigh keveleigh marked this pull request as draft April 11, 2025 20:45
@keveleigh
Copy link
Contributor Author

Hey @keveleigh, this is super cool! I think I see two issues with the android hand mesh. Both of these issues are because the existing hand mesh's vertex colors drive certain effects - and we don't have these vertex colors anymore.

Thank you so much for your feedback, @Cameron-Micka! I just went down your suggested programmatic path for fading the wrist based on a sphere (left hand is rigged, right hand is platform):

{57501B69-A0A8-4F46-8DD2-A06A14C30275}

It's not identical, but it seems to work reasonably well, and we can continue iterating.
I'm currently looking into the outline issue.

@keveleigh
Copy link
Contributor Author

Oh, also I can't see a Changelog entry for this change.

@MaxPalmer-UH Added!

@keveleigh
Copy link
Contributor Author

Hey @keveleigh, this is super cool! I think I see two issues with the android hand mesh. Both of these issues are because the existing hand mesh's vertex colors drive certain effects - and we don't have these vertex colors anymore.

Thank you so much for your feedback, @Cameron-Micka! I just went down your suggested programmatic path for fading the wrist based on a sphere (left hand is rigged, right hand is platform):

{57501B69-A0A8-4F46-8DD2-A06A14C30275}

It's not identical, but it seems to work reasonably well, and we can continue iterating. I'm currently looking into the outline issue.

I have now restored the outline! (once again, left hand is rigged, right hand is platform):

{624BC028-170C-4496-AAEF-C33D08A0C76A}

The pinch highlight is currently the entire hand, but it'll take some time to find a solution there:

{703777D7-4238-4205-8F36-BA652498DD05}

@keveleigh keveleigh marked this pull request as ready for review April 23, 2025 03:03
@Cameron-Micka
Copy link

Hey @keveleigh, this is super cool! I think I see two issues with the android hand mesh. Both of these issues are because the existing hand mesh's vertex colors drive certain effects - and we don't have these vertex colors anymore.

Thank you so much for your feedback, @Cameron-Micka! I just went down your suggested programmatic path for fading the wrist based on a sphere (left hand is rigged, right hand is platform):
{57501B69-A0A8-4F46-8DD2-A06A14C30275}
It's not identical, but it seems to work reasonably well, and we can continue iterating. I'm currently looking into the outline issue.

I have now restored the outline! (once again, left hand is rigged, right hand is platform):

{624BC028-170C-4496-AAEF-C33D08A0C76A}

The pinch highlight is currently the entire hand, but it'll take some time to find a solution there:

{703777D7-4238-4205-8F36-BA652498DD05}

Awesome, looking great @keveleigh!

Copy link
Contributor

@whitetigerhelix whitetigerhelix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg2me

There are some comments by Max that still look unresolved. It would be good to get his approval on this PR also.

@keveleigh keveleigh force-pushed the platform-hand-mesh branch 2 times, most recently from 509953d to 24ddd36 Compare May 2, 2025 21:46
@keveleigh keveleigh added Platform: OpenXR An issue or discussion topic related to OpenXR Platform: Snapdragon Spaces An issue or discussion topic related to Snapdragon Spaces Platform: Android XR An issue or discussion topic related to Android XR labels Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Branch: feature/XRI3 Platform: Android XR An issue or discussion topic related to Android XR Platform: OpenXR An issue or discussion topic related to OpenXR Platform: Snapdragon Spaces An issue or discussion topic related to Snapdragon Spaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants