mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
made all changes except those to AvatarData toByteArray function also to do: verify that transientBlendshapes are set to 0 in headData simulate when there are blendshapes from script but no face tracker present
This commit is contained in:
parent
3bda5bf6a0
commit
01848fafe0
2 changed files with 21 additions and 11 deletions
|
@ -51,7 +51,7 @@ void MyHead::simulate(float deltaTime) {
|
|||
_isFaceTrackerConnected = hasActualFaceTrackerConnected || _owningAvatar->getHasScriptedBlendshapes();
|
||||
if (_isFaceTrackerConnected) {
|
||||
if (hasActualFaceTrackerConnected) {
|
||||
_transientBlendshapeCoefficients = faceTracker->getBlendshapeCoefficients();
|
||||
_blendshapeCoefficients = faceTracker->getBlendshapeCoefficients();
|
||||
} else {
|
||||
_transientBlendshapeCoefficients.fill(0, _blendshapeCoefficients.size());
|
||||
}
|
||||
|
|
|
@ -148,18 +148,28 @@ void Head::simulate(float deltaTime) {
|
|||
}
|
||||
|
||||
// use data to update fake Faceshift blendshape coefficients
|
||||
calculateMouthShapes(deltaTime);
|
||||
if (getHasAudioEnabledFaceMovement()) {
|
||||
calculateMouthShapes(deltaTime);
|
||||
} else {
|
||||
_audioJawOpen = 0.0f;
|
||||
_browAudioLift = 0.0f;
|
||||
_mouth2 = 0.0f;
|
||||
_mouth3 = 0.0f;
|
||||
_mouth4 = 0.0f;
|
||||
_mouthTime = 0.0f;
|
||||
}
|
||||
FaceTracker::updateFakeCoefficients(_leftEyeBlink,
|
||||
_rightEyeBlink,
|
||||
_browAudioLift,
|
||||
_audioJawOpen,
|
||||
_mouth2,
|
||||
_mouth3,
|
||||
_mouth4,
|
||||
_transientBlendshapeCoefficients);
|
||||
|
||||
applyEyelidOffset(getOrientation());
|
||||
_rightEyeBlink,
|
||||
_browAudioLift,
|
||||
_audioJawOpen,
|
||||
_mouth2,
|
||||
_mouth3,
|
||||
_mouth4,
|
||||
_transientBlendshapeCoefficients);
|
||||
|
||||
if (getHasProceduralEyeFaceMovement()) {
|
||||
applyEyelidOffset(getOrientation());
|
||||
}
|
||||
} else {
|
||||
_saccade = glm::vec3();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue