Skip to content

Commit

Permalink
Make ftMouthOpen react to seperation of lips
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl committed May 1, 2023
1 parent 8bc6047 commit 0fb87f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions source/ft/adaptors/ifacialmocap.d
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ public:

// Avg out the different ways of opening the mouth
(
((this.blendshapes["mouthLowerDown_L"]+this.blendshapes["mouthLowerDown_R"])/2) +
((this.blendshapes["mouthUpperUp_L"]+this.blendshapes["mouthUpperUp_R"])/2)
((this.blendshapes["mouthLowerDown_L"]+this.blendshapes["mouthUpperUp_L"])/2) +
((this.blendshapes["mouthLowerDown_R"]+this.blendshapes["mouthUpperUp_R"])/2)
),
0,
1
Expand Down
15 changes: 7 additions & 8 deletions source/ft/adaptors/vtsproto.d
Original file line number Diff line number Diff line change
Expand Up @@ -382,17 +382,16 @@ public:
this.blendshapes[BlendshapeNames.ftEyeWidenRight] = this.blendshapes["EyeWideRight"];

// MOUTH
this.blendshapes[BlendshapeNames.ftMouthOpen] = (
this.blendshapes[BlendshapeNames.ftMouthOpen] = clamp(

// Avg out the different ways of opening the mouth
(
(this.blendshapes["JawOpen"]-this.blendshapes["MouthClose"]) +
((this.blendshapes["MouthLowerDownLeft"]+this.blendshapes["MouthLowerDownRight"])/2) +
((this.blendshapes["MouthUpperUpLeft"]+this.blendshapes["MouthUpperUpRight"])/2)
)/3

// Sensitivity gets kind of low so we adjust it here.
)*2;
((this.blendshapes["MouthLowerDownLeft"]+this.blendshapes["MouthUpperUpLeft"])/2) +
((this.blendshapes["MouthLowerDownRight"]+this.blendshapes["MouthUpperUpRight"])/2)
),
0,
1
);

this.blendshapes[BlendshapeNames.ftMouthX] = (1 + this.blendshapes["MouthLeft"]-this.blendshapes["MouthRight"]) / 2.0;
this.blendshapes[BlendshapeNames.ftMouthEmotion] = (
Expand Down

0 comments on commit 0fb87f7

Please sign in to comment.