From 165c328517b92ba900377bc309cbc9138ee3507f Mon Sep 17 00:00:00 2001 From: Justin Shipsey Date: Fri, 14 Aug 2020 10:50:08 +0000 Subject: [PATCH] fixed jump anim bug and non-attack bug for bipedlarge --- .../voxel/biped_large_center_manifest.ron | 52 ++--- .../voxel/biped_large_lateral_manifest.ron | 50 ++-- .../voxel/npc/cyclops/female/hammer.vox | 3 + .../voxygen/voxel/npc/ogre/female/foot_l.vox | 3 + .../voxygen/voxel/npc/ogre/female/foot_r.vox | 3 + .../voxygen/voxel/npc/ogre/female/hand_l.vox | 3 + .../voxygen/voxel/npc/ogre/female/hand_r.vox | 3 + assets/voxygen/voxel/npc/ogre/female/head.vox | 3 + .../voxygen/voxel/npc/ogre/female/leg_l.vox | 3 + .../voxygen/voxel/npc/ogre/female/leg_r.vox | 3 + assets/voxygen/voxel/npc/ogre/female/main.vox | 3 + .../voxel/npc/ogre/female/shoulder_l.vox | 3 + .../voxel/npc/ogre/female/shoulder_r.vox | 3 + .../voxel/npc/ogre/female/torso_lower.vox | 3 + .../voxel/npc/ogre/female/torso_upper.vox | 3 + assets/voxygen/voxel/npc/ogre/male/club_l.vox | 3 - assets/voxygen/voxel/npc/ogre/male/club_r.vox | 3 - assets/voxygen/voxel/npc/ogre/male/foot_l.vox | 4 +- assets/voxygen/voxel/npc/ogre/male/foot_r.vox | 4 +- assets/voxygen/voxel/npc/ogre/male/hammer.vox | 3 + assets/voxygen/voxel/npc/ogre/male/hand_l.vox | 4 +- assets/voxygen/voxel/npc/ogre/male/hand_r.vox | 4 +- assets/voxygen/voxel/npc/ogre/male/head.vox | 4 +- assets/voxygen/voxel/npc/ogre/male/leg_l.vox | 4 +- assets/voxygen/voxel/npc/ogre/male/leg_r.vox | 4 +- assets/voxygen/voxel/npc/ogre/male/main.vox | 3 + .../voxel/npc/ogre/male/shoulder_l.vox | 4 +- .../voxel/npc/ogre/male/shoulder_r.vox | 4 +- .../voxel/npc/ogre/male/torso_lower.vox | 4 +- .../voxel/npc/ogre/male/torso_upper.vox | 4 +- .../voxygen/voxel/npc/troll/female/hammer.vox | 3 + .../voxygen/voxel/npc/troll/male/hammer.vox | 3 + .../voxel/npc/troll/male/shoulder_r.vox | 2 +- .../voxygen/voxel/npc/wendigo/male/hammer.vox | 3 + voxygen/src/anim/Cargo.toml | 2 +- voxygen/src/anim/src/biped_large/alpha.rs | 213 ++++++++++++++++++ voxygen/src/anim/src/biped_large/jump.rs | 84 ++++--- voxygen/src/anim/src/biped_large/mod.rs | 35 +-- voxygen/src/anim/src/biped_large/wield.rs | 39 ---- voxygen/src/scene/figure/mod.rs | 11 +- 40 files changed, 430 insertions(+), 162 deletions(-) create mode 100644 assets/voxygen/voxel/npc/cyclops/female/hammer.vox create mode 100644 assets/voxygen/voxel/npc/ogre/female/foot_l.vox create mode 100644 assets/voxygen/voxel/npc/ogre/female/foot_r.vox create mode 100644 assets/voxygen/voxel/npc/ogre/female/hand_l.vox create mode 100644 assets/voxygen/voxel/npc/ogre/female/hand_r.vox create mode 100644 assets/voxygen/voxel/npc/ogre/female/head.vox create mode 100644 assets/voxygen/voxel/npc/ogre/female/leg_l.vox create mode 100644 assets/voxygen/voxel/npc/ogre/female/leg_r.vox create mode 100644 assets/voxygen/voxel/npc/ogre/female/main.vox create mode 100644 assets/voxygen/voxel/npc/ogre/female/shoulder_l.vox create mode 100644 assets/voxygen/voxel/npc/ogre/female/shoulder_r.vox create mode 100644 assets/voxygen/voxel/npc/ogre/female/torso_lower.vox create mode 100644 assets/voxygen/voxel/npc/ogre/female/torso_upper.vox delete mode 100644 assets/voxygen/voxel/npc/ogre/male/club_l.vox delete mode 100644 assets/voxygen/voxel/npc/ogre/male/club_r.vox create mode 100644 assets/voxygen/voxel/npc/ogre/male/hammer.vox create mode 100644 assets/voxygen/voxel/npc/ogre/male/main.vox create mode 100644 assets/voxygen/voxel/npc/troll/female/hammer.vox create mode 100644 assets/voxygen/voxel/npc/troll/male/hammer.vox create mode 100644 assets/voxygen/voxel/npc/wendigo/male/hammer.vox create mode 100644 voxygen/src/anim/src/biped_large/alpha.rs diff --git a/assets/voxygen/voxel/biped_large_center_manifest.ron b/assets/voxygen/voxel/biped_large_center_manifest.ron index c1a154eab9..ff6e86fb2c 100644 --- a/assets/voxygen/voxel/biped_large_center_manifest.ron +++ b/assets/voxygen/voxel/biped_large_center_manifest.ron @@ -1,15 +1,15 @@ ({ (Ogre, Male): ( head: ( - offset: (-8.0, -5.0, -6.0), + offset: (-8.0, -6.0, -6.5), center: ("npc.ogre.male.head"), ), torso_upper: ( - offset: (-8.0, -4.5, -5.0), + offset: (-8.0, -6.0, -8.0), center: ("npc.ogre.male.torso_upper"), ), torso_lower: ( - offset: (-5.0, -4.5, -9.0), + offset: (-6.0, -5.5, -10.0), center: ("npc.ogre.male.torso_lower"), ), jaw: ( @@ -25,22 +25,22 @@ center: ("armor.empty"), ), main: ( - offset: (-8.0, -4.5, -5.0), - center: ("armor.empty"), + offset: (-5.0, -5.5, -5.0), + center: ("npc.ogre.male.hammer"), ) ), (Ogre, Female): ( head: ( - offset: (-8.0, -5.0, -6.0), - center: ("npc.ogre.male.head"), + offset: (-9.0, -5.5, -6.0), + center: ("npc.ogre.female..head"), ), torso_upper: ( - offset: (-8.0, -4.5, -5.0), - center: ("npc.ogre.male.torso_upper"), + offset: (-6.0, -5.0, -6.0), + center: ("npc.ogre.female.torso_upper"), ), torso_lower: ( - offset: (-5.0, -4.5, -9.0), - center: ("npc.ogre.male.torso_lower"), + offset: (-5.0, -4.5, -6.0), + center: ("npc.ogre.female.torso_lower"), ), jaw: ( offset: (0.0, 0.0, 0.0), @@ -55,8 +55,8 @@ center: ("armor.empty"), ), main: ( - offset: (-8.0, -4.5, -5.0), - center: ("armor.empty"), + offset: (-2.5, -5.5, -5.0), + center: ("npc.ogre.female.main"), ) ), (Cyclops, Male): ( @@ -116,7 +116,7 @@ ), main: ( offset: (-5.0, -6.5, -4.0), - center: ("npc.cyclops.male.hammer"), + center: ("npc.cyclops.female.hammer"), ) ), (Wendigo, Male): ( @@ -145,8 +145,8 @@ center: ("armor.empty"), ), main: ( - offset: (-8.0, -4.5, -5.0), - center: ("armor.empty"), + offset: (-5.0, -6.5, -4.0), + center: ("npc.wendigo.male.hammer"), ) ), (Wendigo, Female): ( @@ -175,8 +175,8 @@ center: ("armor.empty"), ), main: ( - offset: (-8.0, -4.5, -5.0), - center: ("armor.empty"), + offset: (-5.0, -6.5, -4.0), + center: ("npc.wendigo.male.hammer"), ) ), (Troll, Male): ( @@ -205,8 +205,8 @@ center: ("armor.empty"), ), main: ( - offset: (-8.0, -4.5, -5.0), - center: ("armor.empty"), + offset: (-5.0, -6.5, -4.0), + center: ("npc.troll.male.hammer"), ) ), (Troll, Female): ( @@ -235,8 +235,8 @@ center: ("armor.empty"), ), main: ( - offset: (-8.0, -4.5, -5.0), - center: ("armor.empty"), + offset: (-5.0, -6.5, -4.0), + center: ("npc.troll.female.hammer"), ) ), @@ -267,8 +267,8 @@ center: ("armor.empty"), ), main: ( - offset: (-1.5, -9.0, -10.0), - center: ("npc.dullahan.male.sword"), + offset: (-5.0, -6.5, -4.0), + center: ("npc.cyclops.male.hammer"), ) ), @@ -298,8 +298,8 @@ center: ("armor.empty"), ), main: ( - offset: (-1.5, -9.0, -10.0), - center: ("npc.dullahan.male.sword"), + offset: (-5.0, -6.5, -4.0), + center: ("npc.cyclops.male.hammer"), ) ), }) diff --git a/assets/voxygen/voxel/biped_large_lateral_manifest.ron b/assets/voxygen/voxel/biped_large_lateral_manifest.ron index 2393b04181..92ed8119cd 100644 --- a/assets/voxygen/voxel/biped_large_lateral_manifest.ron +++ b/assets/voxygen/voxel/biped_large_lateral_manifest.ron @@ -1,70 +1,70 @@ ({ (Ogre, Male): ( shoulder_l: ( - offset: (-4.0, -5.5, -4.0), - lateral: ("armor.empty"), + offset: (-6.0, -3.5, -4.0), + lateral: ("npc.ogre.male.shoulder_l"), ), shoulder_r: ( - offset: (-4.0, -5.5, -4.0), + offset: (-6.0, -4.5, -4.0), lateral: ("npc.ogre.male.shoulder_r"), ), hand_l: ( - offset: (-2.5, -2.5, -11.0), + offset: (-5.5, -3.5, -15.0), lateral: ("npc.ogre.male.hand_l"), ), hand_r: ( - offset: (-2.5, -2.5, -11.0), + offset: (-5.5, -3.5, -15.0), lateral: ("npc.ogre.male.hand_r"), ), leg_l: ( - offset: (-6.0, -3.5, -7.0), + offset: (-6.0, -3.5, -8.0), lateral: ("npc.ogre.male.leg_l"), ), leg_r: ( - offset: (0.0, -3.5, -7.0), + offset: (0.0, -3.5, -8.0), lateral: ("npc.ogre.male.leg_r"), ), foot_l: ( - offset: (-3.0, -5.0, -2.5), + offset: (-3.0, -5.0, -8.0), lateral: ("npc.ogre.male.foot_l"), ), foot_r: ( - offset: (-3.0, -5.0, -2.5), + offset: (-3.0, -5.5, -8.0), lateral: ("npc.ogre.male.foot_r"), ), ), (Ogre, Female): ( shoulder_l: ( - offset: (-4.0, -5.5, -4.0), - lateral: ("armor.empty"), + offset: (-3.0, -3.0, -3.5), + lateral: ("npc.ogre.female.shoulder_l"), ), shoulder_r: ( - offset: (-4.0, -5.5, -4.0), - lateral: ("npc.ogre.male.shoulder_r"), + offset: (-3.0, -3.0, -3.5), + lateral: ("npc.ogre.female.shoulder_r"), ), hand_l: ( - offset: (-2.5, -2.5, -11.0), - lateral: ("npc.ogre.male.hand_l"), + offset: (-3.0, -3.0, -8.0), + lateral: ("npc.ogre.female.hand_l"), ), hand_r: ( - offset: (-2.5, -2.5, -11.0), - lateral: ("npc.ogre.male.hand_r"), + offset: (-3.0, -3.0, -8.0), + lateral: ("npc.ogre.female.hand_r"), ), leg_l: ( - offset: (-6.0, -3.5, -7.0), - lateral: ("npc.ogre.male.leg_l"), + offset: (-7.0, -3.5, -11.0), + lateral: ("npc.ogre.female.leg_l"), ), leg_r: ( - offset: (0.0, -3.5, -7.0), - lateral: ("npc.ogre.male.leg_r"), + offset: (0.0, -3.5, -11.0), + lateral: ("npc.ogre.female.leg_r"), ), foot_l: ( - offset: (-3.0, -5.0, -2.5), - lateral: ("npc.ogre.male.foot_l"), + offset: (-3.0, -5.0, -8.0), + lateral: ("npc.ogre.female.foot_l"), ), foot_r: ( - offset: (-3.0, -5.0, -2.5), - lateral: ("npc.ogre.male.foot_r"), + offset: (-3.0, -5.0, -8.0), + lateral: ("npc.ogre.female.foot_r"), ), ), (Cyclops, Male): ( diff --git a/assets/voxygen/voxel/npc/cyclops/female/hammer.vox b/assets/voxygen/voxel/npc/cyclops/female/hammer.vox new file mode 100644 index 0000000000..405c9ac11b --- /dev/null +++ b/assets/voxygen/voxel/npc/cyclops/female/hammer.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26ecd87754d078f4a5097476b3f64400b3aa8515507986faf484c79075ef5d8f +size 3580 diff --git a/assets/voxygen/voxel/npc/ogre/female/foot_l.vox b/assets/voxygen/voxel/npc/ogre/female/foot_l.vox new file mode 100644 index 0000000000..9a971e2f33 --- /dev/null +++ b/assets/voxygen/voxel/npc/ogre/female/foot_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f272f92700bdffb16ccd9a308b47551dc4766ed82f9be5e03485405df8944e6 +size 2260 diff --git a/assets/voxygen/voxel/npc/ogre/female/foot_r.vox b/assets/voxygen/voxel/npc/ogre/female/foot_r.vox new file mode 100644 index 0000000000..9a971e2f33 --- /dev/null +++ b/assets/voxygen/voxel/npc/ogre/female/foot_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f272f92700bdffb16ccd9a308b47551dc4766ed82f9be5e03485405df8944e6 +size 2260 diff --git a/assets/voxygen/voxel/npc/ogre/female/hand_l.vox b/assets/voxygen/voxel/npc/ogre/female/hand_l.vox new file mode 100644 index 0000000000..ed701b4b96 --- /dev/null +++ b/assets/voxygen/voxel/npc/ogre/female/hand_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d60c175ddeba701402a32e14e39bf91cc7053b6c135cf1d2db7544b73bebf58 +size 1612 diff --git a/assets/voxygen/voxel/npc/ogre/female/hand_r.vox b/assets/voxygen/voxel/npc/ogre/female/hand_r.vox new file mode 100644 index 0000000000..8c643569db --- /dev/null +++ b/assets/voxygen/voxel/npc/ogre/female/hand_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38ff97d6d987d10089790ec348a0736d06bbb5a1d7dd5bfc2e4a4d1ac1112953 +size 1612 diff --git a/assets/voxygen/voxel/npc/ogre/female/head.vox b/assets/voxygen/voxel/npc/ogre/female/head.vox new file mode 100644 index 0000000000..3ccb3f74c5 --- /dev/null +++ b/assets/voxygen/voxel/npc/ogre/female/head.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1fda670f40f9d9086bc1be86270cae31302940d341cc5615e2f65abdc6249af +size 4876 diff --git a/assets/voxygen/voxel/npc/ogre/female/leg_l.vox b/assets/voxygen/voxel/npc/ogre/female/leg_l.vox new file mode 100644 index 0000000000..e00c0487f2 --- /dev/null +++ b/assets/voxygen/voxel/npc/ogre/female/leg_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06560346cedad976911a60bde3d15097273c704ec969f82ff384f23c8099444b +size 2896 diff --git a/assets/voxygen/voxel/npc/ogre/female/leg_r.vox b/assets/voxygen/voxel/npc/ogre/female/leg_r.vox new file mode 100644 index 0000000000..4814d6912d --- /dev/null +++ b/assets/voxygen/voxel/npc/ogre/female/leg_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:434cfea3091be1ab525c546bb1706e81946d58cf37d881df2fc55259f4ad0337 +size 2896 diff --git a/assets/voxygen/voxel/npc/ogre/female/main.vox b/assets/voxygen/voxel/npc/ogre/female/main.vox new file mode 100644 index 0000000000..20337015cc --- /dev/null +++ b/assets/voxygen/voxel/npc/ogre/female/main.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae78b481491fa24dfa9ada77861a2094985f59288e88b8e47513ffb20cafff40 +size 2040 diff --git a/assets/voxygen/voxel/npc/ogre/female/shoulder_l.vox b/assets/voxygen/voxel/npc/ogre/female/shoulder_l.vox new file mode 100644 index 0000000000..54fb38d44a --- /dev/null +++ b/assets/voxygen/voxel/npc/ogre/female/shoulder_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1662f58cc9f7ff0fd88b085713395decb205ba67e1d117e497089fbc140bf283 +size 1624 diff --git a/assets/voxygen/voxel/npc/ogre/female/shoulder_r.vox b/assets/voxygen/voxel/npc/ogre/female/shoulder_r.vox new file mode 100644 index 0000000000..23992b7a31 --- /dev/null +++ b/assets/voxygen/voxel/npc/ogre/female/shoulder_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff9ae880bc753cb539691c21cd56f1c06c8fb7a75e58bec386331df29494ca6e +size 1624 diff --git a/assets/voxygen/voxel/npc/ogre/female/torso_lower.vox b/assets/voxygen/voxel/npc/ogre/female/torso_lower.vox new file mode 100644 index 0000000000..83c0ed8b58 --- /dev/null +++ b/assets/voxygen/voxel/npc/ogre/female/torso_lower.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5fcaf4c2c5c829f2ff3b16fee2fdc7a6a5ffaa6bdec69d361e67d55bea5edab +size 2016 diff --git a/assets/voxygen/voxel/npc/ogre/female/torso_upper.vox b/assets/voxygen/voxel/npc/ogre/female/torso_upper.vox new file mode 100644 index 0000000000..d7acdf6698 --- /dev/null +++ b/assets/voxygen/voxel/npc/ogre/female/torso_upper.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:135fcea17952646e6ed97a43e6e5b8969ceeaea9e83d5306ae529a98ac38a869 +size 4472 diff --git a/assets/voxygen/voxel/npc/ogre/male/club_l.vox b/assets/voxygen/voxel/npc/ogre/male/club_l.vox deleted file mode 100644 index 2625afe818..0000000000 --- a/assets/voxygen/voxel/npc/ogre/male/club_l.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:012f2dbf03877d2e8b47d770e85aa2d64123c0331dfe6eb6dafc45bcdd355dd6 -size 1784 diff --git a/assets/voxygen/voxel/npc/ogre/male/club_r.vox b/assets/voxygen/voxel/npc/ogre/male/club_r.vox deleted file mode 100644 index 7121264992..0000000000 --- a/assets/voxygen/voxel/npc/ogre/male/club_r.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b8cafe8db5ffac25bd08a5b5755b79fc180a6bd0e061b8dd7c788b8c0634814a -size 1784 diff --git a/assets/voxygen/voxel/npc/ogre/male/foot_l.vox b/assets/voxygen/voxel/npc/ogre/male/foot_l.vox index da08707ccf..0b7fc73b7e 100644 --- a/assets/voxygen/voxel/npc/ogre/male/foot_l.vox +++ b/assets/voxygen/voxel/npc/ogre/male/foot_l.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:90c4cefc79271e1b15fa674874109b06ee0379812cdb9a2f2864eab9b13a18d7 -size 1896 +oid sha256:349f6ee9652e94455338a706acdc02b50c50a98e74d488bf28e7313c9aff6016 +size 2308 diff --git a/assets/voxygen/voxel/npc/ogre/male/foot_r.vox b/assets/voxygen/voxel/npc/ogre/male/foot_r.vox index 5733f55e35..0b7fc73b7e 100644 --- a/assets/voxygen/voxel/npc/ogre/male/foot_r.vox +++ b/assets/voxygen/voxel/npc/ogre/male/foot_r.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1540d676c5a0be0b87079c5b95c9336dbfe938e66062e535437e69cff3669c47 -size 1896 +oid sha256:349f6ee9652e94455338a706acdc02b50c50a98e74d488bf28e7313c9aff6016 +size 2308 diff --git a/assets/voxygen/voxel/npc/ogre/male/hammer.vox b/assets/voxygen/voxel/npc/ogre/male/hammer.vox new file mode 100644 index 0000000000..85765929fc --- /dev/null +++ b/assets/voxygen/voxel/npc/ogre/male/hammer.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be6c9fb1cf19d903df0d11db6488a09f9c938c208d69e3e8b905796d833d9155 +size 3200 diff --git a/assets/voxygen/voxel/npc/ogre/male/hand_l.vox b/assets/voxygen/voxel/npc/ogre/male/hand_l.vox index 3209a770c9..df0a280404 100644 --- a/assets/voxygen/voxel/npc/ogre/male/hand_l.vox +++ b/assets/voxygen/voxel/npc/ogre/male/hand_l.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4d18bfbe4f6fd079d295238bae40a491c9b2c13c7a6d538b4c3adf94b5ce88c -size 1576 +oid sha256:a86f5d5adbb422d08c9e09036e27fbe966565a73b6c65ac7d94e639105fc52f2 +size 3188 diff --git a/assets/voxygen/voxel/npc/ogre/male/hand_r.vox b/assets/voxygen/voxel/npc/ogre/male/hand_r.vox index 7447d81403..52d1de72ad 100644 --- a/assets/voxygen/voxel/npc/ogre/male/hand_r.vox +++ b/assets/voxygen/voxel/npc/ogre/male/hand_r.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5492321b3af03ffc78f162a0f40e7fa1e1fb6f7285327ca47af043b3c43d63ac -size 1576 +oid sha256:00852e1a64801ede4bc3d605eddfda9231c3fd54e51d55b550863915d166e570 +size 3252 diff --git a/assets/voxygen/voxel/npc/ogre/male/head.vox b/assets/voxygen/voxel/npc/ogre/male/head.vox index 16b13831b3..fac22a300e 100644 --- a/assets/voxygen/voxel/npc/ogre/male/head.vox +++ b/assets/voxygen/voxel/npc/ogre/male/head.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e59c212b0bff023df92390c2fef0051bc99c8efd3a3397c8851d219e1dd3122 -size 4472 +oid sha256:bfb027ac19b3f6116c5322ba1a274b659a6afe7b46d56eff2fd522b81dd99e3e +size 4992 diff --git a/assets/voxygen/voxel/npc/ogre/male/leg_l.vox b/assets/voxygen/voxel/npc/ogre/male/leg_l.vox index 250ae798fb..865c924aa7 100644 --- a/assets/voxygen/voxel/npc/ogre/male/leg_l.vox +++ b/assets/voxygen/voxel/npc/ogre/male/leg_l.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dfb9da63ede02f3d4cac323d7152d7764b3144e517cfc46fe1ceb1f9accf0378 -size 1704 +oid sha256:499d54948329e7c37725b7cdecb0a437b968cce5b49c17e4ae8404bef4d09c57 +size 2064 diff --git a/assets/voxygen/voxel/npc/ogre/male/leg_r.vox b/assets/voxygen/voxel/npc/ogre/male/leg_r.vox index c2ac8a3699..287dc1fd7b 100644 --- a/assets/voxygen/voxel/npc/ogre/male/leg_r.vox +++ b/assets/voxygen/voxel/npc/ogre/male/leg_r.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:817b57a4b69c99e8c34c908a33d8436867a1563e25d2b632b6519b15c3b72512 -size 1704 +oid sha256:e5a61a56afb92762557b025bb980b98389e0e4b97a493462cdc435ce3ce9b15e +size 2064 diff --git a/assets/voxygen/voxel/npc/ogre/male/main.vox b/assets/voxygen/voxel/npc/ogre/male/main.vox new file mode 100644 index 0000000000..dcdd16c077 --- /dev/null +++ b/assets/voxygen/voxel/npc/ogre/male/main.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88fbeca98d929e2dd9cc4034412450a4a49d5d1ddf6df7dea9ad5152f83f0477 +size 3200 diff --git a/assets/voxygen/voxel/npc/ogre/male/shoulder_l.vox b/assets/voxygen/voxel/npc/ogre/male/shoulder_l.vox index c6c10387c2..1925c38679 100644 --- a/assets/voxygen/voxel/npc/ogre/male/shoulder_l.vox +++ b/assets/voxygen/voxel/npc/ogre/male/shoulder_l.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e6d1e8d1801eecec486a67b32ab51c3ddd5bb49562166eb98f4fb49297caa37 -size 1880 +oid sha256:36eeb839cc6c72112769637c716d145c97f5814907e74364494c90835686b744 +size 2252 diff --git a/assets/voxygen/voxel/npc/ogre/male/shoulder_r.vox b/assets/voxygen/voxel/npc/ogre/male/shoulder_r.vox index 3997e1b2e9..60df0b0c7f 100644 --- a/assets/voxygen/voxel/npc/ogre/male/shoulder_r.vox +++ b/assets/voxygen/voxel/npc/ogre/male/shoulder_r.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6717202102e9e0379d652faa110e9211238e16ffe885f5a0b6c9d37f3a3debb -size 1880 +oid sha256:2360896735c592695eb3747ff0477e77d462f17aa5de334f1c472b824defe257 +size 3260 diff --git a/assets/voxygen/voxel/npc/ogre/male/torso_lower.vox b/assets/voxygen/voxel/npc/ogre/male/torso_lower.vox index bfbc82b50b..428f2b6d39 100644 --- a/assets/voxygen/voxel/npc/ogre/male/torso_lower.vox +++ b/assets/voxygen/voxel/npc/ogre/male/torso_lower.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6b4b9201910750c3d04924faaaaf34e6bb7283d33f6fb6208a9696d767f01ed7 -size 2172 +oid sha256:0b7af777775352add9648076f186133e29e2d4f969e350c272a01b1723369cb0 +size 2748 diff --git a/assets/voxygen/voxel/npc/ogre/male/torso_upper.vox b/assets/voxygen/voxel/npc/ogre/male/torso_upper.vox index 4e89371ef9..9a3572afa2 100644 --- a/assets/voxygen/voxel/npc/ogre/male/torso_upper.vox +++ b/assets/voxygen/voxel/npc/ogre/male/torso_upper.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ff94ce3fb17681a3943c299bf39bdb0dd9c0f9cdad9421749886b64666acc2c -size 5108 +oid sha256:3b456252d3a1a8c61a6bbe03b977b0980000ccf36767fd3afec9dcbc8ae93433 +size 7284 diff --git a/assets/voxygen/voxel/npc/troll/female/hammer.vox b/assets/voxygen/voxel/npc/troll/female/hammer.vox new file mode 100644 index 0000000000..aeb748af7c --- /dev/null +++ b/assets/voxygen/voxel/npc/troll/female/hammer.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ea1b53cd0b7f7a3c6db30af0880340cac27b34ab4cff58a51c5bae6cc2cc1e7 +size 3524 diff --git a/assets/voxygen/voxel/npc/troll/male/hammer.vox b/assets/voxygen/voxel/npc/troll/male/hammer.vox new file mode 100644 index 0000000000..9a7315e863 --- /dev/null +++ b/assets/voxygen/voxel/npc/troll/male/hammer.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05f0896ab240939bb5a1d89fa0bdbc1e51da5a9a2a2b1c86cc25935ad5aafb8c +size 3112 diff --git a/assets/voxygen/voxel/npc/troll/male/shoulder_r.vox b/assets/voxygen/voxel/npc/troll/male/shoulder_r.vox index 0ae5491411..535dc664ce 100644 --- a/assets/voxygen/voxel/npc/troll/male/shoulder_r.vox +++ b/assets/voxygen/voxel/npc/troll/male/shoulder_r.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55c200bbadb757e63fb2d09fcacffddf7ce2cbd3309fd732f9091be7db623393 +oid sha256:c111e35534f571b31d72eee59ed8c512c0f9545a55040981f34b473464c51fff size 2964 diff --git a/assets/voxygen/voxel/npc/wendigo/male/hammer.vox b/assets/voxygen/voxel/npc/wendigo/male/hammer.vox new file mode 100644 index 0000000000..9a7315e863 --- /dev/null +++ b/assets/voxygen/voxel/npc/wendigo/male/hammer.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05f0896ab240939bb5a1d89fa0bdbc1e51da5a9a2a2b1c86cc25935ad5aafb8c +size 3112 diff --git a/voxygen/src/anim/Cargo.toml b/voxygen/src/anim/Cargo.toml index d54f1519c9..ab4d0e2bfe 100644 --- a/voxygen/src/anim/Cargo.toml +++ b/voxygen/src/anim/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" name = "voxygen_anim" # Uncomment to use animation hot reloading # Note: this breaks `cargo test` -#crate-type = ["lib", "cdylib"] +# crate-type = ["lib", "cdylib"] [features] use-dyn-lib = ["libloading", "notify", "lazy_static", "tracing", "find_folder"] diff --git a/voxygen/src/anim/src/biped_large/alpha.rs b/voxygen/src/anim/src/biped_large/alpha.rs new file mode 100644 index 0000000000..7646ed3641 --- /dev/null +++ b/voxygen/src/anim/src/biped_large/alpha.rs @@ -0,0 +1,213 @@ +use super::{super::Animation, BipedLargeSkeleton, SkeletonAttr}; +use std::f32::consts::PI; +use vek::*; + +pub struct AlphaAnimation; + +impl Animation for AlphaAnimation { + type Dependency = (f32, f64); + type Skeleton = BipedLargeSkeleton; + + #[cfg(feature = "use-dyn-lib")] + const UPDATE_FN: &'static [u8] = b"biped_large_alpha\0"; + + #[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_alpha")] + fn update_skeleton_inner( + skeleton: &Self::Skeleton, + (velocity, _global_time): Self::Dependency, + anim_time: f64, + _rate: &mut f32, + skeleton_attr: &SkeletonAttr, + ) -> Self::Skeleton { + let mut next = (*skeleton).clone(); + + let lab = 0.55; + + let slower = (((1.0) + / (0.05 + + 0.95 + * ((anim_time as f32 * lab as f32 * 10.0 - 0.8 * PI).sin()).powf(2.0 as f32))) + .sqrt()) + * ((anim_time as f32 * lab as f32 * 10.0 - 0.8 * PI).sin()); + + let slowersmooth = (anim_time as f32 * lab as f32 * 4.0).sin(); + + let foothoril = (((1.0) + / (0.4 + + (0.6) + * ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin()).powf(2.0 as f32))) + .sqrt()) + * ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin()); + let foothorir = (((1.0) + / (0.4 + + (0.6) + * ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()).powf(2.0 as f32))) + .sqrt()) + * ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()); + + let footrotl = (((5.0) + / (2.5 + + (2.5) + * ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin()).powf(2.0 as f32))) + .sqrt()) + * ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin()); + + let footrotr = (((5.0) + / (1.0 + + (4.0) + * ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()).powf(2.0 as f32))) + .sqrt()) + * ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()); + + let short = (anim_time as f32 * lab as f32 * 16.0).sin(); + + next.head.offset = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1) * 1.02; + next.head.ori = Quaternion::rotation_z(slower * 1.0) * Quaternion::rotation_x(0.0); + next.head.scale = Vec3::one() * 1.02; + + next.main.offset = Vec3::new(0.0, 0.0, 0.0); + next.main.ori = Quaternion::rotation_x(0.0) + * Quaternion::rotation_y(-1.57) + * Quaternion::rotation_z(1.0); + next.main.scale = Vec3::one() * 1.02; + + next.second.offset = Vec3::new(0.0, 0.0, 0.0); + next.second.ori = + Quaternion::rotation_x(PI) * Quaternion::rotation_y(0.0) * Quaternion::rotation_z(0.0); + next.second.scale = Vec3::one() * 0.0; + + next.hand_l.offset = Vec3::new( + -skeleton_attr.hand.0 - 7.0, + skeleton_attr.hand.1 - 7.0, + skeleton_attr.hand.2 + 10.0, + ); + next.hand_l.ori = Quaternion::rotation_x(0.57) * Quaternion::rotation_z(1.57); + next.hand_l.scale = Vec3::one() * 1.02; + + next.hand_r.offset = Vec3::new( + skeleton_attr.hand.0 - 7.0, + skeleton_attr.hand.1 - 7.0, + skeleton_attr.hand.2 + 10.0, + ); + next.hand_r.ori = Quaternion::rotation_x(0.57) * Quaternion::rotation_z(1.57); + next.hand_r.scale = Vec3::one() * 1.02; + + next.upper_torso.offset = Vec3::new( + 0.0, + skeleton_attr.upper_torso.0, + skeleton_attr.upper_torso.1, + ); + next.upper_torso.ori = Quaternion::rotation_z(slower * -1.2) * Quaternion::rotation_x(-0.3); + next.upper_torso.scale = Vec3::one(); + + next.control.offset = Vec3::new(7.0, 9.0, -10.0); + next.control.ori = Quaternion::rotation_x(slowersmooth * 0.35) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(slowersmooth * -0.5 + slower * -0.5); + next.control.scale = Vec3::one(); + if velocity < 0.5 { + next.lower_torso.offset = Vec3::new( + 0.0, + skeleton_attr.lower_torso.0, + skeleton_attr.lower_torso.1, + ); + next.lower_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.2); + next.lower_torso.scale = Vec3::one() * 1.02; + + next.jaw.offset = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1 * 0.0); + next.jaw.ori = Quaternion::rotation_z(0.0); + next.jaw.scale = Vec3::one(); + + next.tail.offset = Vec3::new(0.0, skeleton_attr.tail.0, skeleton_attr.tail.1); + next.tail.ori = Quaternion::rotation_z(0.0); + next.tail.scale = Vec3::one(); + + next.shoulder_l.offset = Vec3::new( + -skeleton_attr.shoulder.0, + skeleton_attr.shoulder.1, + skeleton_attr.shoulder.2, + ); + next.shoulder_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.shoulder_l.scale = Vec3::one(); + + next.shoulder_r.offset = Vec3::new( + skeleton_attr.shoulder.0, + skeleton_attr.shoulder.1, + skeleton_attr.shoulder.2, + ); + next.shoulder_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.shoulder_r.scale = Vec3::one(); + + next.leg_l.offset = Vec3::new( + -skeleton_attr.leg.0, + skeleton_attr.leg.1, + skeleton_attr.leg.2, + ) * 1.02; + next.leg_l.ori = Quaternion::rotation_z(0.0); + next.leg_l.scale = Vec3::one() * 1.02; + + next.leg_r.offset = Vec3::new( + skeleton_attr.leg.0, + skeleton_attr.leg.1, + skeleton_attr.leg.2, + ) * 1.02; + next.leg_r.ori = Quaternion::rotation_z(0.0); + next.leg_r.scale = Vec3::one() * 1.02; + + next.foot_l.offset = Vec3::new( + -skeleton_attr.foot.0, + skeleton_attr.foot.1, + skeleton_attr.foot.2, + ) / 8.0; + next.foot_l.ori = Quaternion::rotation_z(0.0); + next.foot_l.scale = Vec3::one() / 8.0; + + next.foot_r.offset = Vec3::new( + skeleton_attr.foot.0, + skeleton_attr.foot.1, + skeleton_attr.foot.2, + ) / 8.0; + next.foot_r.ori = Quaternion::rotation_z(0.0); + next.foot_r.scale = Vec3::one() / 8.0; + + next.torso.offset = Vec3::new(0.0, 0.0, 0.0) / 8.0; + next.torso.ori = Quaternion::rotation_z(0.0); + next.torso.scale = Vec3::one() / 8.0; + } else { + next.lower_torso.offset = Vec3::new( + 0.0, + skeleton_attr.lower_torso.0, + skeleton_attr.lower_torso.1, + ); + next.lower_torso.ori = + Quaternion::rotation_z(short * 0.15) * Quaternion::rotation_x(0.14); + next.lower_torso.scale = Vec3::one() * 1.02; + + next.shoulder_l.offset = Vec3::new( + -skeleton_attr.shoulder.0, + skeleton_attr.shoulder.1 + foothoril * -1.0, + skeleton_attr.shoulder.2, + ); + next.shoulder_l.ori = Quaternion::rotation_x(0.5 + footrotl * -0.16) + * Quaternion::rotation_y(0.1) + * Quaternion::rotation_z(footrotl * 0.1); + next.shoulder_l.scale = Vec3::one(); + + next.shoulder_r.offset = Vec3::new( + skeleton_attr.shoulder.0, + skeleton_attr.shoulder.1 + foothorir * -1.0, + skeleton_attr.shoulder.2, + ); + next.shoulder_r.ori = Quaternion::rotation_x(0.5 + footrotr * -0.16) + * Quaternion::rotation_y(-0.1) + * Quaternion::rotation_z(footrotr * -0.1); + next.shoulder_r.scale = Vec3::one(); + + next.torso.offset = Vec3::new(0.0, 0.0, 0.0) / 8.0; + next.torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-0.25); + next.torso.scale = Vec3::one() / 8.0; + } + + next + } +} diff --git a/voxygen/src/anim/src/biped_large/jump.rs b/voxygen/src/anim/src/biped_large/jump.rs index b2d9c28e90..0b7725e4d6 100644 --- a/voxygen/src/anim/src/biped_large/jump.rs +++ b/voxygen/src/anim/src/biped_large/jump.rs @@ -1,11 +1,11 @@ use super::{super::Animation, BipedLargeSkeleton, SkeletonAttr}; -//use std::f32::consts::PI; +use std::f32::consts::PI; use vek::*; pub struct JumpAnimation; impl Animation for JumpAnimation { - type Dependency = (f32, f64); + type Dependency = f64; type Skeleton = BipedLargeSkeleton; #[cfg(feature = "use-dyn-lib")] @@ -15,46 +15,73 @@ impl Animation for JumpAnimation { fn update_skeleton_inner( skeleton: &Self::Skeleton, _global_time: Self::Dependency, - _anim_time: f64, + anim_time: f64, _rate: &mut f32, skeleton_attr: &SkeletonAttr, ) -> Self::Skeleton { let mut next = (*skeleton).clone(); - next.head.offset = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1) * 1.02; + let lab = 1.0; + let torso = (anim_time as f32 * lab as f32 + 1.5 * PI).sin(); + + let wave_slow = (anim_time as f32 * 0.8).sin(); + + next.head.offset = Vec3::new( + 0.0, + skeleton_attr.head.0, + skeleton_attr.head.1 + torso * 0.2, + ) * 1.02; next.head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.head.scale = Vec3::one() * 1.02; next.upper_torso.offset = Vec3::new( 0.0, skeleton_attr.upper_torso.0, - skeleton_attr.upper_torso.1, - ) / 8.0; - next.upper_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); - next.upper_torso.scale = Vec3::one() / 8.0; + skeleton_attr.upper_torso.1 + torso * 0.5, + ); + next.upper_torso.ori = Quaternion::rotation_x(-0.3); + next.upper_torso.scale = Vec3::one(); next.lower_torso.offset = Vec3::new( 0.0, skeleton_attr.lower_torso.0, - skeleton_attr.lower_torso.1, + skeleton_attr.lower_torso.1 + torso * 0.15, ); - next.lower_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.lower_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.2); next.lower_torso.scale = Vec3::one() * 1.02; next.jaw.offset = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1); - next.jaw.ori = Quaternion::rotation_z(0.0); + next.jaw.ori = Quaternion::rotation_x(wave_slow * 0.09); next.jaw.scale = Vec3::one(); - next.tail.offset = Vec3::new(0.0, skeleton_attr.tail.0, skeleton_attr.tail.1 * 0.0); + next.tail.offset = Vec3::new( + 0.0, + skeleton_attr.tail.0, + skeleton_attr.tail.1 + torso * 0.0, + ); next.tail.ori = Quaternion::rotation_z(0.0); next.tail.scale = Vec3::one(); + next.control.offset = Vec3::new(0.0, 0.0, 0.0); + next.control.ori = Quaternion::rotation_z(0.0); + next.control.scale = Vec3::one(); + + next.second.offset = Vec3::new(0.0, 0.0, 0.0); + next.second.ori = + Quaternion::rotation_x(PI) * Quaternion::rotation_y(0.0) * Quaternion::rotation_z(0.0); + next.second.scale = Vec3::one() * 0.0; + + next.main.offset = Vec3::new(-5.0, -7.0, 7.0); + next.main.ori = + Quaternion::rotation_x(PI) * Quaternion::rotation_y(0.6) * Quaternion::rotation_z(1.57); + next.main.scale = Vec3::one() * 1.02; + next.shoulder_l.offset = Vec3::new( -skeleton_attr.shoulder.0, skeleton_attr.shoulder.1, skeleton_attr.shoulder.2, ); - next.shoulder_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.shoulder_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.5); next.shoulder_l.scale = Vec3::one(); next.shoulder_r.offset = Vec3::new( @@ -62,60 +89,61 @@ impl Animation for JumpAnimation { skeleton_attr.shoulder.1, skeleton_attr.shoulder.2, ); - next.shoulder_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.shoulder_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-0.5); next.shoulder_r.scale = Vec3::one(); next.hand_l.offset = Vec3::new( -skeleton_attr.hand.0, skeleton_attr.hand.1, - skeleton_attr.hand.2, + skeleton_attr.hand.2 + torso * 0.6, ); - next.hand_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.hand_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.8); next.hand_l.scale = Vec3::one() * 1.02; next.hand_r.offset = Vec3::new( skeleton_attr.hand.0, skeleton_attr.hand.1, - skeleton_attr.hand.2, + skeleton_attr.hand.2 + torso * 0.6, ); - next.hand_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.hand_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-0.8); next.hand_r.scale = Vec3::one() * 1.02; next.leg_l.offset = Vec3::new( -skeleton_attr.leg.0, skeleton_attr.leg.1, - skeleton_attr.leg.2, + skeleton_attr.leg.2 + torso * 0.2, ) * 1.02; - next.leg_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.leg_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-0.4); next.leg_l.scale = Vec3::one() * 1.02; next.leg_r.offset = Vec3::new( skeleton_attr.leg.0, skeleton_attr.leg.1, - skeleton_attr.leg.2, + skeleton_attr.leg.2 + torso * 0.2, ) * 1.02; - next.leg_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.leg_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.4); next.leg_r.scale = Vec3::one() * 1.02; next.foot_l.offset = Vec3::new( -skeleton_attr.foot.0, - skeleton_attr.foot.1, + -5.0 + skeleton_attr.foot.1, skeleton_attr.foot.2, ) / 8.0; - next.foot_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.foot_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-0.4); next.foot_l.scale = Vec3::one() / 8.0; next.foot_r.offset = Vec3::new( skeleton_attr.foot.0, - skeleton_attr.foot.1, + 5.0 + skeleton_attr.foot.1, skeleton_attr.foot.2, ) / 8.0; - next.foot_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.foot_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.4); next.foot_r.scale = Vec3::one() / 8.0; - next.torso.offset = Vec3::new(0.0, 0.0, 0.0); + next.torso.offset = Vec3::new(0.0, 0.0, 0.0) / 8.0; next.torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); - next.torso.scale = Vec3::one(); + next.torso.scale = Vec3::one() / 8.0; + next } } diff --git a/voxygen/src/anim/src/biped_large/mod.rs b/voxygen/src/anim/src/biped_large/mod.rs index 3f744a3589..572f642a59 100644 --- a/voxygen/src/anim/src/biped_large/mod.rs +++ b/voxygen/src/anim/src/biped_large/mod.rs @@ -1,3 +1,4 @@ +pub mod alpha; pub mod idle; pub mod jump; pub mod run; @@ -5,7 +6,8 @@ pub mod wield; // Reexports pub use self::{ - idle::IdleAnimation, jump::JumpAnimation, run::RunAnimation, wield::WieldAnimation, + alpha::AlphaAnimation, idle::IdleAnimation, jump::JumpAnimation, run::RunAnimation, + wield::WieldAnimation, }; use super::{Bone, FigureBoneData, Skeleton}; @@ -71,12 +73,12 @@ impl Skeleton for BipedLargeSkeleton { FigureBoneData::new(torso_mat * upper_torso_mat), FigureBoneData::new(torso_mat * upper_torso_mat * lower_torso_mat), FigureBoneData::new(torso_mat * upper_torso_mat * lower_torso_mat * tail_mat), - FigureBoneData::new(torso_mat * control_mat * upper_torso_mat * main_mat), - FigureBoneData::new(torso_mat * control_mat * upper_torso_mat * second_mat), + FigureBoneData::new(torso_mat * upper_torso_mat * control_mat * main_mat), + FigureBoneData::new(torso_mat * upper_torso_mat * control_mat * second_mat), FigureBoneData::new(torso_mat * upper_torso_mat * shoulder_l_mat), FigureBoneData::new(torso_mat * upper_torso_mat * shoulder_r_mat), - FigureBoneData::new(torso_mat * control_mat * upper_torso_mat * hand_l_mat), - FigureBoneData::new(torso_mat * control_mat * upper_torso_mat * hand_r_mat), + FigureBoneData::new(torso_mat * upper_torso_mat * control_mat * hand_l_mat), + FigureBoneData::new(torso_mat * upper_torso_mat * control_mat * hand_r_mat), FigureBoneData::new(torso_mat * upper_torso_mat * lower_torso_mat * leg_l_mat), FigureBoneData::new(torso_mat * upper_torso_mat * lower_torso_mat * leg_r_mat), FigureBoneData::new(self.foot_l.compute_base_matrix()), @@ -149,10 +151,11 @@ impl Default for SkeletonAttr { impl<'a> From<&'a comp::biped_large::Body> for SkeletonAttr { fn from(body: &'a comp::biped_large::Body) -> Self { - use comp::biped_large::Species::*; + use comp::biped_large::{BodyType::*, Species::*}; Self { head: match (body.species, body.body_type) { - (Ogre, _) => (3.0, 6.0), + (Ogre, Male) => (3.0, 9.0), + (Ogre, Female) => (1.0, 7.5), (Cyclops, _) => (4.5, 7.5), (Wendigo, _) => (3.0, 13.5), (Troll, _) => (6.0, 10.0), @@ -166,14 +169,16 @@ impl<'a> From<&'a comp::biped_large::Body> for SkeletonAttr { (Dullahan, _) => (0.0, 0.0), }, upper_torso: match (body.species, body.body_type) { - (Ogre, _) => (0.0, 19.0), + (Ogre, Male) => (0.0, 28.0), + (Ogre, Female) => (0.0, 28.0), (Cyclops, _) => (-2.0, 27.0), (Wendigo, _) => (-1.0, 29.0), (Troll, _) => (-1.0, 27.5), (Dullahan, _) => (0.0, 29.0), }, lower_torso: match (body.species, body.body_type) { - (Ogre, _) => (1.0, -5.5), + (Ogre, Male) => (1.0, -7.0), + (Ogre, Female) => (0.0, -6.0), (Cyclops, _) => (1.0, -4.5), (Wendigo, _) => (-1.5, -6.0), (Troll, _) => (1.0, -10.5), @@ -187,28 +192,32 @@ impl<'a> From<&'a comp::biped_large::Body> for SkeletonAttr { (Dullahan, _) => (0.0, 0.0), }, shoulder: match (body.species, body.body_type) { - (Ogre, _) => (6.1, 0.5, 2.5), + (Ogre, Male) => (12.0, 0.5, 0.0), + (Ogre, Female) => (8.0, 0.5, -1.0), (Cyclops, _) => (9.5, 2.5, 2.5), (Wendigo, _) => (9.0, 0.5, -0.5), (Troll, _) => (11.0, 0.5, -1.5), (Dullahan, _) => (14.0, 0.5, 4.5), }, hand: match (body.species, body.body_type) { - (Ogre, _) => (10.5, -1.0, -0.5), + (Ogre, Male) => (14.5, 0.0, -2.0), + (Ogre, Female) => (9.0, 0.5, -4.5), (Cyclops, _) => (10.0, 2.0, -0.5), (Wendigo, _) => (12.0, 0.0, -0.5), (Troll, _) => (11.5, 0.0, -1.5), (Dullahan, _) => (14.5, 0.0, -2.5), }, leg: match (body.species, body.body_type) { - (Ogre, _) => (0.0, 0.0, 0.0), + (Ogre, Male) => (0.0, 0.0, -4.0), + (Ogre, Female) => (0.0, 0.0, -2.0), (Cyclops, _) => (0.0, 0.0, -5.0), (Wendigo, _) => (2.0, 2.0, -2.5), (Troll, _) => (5.0, 0.0, -6.0), (Dullahan, _) => (0.0, 0.0, -5.0), }, foot: match (body.species, body.body_type) { - (Ogre, _) => (4.0, 2.5, 2.5), + (Ogre, Male) => (4.0, 2.5, 8.0), + (Ogre, Female) => (4.0, 0.5, 8.0), (Cyclops, _) => (4.0, 0.5, 5.0), (Wendigo, _) => (5.0, 0.5, 6.0), (Troll, _) => (6.0, 0.5, 4.0), diff --git a/voxygen/src/anim/src/biped_large/wield.rs b/voxygen/src/anim/src/biped_large/wield.rs index 9ab73c16eb..7ab5867229 100644 --- a/voxygen/src/anim/src/biped_large/wield.rs +++ b/voxygen/src/anim/src/biped_large/wield.rs @@ -50,8 +50,6 @@ impl Animation for WieldAnimation { * ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()).powf(2.0 as f32))) .sqrt()) * ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()); - let footvertl = (anim_time as f32 * 16.0 * lab as f32).sin(); - let footvertr = (anim_time as f32 * 16.0 * lab as f32 + PI).sin(); let footrotl = (((5.0) / (2.5 @@ -231,43 +229,6 @@ impl Animation for WieldAnimation { * Quaternion::rotation_z(footrotr * -0.1); next.shoulder_r.scale = Vec3::one(); - next.leg_l.offset = Vec3::new( - -skeleton_attr.leg.0, - skeleton_attr.leg.1, - skeleton_attr.leg.2, - ) * 0.98; - next.leg_l.ori = - Quaternion::rotation_z(short * 0.18) * Quaternion::rotation_x(foothoril * 0.3); - next.leg_l.scale = Vec3::one() * 0.98; - - next.leg_r.offset = Vec3::new( - skeleton_attr.leg.0, - skeleton_attr.leg.1, - skeleton_attr.leg.2, - ) * 0.98; - - next.leg_r.ori = - Quaternion::rotation_z(short * 0.18) * Quaternion::rotation_x(foothorir * 0.3); - next.leg_r.scale = Vec3::one() * 0.98; - - next.foot_l.offset = Vec3::new( - -skeleton_attr.foot.0, - 4.0 + skeleton_attr.foot.1 + foothoril * 8.5, - skeleton_attr.foot.2 + ((footvertl * 6.5).max(0.0)), - ) / 8.0; - next.foot_l.ori = - Quaternion::rotation_x(-0.5 + footrotl * 0.85) * Quaternion::rotation_y(0.0); - next.foot_l.scale = Vec3::one() / 8.0; - - next.foot_r.offset = Vec3::new( - skeleton_attr.foot.0, - 4.0 + skeleton_attr.foot.1 + foothorir * 8.5, - skeleton_attr.foot.2 + ((footvertr * 6.5).max(0.0)), - ) / 8.0; - next.foot_r.ori = - Quaternion::rotation_x(-0.5 + footrotr * 0.85) * Quaternion::rotation_y(0.0); - next.foot_r.scale = Vec3::one() / 8.0; - next.torso.offset = Vec3::new(0.0, 0.0, 0.0) / 8.0; next.torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-0.25); next.torso.scale = Vec3::one() / 8.0; diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 12081df5f7..8197620eb1 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -1724,7 +1724,7 @@ impl FigureMgr { // In air (false, _, false) => anim::biped_large::JumpAnimation::update_skeleton( &BipedLargeSkeleton::new(), - (vel.0.magnitude(), time), + time, state.state_time, &mut state_animation_rate, skeleton_attr, @@ -1747,6 +1747,15 @@ impl FigureMgr { skeleton_attr, ) }, + CharacterState::BasicMelee(_) => { + anim::biped_large::AlphaAnimation::update_skeleton( + &target_base, + (vel.0.magnitude(), time), + state.state_time, + &mut state_animation_rate, + skeleton_attr, + ) + }, // TODO! _ => target_base, };