-
Notifications
You must be signed in to change notification settings - Fork 128
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
Possible fix to include normalized BlendShape weights #63
Comments
Sorry for the delayed response, and thank you for your feedback and for diving into the code! I primarily work with avatars that use a 0 to 100 scale for blendshape weights, which is why the script is designed that way. However, I understand the need for compatibility with avatars that use normalized 0 to 1 values, like the one from ReadyPlayerMe. Your suggestion to add an option to use normalized blendshape weights makes perfect sense, and I'll definitely consider implementing a feature to support both types of avatars. Your input is very valuable in making the tool more versatile and user-friendly. Thanks again! |
Hi @hecomi!
Thank you for this useful and well made tool. While trying to use it for my application, when I first tested it the result on my avatar was, lets say, "overshooted"! Looking at your
uLipSyncBlendShape
code, specifically theOnApplyBlendShapes()
method, I noticed that you compute the final weight value as follows:Since
maxWeight
,weight
andvolume
should be normalized values between 0 and 1, the output weight you are providing is in the form of a percentage (from 0 to 100). At least for the avatar that I'm currently using, taken from ReadyPlayerMe tool, it seems that the blendshape weights for the SkinnedMeshRenderer are meant to be normalized values, between 0 and 1. That is why the first test of the tool applied to my avatar results in a deformed and "broken" mesh.To fix this, I simply added another serialized bool to your script, called
useNormalizedBlendShapeWeights
, and I added a simple line of code in theOnApplyBlendShapes()
, in this way:Please let me know if this fix actually makes sense to you! I hope that this could help improve compatibility with more types of avatars.
Thanks again!
The text was updated successfully, but these errors were encountered: