From 61010851932363d30fea4bd7c78f30bcb1db63cb Mon Sep 17 00:00:00 2001 From: Snowram Date: Sun, 3 May 2020 18:24:58 +0200 Subject: [PATCH] Initial run animation work --- .../voxygen/voxel/dragon_lateral_manifest.ron | 16 +- .../voxel/npc/reddragon/female/wing_in_l.vox | Bin 57352 -> 57352 bytes .../voxel/npc/reddragon/female/wing_in_r.vox | Bin 57352 -> 57352 bytes .../voxel/npc/reddragon/male/wing_in_l.vox | Bin 57352 -> 57352 bytes .../voxel/npc/reddragon/male/wing_in_r.vox | Bin 57352 -> 57352 bytes voxygen/src/anim/dragon/idle.rs | 2 +- voxygen/src/anim/dragon/mod.rs | 15 +- voxygen/src/anim/dragon/run.rs | 159 +++++++++++++----- 8 files changed, 137 insertions(+), 55 deletions(-) diff --git a/assets/voxygen/voxel/dragon_lateral_manifest.ron b/assets/voxygen/voxel/dragon_lateral_manifest.ron index 63aef007dd..2ffdad5a15 100644 --- a/assets/voxygen/voxel/dragon_lateral_manifest.ron +++ b/assets/voxygen/voxel/dragon_lateral_manifest.ron @@ -17,37 +17,37 @@ lateral: ("npc.reddragon.male.wing_out_r"), ), foot_fl: ( - offset: (-2.5, 0.0, -6.0), + offset: (-2.5, -4.0, -1.5), lateral: ("npc.reddragon.male.foot_fl"), ), foot_fr: ( - offset: (-2.5, 0.0, -6.0), + offset: (-2.5, -4.0, -1.5), lateral: ("npc.reddragon.male.foot_fr"), ), foot_bl: ( - offset: (-2.5, 0.0, -7.0), + offset: (-2.5, -4.0, -3.0), lateral: ("npc.reddragon.male.foot_bl"), ), foot_br: ( - offset: (-2.5, 0.0, -7.0), + offset: (-2.5, -4.0, -3.0), lateral: ("npc.reddragon.male.foot_br"), ) ), (Reddragon, Female): ( wing_in_l: ( - offset: (20.0, 20.0, 5.0), + offset: (-0.5, -3.5, -27.0), lateral: ("npc.reddragon.female.wing_in_l"), ), wing_in_r: ( - offset: (20.0, 20.0, 5.0), + offset: (-0.5, -3.5, -27.0), lateral: ("npc.reddragon.female.wing_in_r"), ), wing_out_l: ( - offset: (20.0, 20.0, 5.0), + offset: (-0.5, -3.5, -27.0), lateral: ("npc.reddragon.female.wing_out_l"), ), wing_out_r: ( - offset: (20.0, 20.0, 5.0), + offset: (-0.5, -3.5, -27.0), lateral: ("npc.reddragon.female.wing_out_r"), ), foot_fl: ( diff --git a/assets/voxygen/voxel/npc/reddragon/female/wing_in_l.vox b/assets/voxygen/voxel/npc/reddragon/female/wing_in_l.vox index 9bb52f6467d940ac077a47f0bcd82b4edaccce89..5d3e33a6646d7d2552429e7510ab69b27fdf2b77 100644 GIT binary patch delta 1813 zcmWmExtZHW00z*}E=k~nJ`Fr@be1>26$_MYf@!-ylD;LhJ zEX+)d4D7w1j+Ta+ijsnyjFf~EM-II5!WRNXwuN8iw^`?+Ne81*C!;|}qh4pD?sE^1 zPOn?Njv76WYQ2vtBZx|)hzcVinYOUxMwA&*lp0l(7+G{OI!>PJkDsAG7-aNnpwWxL z(jN9Lv`5n&owiW(GH>C_{0uMCGrV%p$YFejJ63#a}Wl70(GCtKI8`o{f6 z*6M2as%J>6Eu`f$WaSpJ;u-Q{3wbWhRFF604nb>DP3oBQu&ab(Z0#i6urx%`VTpn{+^MJiI&;YG;)!(TxBIo z@0YTQGb*p--00oA%OSJ=4=)tf|<&qZ)u9S}L z%{!I6%UV9vC%iG(KmG1!q+_D6A7)v~TI02iHpM@Yqq2=ISo8 z;2N*Fk+s_%QiZ|M=@}iLPEN9wGYtzhD-~y2Q+|<+#;-CbBPC&Q40}dLv16iTreUG3 zt^cY}ai-)#K~6@>=o}AB^vrb5_aa-l%7!yF6(t2Z8KZB&z(mhXxBFRWS!sMMYAWTD zf}GKZV_>3ZrZWSJY-y;ed}K-r<-vxlJTuDDQcUtzAvpsTF-dAh7x>!{%)_CzH zTU^hw_d;i*ba72%S);9TtFcyn>-i?K5nJ!nma=wT$BYmOeZWQ8Mh>? OzT?C3pFfj-|N9>vHVCNz delta 1813 zcmWmExtZKH00vO(&cXXW=iFUcw$*_$x3H}+P(G=m`P_>ePz%mnjvsOEajS;m*6m>=w^+pyAM#s@}{rDOB$snWIK%>QA zX{W~)+R=1J!xm~@cUySbJ;Uq%8FuV7vOhe-;jo3n@fnWCEgX|)NRllismxqw>T~yV zS*R=AE1w}Pw~$uPkX2jA>SxI7E#!?fQ(3G2(RrX#=v7kmTPTKSD0QS9pP{1Gxq5nr zX41)7r*v@7fg=ei8941PL!M}xR}*kUiZ&O$P{iWQhAr1(Z0#i6urxX`VTpn{+^MJiI&;YG;)!(TxBIo z@0YTQGb%6ST|<&tL#E|iY# z)jO5E$y(mkC%iG(KmEhcNXJBBKg_a}wZ>~3ZHj*)M|GtaW7sn~iX9UzGYt!M zVf|NyiW4Pg3UV@1M(227qGzUaz8BfbRW_WcsVFJP$rybD1}1uDx`&^ImX*fGqNY+V zDaaXpI0hzqW;!#l$d-nh%15T8P#$c!$}^)ZEyX0yHu=fsJJ};A<;QAGR~M_w#TqZZ zWQ*%r_Fm|0lrFAmENiq?ZZ+1bZ#~~cHe&0Y+EUi8D_L5Cf>OCsmuo*Gjp>A?B!?{t PtMB+Q{_{Qg_rL!EG@$)u diff --git a/assets/voxygen/voxel/npc/reddragon/female/wing_in_r.vox b/assets/voxygen/voxel/npc/reddragon/female/wing_in_r.vox index ab80dfab8992af94f5efbde0861a5ee8989dde2a..83cce30c40f3e702ca55f21bdc4bd3e0f4a4119d 100644 GIT binary patch delta 1813 zcmWmFxtZKH7zSWy=iq&xbL}Zv>cE*>U@IFapH$I2?!^tL1!peDFM@YI5KDr@50Lxo z_wLv4-QR!RpSI9MU$#&MWG!pi?b&UirPuBcTNqe#iY=U?atr6E+QKEOw{VS`E!?7Z z3(rxvg_o$`!fP~a;f?#-xP`I&3|aLV2076))3MO9(v*)-Q)!nJepXessR8!n=!eRVXN_s5#NF(pDZoc5;?I69Xe@ zt&-#voGCd`u~M_pFyH;OOmvL&^&<={M!RpuO^$eRZ(Tk##MOW~|J4q7tO3v@BVsA}W?!w%qHPd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)mu16)fO&MxrJ*~Y~dE= zTX>GLExbhO7G9%d3vb-t4qKS&&yZK2VU#li3q40VR@(Xz8fxu|l7gvmEi(fP{pecR z(b7;ik5Ex+kFDeJ^ByLRYH+bUA0FY9e1=ns_L`x+>N{rSk8pIn$iex2M^9`U^kct; zkKGo&^6g3G{H-%~=e*AKZIpU|cx;>|zx&bot_triE>xkUqNd?Q%Su;y0NKk$4$O>9 zWTi?{P;#c?M9oUWk(TA|r(>pPVkjSBBrOa`PQiuNjD}b(58X3yW?p#RBI_O+D(=#zJ@_P6T2`~0T**?Ov91U{QH^|!cZ5&ip7Bj!#t-L&y}m|8~G#r49CO$5n2a}&Q8wsObm>??H}Q={|v8kGRTYUCo`9s{+rC@RTlCh zOL?Z^M9oUWk(Pz-?q{ZFVqoNb_Xuyi^0IR?Zd|!==ETa8g_((wfu4?*hMJ0!f}DHi zCne#)o*m=pyATaqm}wW4nhi87pV`-wb&jlSIhwID7lTTW_0qEBorJQ-=EY6+?H zQ=2xmNfVp;o7w zA%YLh7oM1V6*Jyoyphbq z#LU8xl@n(!T)FYg{l(8KZ@lxtR~9o_Is-)h;f(P$^N^#5?Bq;oSuPaHeU-Vq$==^4 i21YXdKfe47-}!^i_u>1K_S4Tav<{Z`pFh)o|N9>-CjCPI diff --git a/voxygen/src/anim/dragon/idle.rs b/voxygen/src/anim/dragon/idle.rs index fa0b5018f4..b827ca7ba0 100644 --- a/voxygen/src/anim/dragon/idle.rs +++ b/voxygen/src/anim/dragon/idle.rs @@ -86,7 +86,7 @@ impl Animation for IdleAnimation { next.wing_out_l.ori = Quaternion::rotation_z(0.0); next.wing_out_l.scale = Vec3::one() * 1.05; - next.wing_in_r.offset = Vec3::new( + next.wing_out_r.offset = Vec3::new( skeleton_attr.wing_out.0, skeleton_attr.wing_out.1, skeleton_attr.wing_out.2, diff --git a/voxygen/src/anim/dragon/mod.rs b/voxygen/src/anim/dragon/mod.rs index a491ad3b8f..fd915158ce 100644 --- a/voxygen/src/anim/dragon/mod.rs +++ b/voxygen/src/anim/dragon/mod.rs @@ -33,15 +33,15 @@ const TAIL_R_Z: f32 = 0.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] const WING_IN_X: f32 = 10.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const WING_IN_Y: f32 = -32.5; +const WING_IN_Y: f32 = -28.5; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const WING_IN_Z: f32 = -19.0; +const WING_IN_Z: f32 = 6.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const WING_OUT_X: f32 = 0.0; +const WING_OUT_X: f32 = 1.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const WING_OUT_Y: f32 = 1.5; +const WING_OUT_Y: f32 = 2.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const WING_OUT_Z: f32 = -10.5; +const WING_OUT_Z: f32 = 12.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] const FEET_F_X: f32 = 4.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] @@ -159,6 +159,7 @@ pub struct SkeletonAttr { wing_out: (f32, f32, f32), feet_f: (f32, f32, f32), feet_b: (f32, f32, f32), + height: f32, } impl<'a> std::convert::TryFrom<&'a comp::Body> for SkeletonAttr { @@ -184,6 +185,7 @@ impl Default for SkeletonAttr { wing_out: (0.0, 0.0, 0.0), feet_f: (0.0, 0.0, 0.0), feet_b: (0.0, 0.0, 0.0), + height: (0.0), } } } @@ -219,6 +221,9 @@ impl<'a> From<&'a comp::dragon::Body> for SkeletonAttr { feet_b: match (body.species, body.body_type) { (Reddragon, _) => (*FEET_B_X, *FEET_B_Y, *FEET_B_Z), }, + height: match (body.species, body.body_type) { + (Reddragon, _) => (1.0), + }, } } } \ No newline at end of file diff --git a/voxygen/src/anim/dragon/run.rs b/voxygen/src/anim/dragon/run.rs index 2165c07ddf..695a8407d7 100644 --- a/voxygen/src/anim/dragon/run.rs +++ b/voxygen/src/anim/dragon/run.rs @@ -1,5 +1,5 @@ use super::{super::Animation, DragonSkeleton, SkeletonAttr}; -//use std::{f32::consts::PI, ops::Mul}; +use std::{f32::consts::PI, ops::Mul}; use vek::*; pub struct RunAnimation; @@ -10,64 +10,141 @@ impl Animation for RunAnimation { fn update_skeleton( skeleton: &Self::Skeleton, - (_velocity, _global_time): Self::Dependency, - _anim_time: f64, + (_velocity, global_time): Self::Dependency, + anim_time: f64, _rate: &mut f32, - _skeleton_attr: &SkeletonAttr, + skeleton_attr: &SkeletonAttr, ) -> Self::Skeleton { let mut next = (*skeleton).clone(); - next.head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); - next.head.scale = Vec3::one() * 1.01; + let lab = 14; + let vertlf = (anim_time as f32 * lab as f32 + PI * 1.8).sin().max(0.15); + let vertrfoffset = (anim_time as f32 * lab as f32 + PI * 0.80).sin().max(0.15); + let vertlboffset = (anim_time as f32 * lab as f32).sin().max(0.15); + let vertrb = (anim_time as f32 * lab as f32 + PI).sin().max(0.15); - next.chest_front.offset = Vec3::new(0.0, 4.5, 2.0); - next.chest_front.ori = Quaternion::rotation_x(0.0); - next.chest_front.scale = Vec3::one() * 1.01; + let horilf = (anim_time as f32 * lab as f32 + PI * 1.2).sin(); + let horirfoffset = (anim_time as f32 * lab as f32 + PI * 0.20).sin(); + let horilboffset = (anim_time as f32 * lab as f32 + PI * 1.4).sin(); + let horirb = (anim_time as f32 * lab as f32 + PI * 0.4).sin(); - next.chest_rear.offset = Vec3::new(0.0, 4.5, 2.0); - next.chest_rear.ori = Quaternion::rotation_x(0.0); - next.chest_rear.scale = Vec3::one() * 1.01; + let vertchest = (anim_time as f32 * lab as f32 + PI * 0.3).sin().max(0.2); + let horichest = (anim_time as f32 * lab as f32 + PI * 0.8).sin(); + let verthead = (anim_time as f32 * lab as f32 + PI * 0.3).sin(); - next.tail_front.offset = Vec3::new(0.0, 4.5, 2.0); + let footl = (anim_time as f32 * lab as f32 + PI).sin(); + let footr = (anim_time as f32 * lab as f32).sin(); + + let wolf_look = Vec2::new( + ((global_time + anim_time) as f32 / 4.0) + .floor() + .mul(7331.0) + .sin() + * 0.25, + ((global_time + anim_time) as f32 / 4.0) + .floor() + .mul(1337.0) + .sin() + * 0.125, + ); + + next.head.offset = Vec3::new( + 0.0, + skeleton_attr.head.0 + horichest * 0.9, + skeleton_attr.head.1 + verthead * -0.9, + ) * 1.05; + next.head.ori = + Quaternion::rotation_x(wolf_look.y) * Quaternion::rotation_z(wolf_look.x); + next.head.scale = Vec3::one() * 1.05; + + next.tail_front.offset = Vec3::new(0.0, skeleton_attr.tail_front.0, skeleton_attr.tail_front.1); next.tail_front.ori = Quaternion::rotation_x(0.0); - next.tail_front.scale = Vec3::one() * 1.01; + next.tail_front.scale = Vec3::one(); - next.tail_rear.offset = Vec3::new(0.0, 4.5, 2.0); + next.tail_rear.offset = Vec3::new(0.0, skeleton_attr.tail_rear.0, skeleton_attr.tail_rear.1); next.tail_rear.ori = Quaternion::rotation_x(0.0); - next.tail_rear.scale = Vec3::one() * 1.01; + next.tail_rear.scale = Vec3::one(); - next.wing_in_l.offset = Vec3::new(0.0, 4.5, 2.0); - next.wing_in_l.ori = Quaternion::rotation_x(0.0); - next.wing_in_l.scale = Vec3::one() * 1.01; + next.chest_front.offset = Vec3::new( + 0.0, + skeleton_attr.chest_front.0 + horichest * 1.25, + skeleton_attr.chest_front.1 + vertchest * -1.6 + 1.0, + ) * 1.05; + next.chest_front.ori = Quaternion::rotation_y(horichest * -0.09); + next.chest_front.scale = Vec3::one() * 0.98 * 1.05; - next.wing_in_r.offset = Vec3::new(0.0, 4.5, 2.0); - next.wing_in_r.ori = Quaternion::rotation_x(0.0); - next.wing_in_r.scale = Vec3::one() * 1.01; + next.chest_rear.offset = Vec3::new( + 0.0, + skeleton_attr.chest_rear.0 + horichest * 1.25, + skeleton_attr.chest_rear.1 + vertchest * -1.6 + 1.0, + ) * 1.05; + next.chest_rear.ori = Quaternion::rotation_y(horichest * -0.09); + next.chest_rear.scale = Vec3::one() * 0.98 * 1.05; - next.wing_out_l.offset = Vec3::new(0.0, 4.5, 2.0); - next.wing_out_l.ori = Quaternion::rotation_x(0.0); - next.wing_out_l.scale = Vec3::one() * 1.01; + next.foot_fl.offset = Vec3::new( + -skeleton_attr.feet_f.0, + skeleton_attr.feet_f.1 + horilf * 2.5, + skeleton_attr.feet_f.2 + vertlf * 5.0 * skeleton_attr.height - 0.5, + ) * 1.05; + next.foot_fl.ori = Quaternion::rotation_x(horilf * 0.4); + next.foot_fl.scale = Vec3::one() * 1.05; - next.wing_out_r.offset = Vec3::new(0.0, 4.5, 2.0); - next.wing_out_r.ori = Quaternion::rotation_x(0.0); - next.wing_out_r.scale = Vec3::one() * 1.01; + next.foot_fr.offset = Vec3::new( + skeleton_attr.feet_f.0, + skeleton_attr.feet_f.1 + horirfoffset * 2.5, + skeleton_attr.feet_f.2 + vertrfoffset * 5.0 * skeleton_attr.height - 0.5, + ) * 1.05; + next.foot_fr.ori = Quaternion::rotation_x(horirfoffset * 0.4); + next.foot_fr.scale = Vec3::one() * 1.05; - next.foot_fl.offset = Vec3::new(0.0, 4.5, 2.0); - next.foot_fl.ori = Quaternion::rotation_x(0.0); - next.foot_fl.scale = Vec3::one() * 1.01; + next.foot_bl.offset = Vec3::new( + -skeleton_attr.feet_b.0, + skeleton_attr.feet_b.1 + horilboffset * 3.0, + skeleton_attr.feet_b.2 + vertlboffset * 5.0 * skeleton_attr.height - 0.5, + ) * 1.05; + next.foot_bl.ori = Quaternion::rotation_x(horilboffset * 0.35); + next.foot_bl.scale = Vec3::one() * 1.05; - next.foot_fr.offset = Vec3::new(0.0, 4.5, 2.0); - next.foot_fr.ori = Quaternion::rotation_x(0.0); - next.foot_fr.scale = Vec3::one() * 1.01; + next.foot_br.offset = Vec3::new( + skeleton_attr.feet_b.0, + skeleton_attr.feet_b.1 + horirb * 3.0, + skeleton_attr.feet_b.2 + vertrb * 5.0 * skeleton_attr.height - 0.5, + ) * 1.05; + next.foot_br.ori = Quaternion::rotation_x(horirb * 0.35); + next.foot_br.scale = Vec3::one() * 1.05; - next.foot_bl.offset = Vec3::new(0.0, 4.5, 2.0); - next.foot_bl.ori = Quaternion::rotation_x(0.0); - next.foot_bl.scale = Vec3::one() * 1.01; + next.wing_in_l.offset = Vec3::new( + -skeleton_attr.wing_in.0, + skeleton_attr.wing_in.1, + skeleton_attr.wing_in.2, + ); + next.wing_in_l.ori = Quaternion::rotation_y((footl * 0.35).max(0.0)); + next.wing_in_l.scale = Vec3::one() * 1.05; + + next.wing_in_r.offset = Vec3::new( + skeleton_attr.wing_in.0, + skeleton_attr.wing_in.1, + skeleton_attr.wing_in.2, + ); + next.wing_in_r.ori = Quaternion::rotation_y((footr * 0.35).max(0.0)); + next.wing_in_r.scale = Vec3::one() * 1.05; + + next.wing_out_l.offset = Vec3::new( + -skeleton_attr.wing_out.0, + skeleton_attr.wing_out.1, + skeleton_attr.wing_out.2, + ); + next.wing_out_l.ori = Quaternion::rotation_y((footl * 0.35).max(0.0)); + next.wing_out_l.scale = Vec3::one() * 1.05; + + next.wing_out_r.offset = Vec3::new( + skeleton_attr.wing_out.0, + skeleton_attr.wing_out.1, + skeleton_attr.wing_out.2, + ); + next.wing_out_r.ori = Quaternion::rotation_y((footr * 0.35).max(0.0)); + next.wing_out_r.scale = Vec3::one() * 1.05; - next.foot_br.offset = Vec3::new(0.0, 4.5, 2.0); - next.foot_br.ori = Quaternion::rotation_x(0.0); - next.foot_br.scale = Vec3::one() * 1.01; next } }