You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the OnApplyBlendShapes() method, I noticed that you compute the final weight value as follows:
Since maxWeight, weight and volume 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 the OnApplyBlendShapes(), in this way:
weight += bs.weight * bs.maxWeight * volume * 100;
if (useNormalizedBlendShapeWeights) weight /= 100f; // Keep weight normalized between 0 and 1
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:
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!
I've made it possible to set the maximum value for BlendShape values to make it more versatile. By default, this is set to 100, so please try setting it to 1.
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: