mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:49:24 +02:00
Avatar animations on by default. (Using the now old animation machinery.)
Default robot avatar consistent with the animations. Don't require all the bones to be present.
This commit is contained in:
parent
7d2bdb3689
commit
086afc47b1
4 changed files with 81 additions and 49 deletions
|
@ -3,62 +3,95 @@ type = body+head
|
||||||
scale = 1
|
scale = 1
|
||||||
filename = defaultAvatar_full/defaultAvatar_full.fbx
|
filename = defaultAvatar_full/defaultAvatar_full.fbx
|
||||||
texdir = defaultAvatar_full/textures
|
texdir = defaultAvatar_full/textures
|
||||||
|
joint = jointRightHand = RightHand
|
||||||
joint = jointNeck = Head
|
joint = jointNeck = Head
|
||||||
joint = jointLeftHand = LeftHand
|
|
||||||
joint = jointRoot = Hips
|
joint = jointRoot = Hips
|
||||||
joint = jointHead = HeadTop_End
|
joint = jointHead = HeadTop_End
|
||||||
joint = jointRightHand = RightHand
|
|
||||||
joint = jointLean = Spine
|
joint = jointLean = Spine
|
||||||
|
joint = jointLeftHand = LeftHand
|
||||||
freeJoint = LeftArm
|
freeJoint = LeftArm
|
||||||
freeJoint = LeftForeArm
|
freeJoint = LeftForeArm
|
||||||
freeJoint = RightArm
|
freeJoint = RightArm
|
||||||
freeJoint = RightForeArm
|
freeJoint = RightForeArm
|
||||||
jointIndex = LeftHand = 35
|
bs = MouthFrown_R = Mouth.MouthFrown_R = 1
|
||||||
jointIndex = Reye = 3
|
bs = EyeOpen_L = Leye1.EyeOpen_L = 1
|
||||||
jointIndex = Hips = 10
|
bs = LipsLowerDown_L = Mouth.LipsLowerDown = 0.5
|
||||||
jointIndex = LeftHandIndex1 = 36
|
bs = LipsStretch_L = Mouth.LipsStretch_L = 1
|
||||||
jointIndex = LeftHandIndex2 = 37
|
bs = MouthLeft = Mouth.MouthLeft = 1
|
||||||
jointIndex = LeftHandIndex3 = 38
|
bs = MouthSmile_L = Mouth.MouthSmile_L = 1
|
||||||
jointIndex = LeftHandIndex4 = 39
|
bs = Sneer_R = Mouth.Sneer = 0.61
|
||||||
jointIndex = LeftShoulder = 32
|
bs = LipsPucker = Mouth.LipsPucker = 1
|
||||||
jointIndex = RightLeg = 12
|
bs = EyeOpen_R = Reye1.EyeOut_R = 1
|
||||||
jointIndex = Grp_blendshapes = 0
|
bs = LipsLowerDown_R = Mouth.LipsLowerDown = 0.43
|
||||||
jointIndex = Leye = 4
|
bs = LipsStretch_R = Mouth.LipsStretch_R = 1
|
||||||
jointIndex = headphone = 8
|
bs = MouthSmile_R = Mouth.MouthSmile_R = 1
|
||||||
jointIndex = RightForeArm = 26
|
bs = LipsFunnel = Mouth.LipsFunnel = 1
|
||||||
jointIndex = Spine = 21
|
bs = EyeUp_L = Leye1.EyeUp_L = 1
|
||||||
jointIndex = LeftFoot = 18
|
bs = MouthDimple_L = Mouth.MouthDimple_L = 1
|
||||||
jointIndex = RightToeBase = 14
|
bs = Puff = Mouth.Puff = 1
|
||||||
jointIndex = face = 1
|
bs = EyeIn_L = Leye1.EyeIn_L = 1
|
||||||
jointIndex = LeftToe_End = 20
|
bs = EyeUp_R = Reye1.EyeUp_R = 0.99
|
||||||
jointIndex = Spine1 = 22
|
bs = MouthDimple_R = Mouth.MouthDimple_R = 1
|
||||||
jointIndex = body = 9
|
bs = MouthRight = Mouth.MouthRight = 1
|
||||||
jointIndex = Spine2 = 23
|
bs = EyeOut_L = Leye1.EyeOut_L = 1
|
||||||
jointIndex = RightUpLeg = 11
|
bs = JawOpen = Mouth.JawOpen = 1
|
||||||
jointIndex = top1 = 7
|
bs = EyeIn_R = Reye1.EyeIn_R = 1
|
||||||
jointIndex = Neck = 40
|
bs = BrowsD_L = Leye1.BrowsD_L = 1
|
||||||
jointIndex = HeadTop_End = 42
|
bs = EyeDown_L = Leye1.EyeDown_L = 1
|
||||||
jointIndex = RightShoulder = 24
|
bs = EyeBlink_L = Leye1.EyeBlink_L = 1
|
||||||
jointIndex = RightArm = 25
|
bs = EyeOut_R = Reye1.EyeOut_R = 1
|
||||||
jointIndex = Head = 41
|
bs = LipsUpperUp_L = Mouth.LipsUpperUp = 0.49
|
||||||
jointIndex = LeftLeg = 17
|
bs = MouthFrown_L = Mouth.MouthFrown_L = 1
|
||||||
jointIndex = LeftForeArm = 34
|
bs = EyeDown_R = Reye1.EyeDown_R = 1
|
||||||
jointIndex = hair = 6
|
bs = BrowsD_R = Reye1.BrowsD_R = 1
|
||||||
jointIndex = RightHand = 27
|
bs = EyeBlink_R = Reye1.EyeBlink_R = 1
|
||||||
jointIndex = LeftToeBase = 19
|
bs = LipsUpperUp_R = Mouth.LipsUpperUp = 0.47
|
||||||
jointIndex = LeftUpLeg = 16
|
bs = Sneer_L = Mouth.Sneer = 0.5
|
||||||
jointIndex = mouth = 2
|
jointIndex = headphone = 7
|
||||||
jointIndex = RightFoot = 13
|
jointIndex = LeftUpLeg = 15
|
||||||
jointIndex = LeftArm = 33
|
jointIndex = Spine = 20
|
||||||
jointIndex = shield = 5
|
jointIndex = LeftArm = 32
|
||||||
jointIndex = RightHandIndex1 = 28
|
jointIndex = Head = 40
|
||||||
jointIndex = RightHandIndex2 = 29
|
jointIndex = RightUpLeg = 10
|
||||||
jointIndex = RightToe_End = 15
|
jointIndex = hair = 5
|
||||||
jointIndex = RightHandIndex3 = 30
|
jointIndex = Spine1 = 21
|
||||||
jointIndex = RightHandIndex4 = 31
|
jointIndex = RightHandIndex1 = 27
|
||||||
|
jointIndex = Spine2 = 22
|
||||||
|
jointIndex = RightHandIndex2 = 28
|
||||||
|
jointIndex = RightHandIndex3 = 29
|
||||||
|
jointIndex = RightHandIndex4 = 30
|
||||||
|
jointIndex = RightToe_End = 14
|
||||||
|
jointIndex = shield = 4
|
||||||
|
jointIndex = LeftHandIndex1 = 35
|
||||||
|
jointIndex = LeftHandIndex2 = 36
|
||||||
|
jointIndex = RightHand = 26
|
||||||
|
jointIndex = LeftHandIndex3 = 37
|
||||||
|
jointIndex = LeftHandIndex4 = 38
|
||||||
|
jointIndex = LeftShoulder = 31
|
||||||
|
jointIndex = LeftHand = 34
|
||||||
|
jointIndex = RightForeArm = 25
|
||||||
|
jointIndex = RightLeg = 11
|
||||||
|
jointIndex = RightFoot = 12
|
||||||
|
jointIndex = mouth = 1
|
||||||
|
jointIndex = LeftToe_End = 19
|
||||||
|
jointIndex = Reye = 2
|
||||||
|
jointIndex = Hips = 9
|
||||||
|
jointIndex = RightToeBase = 13
|
||||||
|
jointIndex = HeadTop_End = 41
|
||||||
|
jointIndex = LeftFoot = 17
|
||||||
|
jointIndex = RightShoulder = 23
|
||||||
|
jointIndex = LeftLeg = 16
|
||||||
|
jointIndex = Leye = 3
|
||||||
|
jointIndex = LeftForeArm = 33
|
||||||
|
jointIndex = face = 0
|
||||||
|
jointIndex = body = 8
|
||||||
|
jointIndex = LeftToeBase = 18
|
||||||
|
jointIndex = RightArm = 24
|
||||||
|
jointIndex = top1 = 6
|
||||||
|
jointIndex = Neck = 39
|
||||||
|
rx = 0
|
||||||
ry = 0
|
ry = 0
|
||||||
rz = 0
|
rz = 0
|
||||||
tx = 0
|
tx = 0
|
||||||
ty = 0
|
ty = 0
|
||||||
tz = 0
|
tz = 0
|
||||||
rx = 0
|
|
||||||
|
|
Binary file not shown.
|
@ -432,7 +432,7 @@ Menu::Menu() {
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderFocusIndicator, 0, false);
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderFocusIndicator, 0, false);
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ShowWhosLookingAtMe, 0, false);
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ShowWhosLookingAtMe, 0, false);
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::FixGaze, 0, false);
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::FixGaze, 0, false);
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::EnableRigAnimations, 0, false,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::EnableRigAnimations, 0, true,
|
||||||
avatar, SLOT(setEnableRigAnimations(bool)));
|
avatar, SLOT(setEnableRigAnimations(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::EnableAnimGraph, 0, false,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::EnableAnimGraph, 0, false,
|
||||||
avatar, SLOT(setEnableAnimGraph(bool)));
|
avatar, SLOT(setEnableAnimGraph(bool)));
|
||||||
|
|
|
@ -173,10 +173,9 @@ void AnimationHandle::applyFrame(float frameIndex) {
|
||||||
const FBXAnimationFrame& floorFrame = animationGeometry.animationFrames.at((int)glm::floor(frameIndex) % frameCount);
|
const FBXAnimationFrame& floorFrame = animationGeometry.animationFrames.at((int)glm::floor(frameIndex) % frameCount);
|
||||||
const FBXAnimationFrame& ceilFrame = animationGeometry.animationFrames.at((int)glm::ceil(frameIndex) % frameCount);
|
const FBXAnimationFrame& ceilFrame = animationGeometry.animationFrames.at((int)glm::ceil(frameIndex) % frameCount);
|
||||||
float frameFraction = glm::fract(frameIndex);
|
float frameFraction = glm::fract(frameIndex);
|
||||||
assert(_rig->getJointStateCount() >= _jointMappings.size());
|
|
||||||
for (int i = 0; i < _jointMappings.size(); i++) {
|
for (int i = 0; i < _jointMappings.size(); i++) {
|
||||||
int mapping = _jointMappings.at(i);
|
int mapping = _jointMappings.at(i);
|
||||||
if (mapping != -1) {
|
if (mapping != -1) { // allow missing bones
|
||||||
_rig->setJointRotationInConstrainedFrame(mapping,
|
_rig->setJointRotationInConstrainedFrame(mapping,
|
||||||
safeMix(floorFrame.rotations.at(i),
|
safeMix(floorFrame.rotations.at(i),
|
||||||
ceilFrame.rotations.at(i),
|
ceilFrame.rotations.at(i),
|
||||||
|
|
Loading…
Reference in a new issue