Use BrowsC_U to control both brows' up and down

This commit is contained in:
David Rowe 2015-03-03 11:05:59 -08:00
parent dd678dbc49
commit 1b34b80b1a

View file

@ -273,6 +273,12 @@ void DdeFaceTracker::decodePacket(const QByteArray& buffer) {
_coefficients[_rightEyeOpenIndex] = RELAXED_EYE_VALUE - rightEye;
}
// Use BrowsU_C to control both brows' up and down
_coefficients[_browDownLeftIndex] = -_coefficients[_browUpCenterIndex];
_coefficients[_browDownRightIndex] = -_coefficients[_browUpCenterIndex];
_coefficients[_browUpLeftIndex] = _coefficients[_browUpCenterIndex];
_coefficients[_browUpRightIndex] = _coefficients[_browUpCenterIndex];
// Offset jaw open coefficient
static const float JAW_OPEN_THRESHOLD = 0.16f;
_coefficients[_jawOpenIndex] = _coefficients[_jawOpenIndex] - JAW_OPEN_THRESHOLD;
@ -290,16 +296,6 @@ void DdeFaceTracker::decodePacket(const QByteArray& buffer) {
_previousCoefficients[i] = _coefficients[i];
}
// Postcondition brow coefficients
if (_blendshapeCoefficients[_browUpCenterIndex] > 0) {
_blendshapeCoefficients[_browDownLeftIndex] = 0.0f;
_blendshapeCoefficients[_browDownRightIndex] = 0.0f;
} else {
_blendshapeCoefficients[_browUpCenterIndex] = 0.0f;
_blendshapeCoefficients[_browUpLeftIndex] = 0.0f;
_blendshapeCoefficients[_browUpRightIndex] = 0.0f;
}
} else {
qDebug() << "[Error] DDE Face Tracker Decode Error";
}