mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 09:18:45 +02:00
Fixed pole vectors on straight limbs by using reference vector
This commit is contained in:
parent
03a6f7082e
commit
10f94c2d60
6 changed files with 48 additions and 37 deletions
|
@ -87,7 +87,8 @@
|
||||||
"weightVar": "rightFootWeight",
|
"weightVar": "rightFootWeight",
|
||||||
"weight": 1.0,
|
"weight": 1.0,
|
||||||
"flexCoefficients": [1, 0.45, 0.45],
|
"flexCoefficients": [1, 0.45, 0.45],
|
||||||
"poleJointNameVar": "rightFootPoleJointName",
|
"poleVectorEnabledVar": "rightFootPoleVectorEnabled",
|
||||||
|
"poleReferenceVectorVar": "rightFootPoleReferenceVector",
|
||||||
"poleVectorVar": "rightFootPoleVector"
|
"poleVectorVar": "rightFootPoleVector"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -98,7 +99,8 @@
|
||||||
"weightVar": "leftFootWeight",
|
"weightVar": "leftFootWeight",
|
||||||
"weight": 1.0,
|
"weight": 1.0,
|
||||||
"flexCoefficients": [1, 0.45, 0.45],
|
"flexCoefficients": [1, 0.45, 0.45],
|
||||||
"poleJointNameVar": "leftFootPoleJointName",
|
"poleVectorEnabledVar": "leftFootPoleVectorEnabled",
|
||||||
|
"poleReferenceVectorVar": "leftFootPoleReferenceVector",
|
||||||
"poleVectorVar": "leftFootPoleVector"
|
"poleVectorVar": "leftFootPoleVector"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,13 +48,14 @@ float easeOutExpo(float t) {
|
||||||
|
|
||||||
AnimInverseKinematics::IKTargetVar::IKTargetVar(const QString& jointNameIn, const QString& positionVarIn, const QString& rotationVarIn,
|
AnimInverseKinematics::IKTargetVar::IKTargetVar(const QString& jointNameIn, const QString& positionVarIn, const QString& rotationVarIn,
|
||||||
const QString& typeVarIn, const QString& weightVarIn, float weightIn, const std::vector<float>& flexCoefficientsIn,
|
const QString& typeVarIn, const QString& weightVarIn, float weightIn, const std::vector<float>& flexCoefficientsIn,
|
||||||
const QString& poleJointNameVarIn, const QString& poleVectorVarIn) :
|
const QString& poleVectorEnabledVarIn, const QString& poleReferenceVectorVarIn, const QString& poleVectorVarIn) :
|
||||||
jointName(jointNameIn),
|
jointName(jointNameIn),
|
||||||
positionVar(positionVarIn),
|
positionVar(positionVarIn),
|
||||||
rotationVar(rotationVarIn),
|
rotationVar(rotationVarIn),
|
||||||
typeVar(typeVarIn),
|
typeVar(typeVarIn),
|
||||||
weightVar(weightVarIn),
|
weightVar(weightVarIn),
|
||||||
poleJointNameVar(poleJointNameVarIn),
|
poleVectorEnabledVar(poleVectorEnabledVarIn),
|
||||||
|
poleReferenceVectorVar(poleReferenceVectorVarIn),
|
||||||
poleVectorVar(poleVectorVarIn),
|
poleVectorVar(poleVectorVarIn),
|
||||||
weight(weightIn),
|
weight(weightIn),
|
||||||
numFlexCoefficients(flexCoefficientsIn.size()),
|
numFlexCoefficients(flexCoefficientsIn.size()),
|
||||||
|
@ -72,7 +73,8 @@ AnimInverseKinematics::IKTargetVar::IKTargetVar(const IKTargetVar& orig) :
|
||||||
rotationVar(orig.rotationVar),
|
rotationVar(orig.rotationVar),
|
||||||
typeVar(orig.typeVar),
|
typeVar(orig.typeVar),
|
||||||
weightVar(orig.weightVar),
|
weightVar(orig.weightVar),
|
||||||
poleJointNameVar(orig.poleJointNameVar),
|
poleVectorEnabledVar(orig.poleVectorEnabledVar),
|
||||||
|
poleReferenceVectorVar(orig.poleReferenceVectorVar),
|
||||||
poleVectorVar(orig.poleVectorVar),
|
poleVectorVar(orig.poleVectorVar),
|
||||||
weight(orig.weight),
|
weight(orig.weight),
|
||||||
numFlexCoefficients(orig.numFlexCoefficients),
|
numFlexCoefficients(orig.numFlexCoefficients),
|
||||||
|
@ -128,8 +130,8 @@ void AnimInverseKinematics::computeAbsolutePoses(AnimPoseVec& absolutePoses) con
|
||||||
|
|
||||||
void AnimInverseKinematics::setTargetVars(const QString& jointName, const QString& positionVar, const QString& rotationVar,
|
void AnimInverseKinematics::setTargetVars(const QString& jointName, const QString& positionVar, const QString& rotationVar,
|
||||||
const QString& typeVar, const QString& weightVar, float weight, const std::vector<float>& flexCoefficients,
|
const QString& typeVar, const QString& weightVar, float weight, const std::vector<float>& flexCoefficients,
|
||||||
const QString& poleJointNameVar, const QString& poleVectorVar) {
|
const QString& poleVectorEnabledVar, const QString& poleReferenceVectorVar, const QString& poleVectorVar) {
|
||||||
IKTargetVar targetVar(jointName, positionVar, rotationVar, typeVar, weightVar, weight, flexCoefficients, poleJointNameVar, poleVectorVar);
|
IKTargetVar targetVar(jointName, positionVar, rotationVar, typeVar, weightVar, weight, flexCoefficients, poleVectorEnabledVar, poleReferenceVectorVar, poleVectorVar);
|
||||||
|
|
||||||
// if there are dups, last one wins.
|
// if there are dups, last one wins.
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
@ -177,14 +179,15 @@ void AnimInverseKinematics::computeTargets(const AnimVariantMap& animVars, std::
|
||||||
target.setWeight(weight);
|
target.setWeight(weight);
|
||||||
target.setFlexCoefficients(targetVar.numFlexCoefficients, targetVar.flexCoefficients);
|
target.setFlexCoefficients(targetVar.numFlexCoefficients, targetVar.flexCoefficients);
|
||||||
|
|
||||||
// AJT: TODO: cache the pole joint index.
|
bool poleVectorEnabled = animVars.lookup(targetVar.poleVectorEnabledVar, false);
|
||||||
QString poleJointName = animVars.lookup(targetVar.poleJointNameVar, QString(""));
|
target.setPoleVectorEnabled(poleVectorEnabled);
|
||||||
int poleJointIndex = _skeleton->nameToJointIndex(poleJointName);
|
|
||||||
target.setPoleIndex(poleJointIndex);
|
|
||||||
|
|
||||||
glm::vec3 poleVector = animVars.lookupRigToGeometryVector(targetVar.poleVectorVar, Vectors::UNIT_Z);
|
glm::vec3 poleVector = animVars.lookupRigToGeometryVector(targetVar.poleVectorVar, Vectors::UNIT_Z);
|
||||||
target.setPoleVector(glm::normalize(poleVector));
|
target.setPoleVector(glm::normalize(poleVector));
|
||||||
|
|
||||||
|
glm::vec3 poleReferenceVector = animVars.lookupRigToGeometryVector(targetVar.poleReferenceVectorVar, Vectors::UNIT_Z);
|
||||||
|
target.setPoleReferenceVector(glm::normalize(poleReferenceVector));
|
||||||
|
|
||||||
targets.push_back(target);
|
targets.push_back(target);
|
||||||
|
|
||||||
if (targetVar.jointIndex > _maxTargetIndex) {
|
if (targetVar.jointIndex > _maxTargetIndex) {
|
||||||
|
@ -488,9 +491,8 @@ void AnimInverseKinematics::solveTargetWithCCD(const AnimContext& context, const
|
||||||
chainDepth++;
|
chainDepth++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target.getPoleIndex() != -1) {
|
if (target.getPoleVectorEnabled()) {
|
||||||
|
int topJointIndex = target.getIndex();
|
||||||
int topJointIndex = target.getPoleIndex();
|
|
||||||
int midJointIndex = _skeleton->getParentIndex(topJointIndex);
|
int midJointIndex = _skeleton->getParentIndex(topJointIndex);
|
||||||
if (midJointIndex != -1) {
|
if (midJointIndex != -1) {
|
||||||
int baseJointIndex = _skeleton->getParentIndex(midJointIndex);
|
int baseJointIndex = _skeleton->getParentIndex(midJointIndex);
|
||||||
|
@ -525,17 +527,16 @@ void AnimInverseKinematics::solveTargetWithCCD(const AnimContext& context, const
|
||||||
float dLen = glm::length(d);
|
float dLen = glm::length(d);
|
||||||
if (dLen > EPSILON) {
|
if (dLen > EPSILON) {
|
||||||
glm::vec3 dUnit = d / dLen;
|
glm::vec3 dUnit = d / dLen;
|
||||||
glm::vec3 e = midPose.trans() - basePose.trans();
|
glm::vec3 e = midPose.xformVector(target.getPoleReferenceVector());
|
||||||
glm::vec3 p = target.getPoleVector();
|
glm::vec3 p = target.getPoleVector();
|
||||||
glm::vec3 eProj = e - glm::dot(e, dUnit) * dUnit;
|
glm::vec3 eProj = e - glm::dot(e, dUnit) * dUnit;
|
||||||
glm::vec3 pProj = p - glm::dot(p, dUnit) * dUnit;
|
glm::vec3 pProj = p - glm::dot(p, dUnit) * dUnit;
|
||||||
float eProjLen = glm::length(eProj);
|
float eProjLen = glm::length(eProj);
|
||||||
float pProjLen = glm::length(pProj);
|
float pProjLen = glm::length(pProj);
|
||||||
const float MIN_E_PROJ_LEN = 0.2f; // cm
|
if (eProjLen > EPSILON && pProjLen > EPSILON) {
|
||||||
if (eProjLen > MIN_E_PROJ_LEN && pProjLen > EPSILON) {
|
|
||||||
|
|
||||||
// as eProjLen and pProjLen become orthognal to d, reduce the amount of rotation.
|
// as pProjLen become orthognal to d, reduce the amount of rotation.
|
||||||
float magnitude = easeOutExpo(glm::min(eProjLen, pProjLen));
|
float magnitude = easeOutExpo(pProjLen);
|
||||||
|
|
||||||
float dot = glm::clamp(glm::dot(eProj / eProjLen, pProj / pProjLen), 0.0f, 1.0f);
|
float dot = glm::clamp(glm::dot(eProj / eProjLen, pProj / pProjLen), 0.0f, 1.0f);
|
||||||
float theta = acosf(dot);
|
float theta = acosf(dot);
|
||||||
|
@ -558,7 +559,7 @@ void AnimInverseKinematics::solveTargetWithCCD(const AnimContext& context, const
|
||||||
AnimPose geomToWorldPose = AnimPose(context.getRigToWorldMatrix() * context.getGeometryToRigMatrix());
|
AnimPose geomToWorldPose = AnimPose(context.getRigToWorldMatrix() * context.getGeometryToRigMatrix());
|
||||||
|
|
||||||
glm::vec3 dUnit = d / dLen;
|
glm::vec3 dUnit = d / dLen;
|
||||||
glm::vec3 e = midPose.trans() - basePose.trans();
|
glm::vec3 e = midPose.xformVector(target.getPoleReferenceVector());
|
||||||
glm::vec3 p = target.getPoleVector();
|
glm::vec3 p = target.getPoleVector();
|
||||||
glm::vec3 eProj = e - glm::dot(e, dUnit) * dUnit;
|
glm::vec3 eProj = e - glm::dot(e, dUnit) * dUnit;
|
||||||
glm::vec3 pProj = p - glm::dot(p, dUnit) * dUnit;
|
glm::vec3 pProj = p - glm::dot(p, dUnit) * dUnit;
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
|
|
||||||
void setTargetVars(const QString& jointName, const QString& positionVar, const QString& rotationVar,
|
void setTargetVars(const QString& jointName, const QString& positionVar, const QString& rotationVar,
|
||||||
const QString& typeVar, const QString& weightVar, float weight, const std::vector<float>& flexCoefficients,
|
const QString& typeVar, const QString& weightVar, float weight, const std::vector<float>& flexCoefficients,
|
||||||
const QString& poleJointNameVar, const QString& poleVectorVar);
|
const QString& poleVectorEnabledVar, const QString& poleReferenceVectorVar, const QString& poleVectorVar);
|
||||||
|
|
||||||
virtual const AnimPoseVec& evaluate(const AnimVariantMap& animVars, const AnimContext& context, float dt, AnimNode::Triggers& triggersOut) override;
|
virtual const AnimPoseVec& evaluate(const AnimVariantMap& animVars, const AnimContext& context, float dt, AnimNode::Triggers& triggersOut) override;
|
||||||
virtual const AnimPoseVec& overlay(const AnimVariantMap& animVars, const AnimContext& context, float dt, Triggers& triggersOut, const AnimPoseVec& underPoses) override;
|
virtual const AnimPoseVec& overlay(const AnimVariantMap& animVars, const AnimContext& context, float dt, Triggers& triggersOut, const AnimPoseVec& underPoses) override;
|
||||||
|
@ -110,7 +110,7 @@ protected:
|
||||||
struct IKTargetVar {
|
struct IKTargetVar {
|
||||||
IKTargetVar(const QString& jointNameIn, const QString& positionVarIn, const QString& rotationVarIn,
|
IKTargetVar(const QString& jointNameIn, const QString& positionVarIn, const QString& rotationVarIn,
|
||||||
const QString& typeVarIn, const QString& weightVarIn, float weightIn, const std::vector<float>& flexCoefficientsIn,
|
const QString& typeVarIn, const QString& weightVarIn, float weightIn, const std::vector<float>& flexCoefficientsIn,
|
||||||
const QString& poleJointNameVar, const QString& poleVectorVar);
|
const QString& poleVectorEnabledVar, const QString& poleReferenceVectorVar, const QString& poleVectorVar);
|
||||||
IKTargetVar(const IKTargetVar& orig);
|
IKTargetVar(const IKTargetVar& orig);
|
||||||
|
|
||||||
QString jointName;
|
QString jointName;
|
||||||
|
@ -118,7 +118,8 @@ protected:
|
||||||
QString rotationVar;
|
QString rotationVar;
|
||||||
QString typeVar;
|
QString typeVar;
|
||||||
QString weightVar;
|
QString weightVar;
|
||||||
QString poleJointNameVar;
|
QString poleVectorEnabledVar;
|
||||||
|
QString poleReferenceVectorVar;
|
||||||
QString poleVectorVar;
|
QString poleVectorVar;
|
||||||
float weight;
|
float weight;
|
||||||
float flexCoefficients[MAX_FLEX_COEFFICIENTS];
|
float flexCoefficients[MAX_FLEX_COEFFICIENTS];
|
||||||
|
|
|
@ -479,7 +479,8 @@ AnimNode::Pointer loadInverseKinematicsNode(const QJsonObject& jsonObj, const QS
|
||||||
READ_OPTIONAL_STRING(typeVar, targetObj);
|
READ_OPTIONAL_STRING(typeVar, targetObj);
|
||||||
READ_OPTIONAL_STRING(weightVar, targetObj);
|
READ_OPTIONAL_STRING(weightVar, targetObj);
|
||||||
READ_OPTIONAL_FLOAT(weight, targetObj, 1.0f);
|
READ_OPTIONAL_FLOAT(weight, targetObj, 1.0f);
|
||||||
READ_OPTIONAL_STRING(poleJointNameVar, targetObj);
|
READ_OPTIONAL_STRING(poleVectorEnabledVar, targetObj);
|
||||||
|
READ_OPTIONAL_STRING(poleReferenceVectorVar, targetObj);
|
||||||
READ_OPTIONAL_STRING(poleVectorVar, targetObj);
|
READ_OPTIONAL_STRING(poleVectorVar, targetObj);
|
||||||
|
|
||||||
auto flexCoefficientsValue = targetObj.value("flexCoefficients");
|
auto flexCoefficientsValue = targetObj.value("flexCoefficients");
|
||||||
|
@ -493,7 +494,7 @@ AnimNode::Pointer loadInverseKinematicsNode(const QJsonObject& jsonObj, const QS
|
||||||
flexCoefficients.push_back((float)value.toDouble());
|
flexCoefficients.push_back((float)value.toDouble());
|
||||||
}
|
}
|
||||||
|
|
||||||
node->setTargetVars(jointName, positionVar, rotationVar, typeVar, weightVar, weight, flexCoefficients, poleJointNameVar, poleVectorVar);
|
node->setTargetVars(jointName, positionVar, rotationVar, typeVar, weightVar, weight, flexCoefficients, poleVectorEnabledVar, poleReferenceVectorVar, poleVectorVar);
|
||||||
};
|
};
|
||||||
|
|
||||||
READ_OPTIONAL_STRING(solutionSource, jsonObj);
|
READ_OPTIONAL_STRING(solutionSource, jsonObj);
|
||||||
|
|
|
@ -31,13 +31,15 @@ public:
|
||||||
const glm::quat& getRotation() const { return _pose.rot(); }
|
const glm::quat& getRotation() const { return _pose.rot(); }
|
||||||
const AnimPose& getPose() const { return _pose; }
|
const AnimPose& getPose() const { return _pose; }
|
||||||
glm::vec3 getPoleVector() const { return _poleVector; }
|
glm::vec3 getPoleVector() const { return _poleVector; }
|
||||||
int getPoleIndex() const { return _poleIndex; }
|
glm::vec3 getPoleReferenceVector() const { return _poleReferenceVector; }
|
||||||
|
bool getPoleVectorEnabled() const { return _poleVectorEnabled; }
|
||||||
int getIndex() const { return _index; }
|
int getIndex() const { return _index; }
|
||||||
Type getType() const { return _type; }
|
Type getType() const { return _type; }
|
||||||
|
|
||||||
void setPose(const glm::quat& rotation, const glm::vec3& translation);
|
void setPose(const glm::quat& rotation, const glm::vec3& translation);
|
||||||
void setPoleVector(const glm::vec3& poleVector) { _poleVector = poleVector; }
|
void setPoleVector(const glm::vec3& poleVector) { _poleVector = poleVector; }
|
||||||
void setPoleIndex(int poleIndex) { _poleIndex = poleIndex; }
|
void setPoleReferenceVector(const glm::vec3& poleReferenceVector) { _poleReferenceVector = poleReferenceVector; }
|
||||||
|
void setPoleVectorEnabled(bool poleVectorEnabled) { _poleVectorEnabled = poleVectorEnabled; }
|
||||||
void setIndex(int index) { _index = index; }
|
void setIndex(int index) { _index = index; }
|
||||||
void setType(int);
|
void setType(int);
|
||||||
void setFlexCoefficients(size_t numFlexCoefficientsIn, const float* flexCoefficientsIn);
|
void setFlexCoefficients(size_t numFlexCoefficientsIn, const float* flexCoefficientsIn);
|
||||||
|
@ -51,7 +53,8 @@ public:
|
||||||
private:
|
private:
|
||||||
AnimPose _pose;
|
AnimPose _pose;
|
||||||
glm::vec3 _poleVector;
|
glm::vec3 _poleVector;
|
||||||
int _poleIndex { -1 };
|
glm::vec3 _poleReferenceVector;
|
||||||
|
bool _poleVectorEnabled { false };
|
||||||
int _index { -1 };
|
int _index { -1 };
|
||||||
Type _type { Type::RotationAndPosition };
|
Type _type { Type::RotationAndPosition };
|
||||||
float _weight;
|
float _weight;
|
||||||
|
|
|
@ -1261,6 +1261,8 @@ void Rig::updateFromHandAndFeetParameters(const HandAndFeetParameters& params, f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const float POLE_VECTOR_BLEND_FACTOR = 0.9f;
|
||||||
|
|
||||||
if (params.isLeftFootEnabled) {
|
if (params.isLeftFootEnabled) {
|
||||||
_animVars.set("leftFootPosition", params.leftFootPosition);
|
_animVars.set("leftFootPosition", params.leftFootPosition);
|
||||||
_animVars.set("leftFootRotation", params.leftFootOrientation);
|
_animVars.set("leftFootRotation", params.leftFootOrientation);
|
||||||
|
@ -1274,16 +1276,16 @@ void Rig::updateFromHandAndFeetParameters(const HandAndFeetParameters& params, f
|
||||||
_prevLeftFootPoleVectorValid = true;
|
_prevLeftFootPoleVectorValid = true;
|
||||||
_prevLeftFootPoleVector = poleVector;
|
_prevLeftFootPoleVector = poleVector;
|
||||||
}
|
}
|
||||||
const float POLE_VECTOR_BLEND_FACTOR = 0.9f;
|
|
||||||
_prevLeftFootPoleVector = lerp(poleVector, _prevLeftFootPoleVector, POLE_VECTOR_BLEND_FACTOR);
|
_prevLeftFootPoleVector = lerp(poleVector, _prevLeftFootPoleVector, POLE_VECTOR_BLEND_FACTOR);
|
||||||
|
|
||||||
|
_animVars.set("leftFootPoleVectorEnabled", true);
|
||||||
|
_animVars.set("leftFootPoleReferenceVector", Vectors::UNIT_Z);
|
||||||
_animVars.set("leftFootPoleVector", _prevLeftFootPoleVector);
|
_animVars.set("leftFootPoleVector", _prevLeftFootPoleVector);
|
||||||
_animVars.set("leftFootPoleJointName", QString("LeftFoot"));
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_animVars.unset("leftFootPosition");
|
_animVars.unset("leftFootPosition");
|
||||||
_animVars.unset("leftFootRotation");
|
_animVars.unset("leftFootRotation");
|
||||||
_animVars.set("leftFootType", (int)IKTarget::Type::RotationAndPosition);
|
_animVars.set("leftFootType", (int)IKTarget::Type::RotationAndPosition);
|
||||||
|
_animVars.set("leftFootPoleVectorEnabled", false);
|
||||||
_prevLeftFootPoleVectorValid = false;
|
_prevLeftFootPoleVectorValid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1300,14 +1302,15 @@ void Rig::updateFromHandAndFeetParameters(const HandAndFeetParameters& params, f
|
||||||
_prevRightFootPoleVectorValid = true;
|
_prevRightFootPoleVectorValid = true;
|
||||||
_prevRightFootPoleVector = poleVector;
|
_prevRightFootPoleVector = poleVector;
|
||||||
}
|
}
|
||||||
const float POLE_VECTOR_BLEND_FACTOR = 0.9f;
|
|
||||||
_prevRightFootPoleVector = lerp(poleVector, _prevRightFootPoleVector, POLE_VECTOR_BLEND_FACTOR);
|
_prevRightFootPoleVector = lerp(poleVector, _prevRightFootPoleVector, POLE_VECTOR_BLEND_FACTOR);
|
||||||
|
|
||||||
|
_animVars.set("rightFootPoleVectorEnabled", true);
|
||||||
|
_animVars.set("rightFootPoleReferenceVector", Vectors::UNIT_Z);
|
||||||
_animVars.set("rightFootPoleVector", _prevRightFootPoleVector);
|
_animVars.set("rightFootPoleVector", _prevRightFootPoleVector);
|
||||||
_animVars.set("rightFootPoleJointName", QString("RightFoot"));
|
|
||||||
} else {
|
} else {
|
||||||
_animVars.unset("rightFootPosition");
|
_animVars.unset("rightFootPosition");
|
||||||
_animVars.unset("rightFootRotation");
|
_animVars.unset("rightFootRotation");
|
||||||
|
_animVars.set("rightFootPoleVectorEnabled", false);
|
||||||
_animVars.set("rightFootType", (int)IKTarget::Type::RotationAndPosition);
|
_animVars.set("rightFootType", (int)IKTarget::Type::RotationAndPosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1497,16 +1500,16 @@ void Rig::computeAvatarBoundingCapsule(
|
||||||
|
|
||||||
ikNode.setTargetVars("LeftHand", "leftHandPosition", "leftHandRotation",
|
ikNode.setTargetVars("LeftHand", "leftHandPosition", "leftHandRotation",
|
||||||
"leftHandType", "leftHandWeight", 1.0f, {},
|
"leftHandType", "leftHandWeight", 1.0f, {},
|
||||||
"leftHandPoleJointName", "leftHandPoleVector");
|
QString(), QString(), QString());
|
||||||
ikNode.setTargetVars("RightHand", "rightHandPosition", "rightHandRotation",
|
ikNode.setTargetVars("RightHand", "rightHandPosition", "rightHandRotation",
|
||||||
"rightHandType", "rightHandWeight", 1.0f, {},
|
"rightHandType", "rightHandWeight", 1.0f, {},
|
||||||
"rightHandPoleJointName", "rightHandPoleVector");
|
QString(), QString(), QString());
|
||||||
ikNode.setTargetVars("LeftFoot", "leftFootPosition", "leftFootRotation",
|
ikNode.setTargetVars("LeftFoot", "leftFootPosition", "leftFootRotation",
|
||||||
"leftFootType", "leftFootWeight", 1.0f, {},
|
"leftFootType", "leftFootWeight", 1.0f, {},
|
||||||
"leftFootPoleJointName", "leftFootPoleVector");
|
QString(), QString(), QString());
|
||||||
ikNode.setTargetVars("RightFoot", "rightFootPosition", "rightFootRotation",
|
ikNode.setTargetVars("RightFoot", "rightFootPosition", "rightFootRotation",
|
||||||
"rightFootType", "rightFootWeight", 1.0f, {},
|
"rightFootType", "rightFootWeight", 1.0f, {},
|
||||||
"rightFootPoleJointName", "rightFootPoleVector");
|
QString(), QString(), QString());
|
||||||
|
|
||||||
AnimPose geometryToRig = _modelOffset * _geometryOffset;
|
AnimPose geometryToRig = _modelOffset * _geometryOffset;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue