-
Notifications
You must be signed in to change notification settings - Fork 107
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
Incorrect override amounts when using binary expressions #1484
Comments
Woow, that is a factor I haven't considered in the spec layer; thank you. |
A comparison of binary expressions with texture transform binds and "blend" lookAt overrides:
Notice before how when lookLeft is applied, texture transforms on the blink expression apply smoothly instead of a sharp binary change, which breaks the use case of expression textures. |
Thank you for the detailed explanation! We are currently discussing the behavior with the VRM spec team. I'm 90% confident that we can fix it in the desired way, but we must ensure that the behavior can be described as a spec without confusion before we apply this in our implementation. |
It's about interaction between isBinary and override expressions See the discussion: #1484 Also add a test of VRMExpression to confirm the desired behavior
…e interacts each other - The original discussion: pixiv/three-vrm#1484 - The implementation example on three-vrm: pixiv/three-vrm#1489 TODO: english translation
When an expression is set to binary with
isBinary: true
, and these expressions also have blended overrides (e.g.overrideLookAt: "blend"
), their weight is blended continuously instead of discretely when the corresponding expression group (e.g. gaze expression) has nonzero weight. I expect binary expressions to maintain the sharp 0.5 threshold whether using "blend" overrides or not.I believe this stems from the
overrideBlinkAmount
/overrideLookAtAmount
/overrideMouthAmount
calculations not taking into account theisBinary
flag, e.g.:three-vrm/packages/three-vrm-core/src/expressions/VRMExpression.ts
Lines 61 to 69 in 7a35f7e
Changing the expression in the 'blend' case to
this.isBinary ? (this.weight <= 0.5 ? 0.0 : 1.0) : this.weight
as is done elsewhere in the applyWeight logic produces the expected discrete blending behavior.I wonder if this also affects the 'block' override mode, as the binary expression will begin blocking as soon as it has nonzero weight, even though it doesn't visually apply that weight until after the 0.5 weight threshold. So perhaps the 'block' case should look more like:
The text was updated successfully, but these errors were encountered: