-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Sil/Sword combat and aim animation problem while walking/running. #2791
Conversation
Looks good! Let's also make sure we are blending correctly for aim mode too (right click mouse). |
dfd9b22
to
939d70f
Compare
Crouch: combo.3.crouch.mp4Aim: combo.4.lock.mp4Hello @avaer , is it ok? There's still a lot of room for optimization, and with silsword, still looks a little awkward. |
Noticed that silsword's aim is different from sword's aim logic/codes. aim.1.mp4 |
Yes, the animations are not related at all. Re: the above, I think the walk/run needs to be blended into the arms when aiming the sword or else it will look wrong/stiff. |
Blended walk/run into arms when aiming. aim.2.blend.arm_1.mp4 |
Tested that 300ms too slow, so increased to 200ms. 8dfa702 |
avatars/animationHelpers.js
Outdated
}; | ||
} else if (activeAvatar.unuseAnimation && activeAvatar.unuseTime >= 0) { | ||
return spec => { | ||
return (spec, isLastBone) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm this isn't a good approach. If something should happen after the last bone then the caller should do that, not the quaternion handler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might actually affect performance negatively to pass extra arguments to all bones for all frames.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm I don't know if the jump landing is better. It seems to take too long for some cases. Let's not mix this up with the sword PR. We can do actual landing animations which will look much better. Also not related to this PR: the spine sword problem is more obvious when you try to attack while running. |
This reverts commit 441b049.
Reverted |
Ok, I think I should add back And I think we need dedicated attack animations for walking/running/crouching eventually, because these case are way too different from standing attack, can't make good by just blending standing attack. And maybe we can prevent walking/running/crouching attacking totally, like many other action games do. |
animations-baker.js
Outdated
@@ -35,6 +35,16 @@ const {CharsetEncoder} = require('three/examples/js/libs/mmdparser.js'); | |||
'Crouched Sneaking Left.fbx', | |||
'Crouched Sneaking Right.fbx', | |||
]; | |||
const trimClip = (clip, startTime, endTime) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ok to ship, but I think we can fix this in the animation itself in the long term.
Maybe add a comment here/open an issue to trim this animation in Blender.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eb1b8da
to
276f6b5
Compare
Resolved conflicts. |
Reverted fixing of unuseAnimation not stop problem, 4dc4625 |
After testing again: I still think this PR is far too robotic when walking and attacking. I think overall it is not better than what we had before, it's just a different set of animation problems we are trading for. At least what we had before was very dynamic even if all of the bones were going crazy. If we need walk-attack and run-attack custom animations to solve this and make powerful swipes that do not look like a robot (especially in the spine), I think that is a valid plan. |
Got it! I'll contact artist and request resource. |
Only improve silsword with Before: aim.sword.before.mp4After: aim.sword.after.mp4 |
Fix: #2049
Preliminarily fixed this issue. The main changes are these lines.
Basic idea is to not apply sword combo animations to legs when walking.
Now not very awkward, but still has many todos:
moveFactors.idleWalkFactor
.isTop
.sword.walk.mp4