mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 06:51:15 +02:00
Use BrowsC_U to control both brows' up and down
This commit is contained in:
parent
dd678dbc49
commit
1b34b80b1a
1 changed files with 6 additions and 10 deletions
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue