mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:28:09 +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();
|
_isFaceTrackerConnected = hasActualFaceTrackerConnected || _owningAvatar->getHasScriptedBlendshapes();
|
||||||
if (_isFaceTrackerConnected) {
|
if (_isFaceTrackerConnected) {
|
||||||
if (hasActualFaceTrackerConnected) {
|
if (hasActualFaceTrackerConnected) {
|
||||||
_transientBlendshapeCoefficients = faceTracker->getBlendshapeCoefficients();
|
_blendshapeCoefficients = faceTracker->getBlendshapeCoefficients();
|
||||||
} else {
|
} else {
|
||||||
_transientBlendshapeCoefficients.fill(0, _blendshapeCoefficients.size());
|
_transientBlendshapeCoefficients.fill(0, _blendshapeCoefficients.size());
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,18 +148,28 @@ void Head::simulate(float deltaTime) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// use data to update fake Faceshift blendshape coefficients
|
// 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,
|
FaceTracker::updateFakeCoefficients(_leftEyeBlink,
|
||||||
_rightEyeBlink,
|
_rightEyeBlink,
|
||||||
_browAudioLift,
|
_browAudioLift,
|
||||||
_audioJawOpen,
|
_audioJawOpen,
|
||||||
_mouth2,
|
_mouth2,
|
||||||
_mouth3,
|
_mouth3,
|
||||||
_mouth4,
|
_mouth4,
|
||||||
_transientBlendshapeCoefficients);
|
_transientBlendshapeCoefficients);
|
||||||
|
|
||||||
applyEyelidOffset(getOrientation());
|
|
||||||
|
|
||||||
|
if (getHasProceduralEyeFaceMovement()) {
|
||||||
|
applyEyelidOffset(getOrientation());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
_saccade = glm::vec3();
|
_saccade = glm::vec3();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue