-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Update WebXR hands examples with new assets #21743
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
Conversation
|
Um, it seems #21712 also tries to fix this issue. |
|
Ah! I hadn't noticed that. So on a quick review, their PR has additional samples that seem like they could be nice, as well as a couple new variants of the HandMesh object which I'm not really clear on the purpose of and aren't explained in the PR. Seems like potentially a more complete solution. This one uses slightly modified version of the same hand assets that matches what's in the webxr-input-profiles repo and can pull it from a CDN if needed. The changes to that asset also make the skinning logic a bit simpler as the name of the bones matches the names exposed by the API so it gets rid of one level of indirection. Also their code still has some scaling in it that should no longer be necessary with the updated assets. Seems like the optimal solution would be to have #21712 update the .glb assets to the newest ones from webxr-input-profiles and make the necessary changes/simplifications to their new loaders. |
| light.position.set( 0, 6, 0 ); | ||
| light.castShadow = true; | ||
| // Prevent shadow acne on the hands | ||
| light.shadow.bias = -0.0001; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My solution was to force set material.side to THREE.FrontSide.:
| mesh.material.side = 0; // Workaround: force FrontSide |
@toji Any reason the models are double sided?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, there's not. Thanks for pointing that out. I'll fix the meshes and push them to the webxr-input-profiles CDN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet! Let me know when you do that so I can remove the workaround.
|
Thanks! Glad this proved useful! Just tested dev branch in my Quest and it's working great! The new button example is especially fun. |
Related issue: #21666
Fixes unspeakable horrors caused by using the previous hand meshes with conformant WebXR implementations.
This replaces the FBX hand meshes with the generic-hand glTF assets from the webxr-input-profiles repo (provided by Oculus). Currently I have those assets included as part of this PR, but we could also simply point at the webxr-input-profiles CDN for them as we do with other WebXR controllers.
In the process of changing the assets we've been able to make several improvements. The bone names for the meshes now match the joint names reported by the API, making it easier to correlate them and removing a fair amount of code in the process. Also the meshes are appropriately scaled now, so that the previous scaling up/down by 100x is no longer needed. Also, the new assets are only ~40% the size of the old ones, allowing them to load significantly faster!
We do lose the "Low poly" option with this switch, but the assets as provided are low poly enough that I can't imagine any device that is capable of hand tracking struggling to render them.