Add optional Face Expression OSC helper output#359
Open
0suu wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
2026-06-15.22-38-34_1.mp4
Summary
This PR adds an optional Core-side OSC helper that classifies calibrated facial expression patterns from Unified Expressions and exposes the result as avatar parameters.
It is intended as an opt-in avatar helper output built from the user's calibrated facial expression templates.
Why calibration is required
This helper uses calibration instead of a fixed rule-based mapping because face tracking behavior and intended avatar expressions can vary by user and avatar. Calibration lets the user define which facial pattern should map to each helper expression, instead of assuming one universal expression mapping.
What changed
Face Expression OSC Outputpostprocessor mutation./avatar/parameters/v2/FaceExpressionIndex/avatar/parameters/v2/FaceExpressionPowerBehavior
Expression index values are:
0= Neutral1= Joy2= Angry3= Sad4= SurpriseSupporting changes
This PR also includes mutation UI infrastructure changes needed by the new calibration controls.
Mutation UI components are now created and refreshed through the UI dispatcher so stateful mutation controls, such as calibration status and button enabled/text updates, are marshalled back to the UI thread.
Mutation loading is now awaitable during startup, and each mutation is initialized before it is added to the active mutation collection. This avoids OSC updates observing partially loaded or uninitialized mutations during startup.
Notes
The helper parameters currently use
v2/FaceExpressionIndexandv2/FaceExpressionPower. I would appreciate feedback on whether these names fit the existing v2 parameter naming scheme, or if a different naming convention would be preferred.This PR extends the mutation UI support layer because the calibration workflow needs to display current calibration state, button text, and enabled/disabled state dynamically. I kept the new components generic (
MutationInfo,MutationStatus,MutationStatusAction) instead of making them face-expression-specific, and would appreciate feedback on whether this is the right level of abstraction for the project.Related to #358.