Jump to content
The Dark Mod Forums

Parrying Animation for Melee Combat


Ishtvan

Recommended Posts

For melee combat, we're going to want to play a 1st person block animation that holds the block as long as the player is holding down the block button, then goes back to the default position when they let go. I'm trying to figure out if this is possible with the current animation system, or if this would require extra programming.

 

What would be the best way to do this parry and hold the parry indefinitely animation? It sounds like it could be done with two animations, the first goes to the parry and finishes, the second is a looping animation that holds the parry as long as the player is holding block. (It could be just 1 frame in the parry position, or we could add some natural movement to it for aesthetics). Does that make sense?

 

Then, what about returning to the default "en gaurde" position when the player lets go of block? Is the anim blending system by itself good enough to do this in a believable manner (if we just say, blend from this position back to the start position in N frames), or will we want to do something like play the parry anim backwards to get back to the starting position?

 

We might have to program running animations backwards anyway, for the case where you attack and are parried. Playing the attack animation backwards worked well in Mount & Blade IMO, to make it look like your weapon bounced off and was blocked.

Link to comment
Share on other sites

  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

What would be the best way to do this parry and hold the parry indefinitely animation? It sounds like it could be done with two animations, the first goes to the parry and finishes, the second is a looping animation that holds the parry as long as the player is holding block. (It could be just 1 frame in the parry position, or we could add some natural movement to it for aesthetics). Does that make sense?

Yeah, that seems like the best system to me. It's more flexible and probably less error-prone than the only alternative I can think of, which is to play the parry animation and then pause it at the last frame (that would be a pretty crap way to do it).

 

Then, what about returning to the default "en gaurde" position when the player lets go of block? Is the anim blending system by itself good enough to do this in a believable manner (if we just say, blend from this position back to the start position in N frames), or will we want to do something like play the parry anim backwards to get back to the starting position?

No idea!

 

I suggest we first try letting it blend to see how it looks. Then we implement playing the animation backwards if and only if we need it (because that really sounds like it could be a pain - all the animation code is fugly and completely undocumented).

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

I suggest we first try letting it blend to see how it looks. Then we implement playing the animation backwards if and only if we need it (because that really sounds like it could be a pain - all the animation code is fugly and completely undocumented).

I don't mind trying it with blend, but I'm betting that we'll need to play it backward when it comes to attacking. It's frustrating, because it's easy in principle to do, just reverse time in the animation frame loop, but difficult in practice, because like you said, that animation code is fugly and undocumented. This would be a good question for Id if they hadn't stopped answering our questions. I'll ask on D3World at least.

Link to comment
Share on other sites

I take it this animation became top priority above all the rest, seeing as no one is actually waiting on any of the others to implement functionality? (Ooh big words...)

 

Hey the black jack already raises and holds and waits for you to release, that's the same thing isn't it?

 

Combat anims are probably the most scarey since someone will go "Hey, that's not how a riposte is performed, noob!" so any input on how it should move would be appreciated.

Link to comment
Share on other sites

Okay well I used to make the weapon scripts so maybe I can set this up to work like that next week when I get back into this.

 

What you described in the first post is exactly what the blackjack already does. There are parameters for each anim in the script to blend from one to the next over X amount of milliseconds.

 

As for your last post - this would be extra functionality. The game has to work out what side needs to be blocked on and then send that information to the script or something. I don't know if it's worth it. I think just having a generic block anim would be fine for first release.

Link to comment
Share on other sites

In the design we were talking about, I thought we were thinking of a couple different parries, like: left, right, and high.

 

In any case, this is still pretty far off in the future in terms of priority. I probably won't start work on melee combat for at least another month or so. One anim is fine for testing purposes. At that time, I'll just need something that would move the sword to one side so I can make the melee clipmodel move with it.

Link to comment
Share on other sites

Cool so for now you just need a blocking anim that works like the blackjack - idle anim, click and hold to go to blocking anim, release to return to idle anim. Um can you draw a quick diagram or describe, or link to a pic, of how the sword should be held to block? Or is this unimportant at the moment, in which case I will just come up with something?

 

As for the different parrying directions for the future - that's up to you guys, I don't know how this would work. I guess if you can send messages to the script to say "Player is blocking left" or "Player is blocking right" etc. then I can trigger the right anims.

 

Um just don't hold your breath yet. I think I'll be back into this next week, but I need to set up the mod, then work out where the original .mb files are for the weapon anims. I've been out of the loop for a while...

Link to comment
Share on other sites

For an illustration, you could use the upper left one of this set (warning: anatomically correct naked cartoon man)

 

http://www.kismeta.com/diGrasse/images/pWards4-6.jpg

 

It would basically just start in our idle position with the sword held on the right side, then move across to the left side, then hold in that position in the picture.

Link to comment
Share on other sites

  • 5 months later...

*bump*

 

These parry and attack animations just became a high priority for the next milestone. :)

 

We need, for both the AI and the player:

 

-Basic combat idle stance: sword out, facing player with maybe the sword foot forward. This is how the feet will be during all the parries, and can also be an idle for when they're not doing anything. Sword could be in a saber guard position (similar to parry right, but not so far over and blade tilted in toward the center).

 

Slash from left to right

Slash from right to left

Overhead slash

Thrust (AI already have this animation, so we might as well do it)

 

Parry left (Saber parry 4)

Parry right (Saber parry 3)

Parry high (Saber parry 5)

Parry thrust (this is going to look fake whatever we do, but it should look kind've like a foil parry 4, see Mount & Blade parry thrust for reference)

 

We should do very rough placeholders for now, don't spend a lot of time on making it fluid or anything, because we still need to see how the new melee physics and animations will interact and create gameplay. For now we really just need to get the sword over there. We might have to go thru a few iterations on the animations to get the gameplay we want.

 

Any takers?

Link to comment
Share on other sites

-Basic combat idle stance: sword out, facing player with maybe the sword foot forward.

 

This has already been exported to some AI -- it's called idle_sword. In fact, I think greebo added it to the ThiefsDen build, but it made the AI disappear because the origin was misplaced or something?

 

It needs to be fixed before it can be used.

 

We have a passable thrust attack, and a placeholder slash (right to left, I think) already exported to the citywatch family.

Link to comment
Share on other sites

This has already been exported to some AI -- it's called idle_sword. In fact, I think greebo added it to the ThiefsDen build, but it made the AI disappear because the origin was misplaced or something?

Yes, the origin must somehow clip into the world geometry below, causing the model to disappear. Something is bogus with that anim.

Link to comment
Share on other sites

Ah yep, there it is, still in my todo list... my bad. Sorry Ishtvan - I had forgotten someone was specifically relying on me to do something I agreed to do. :(

 

I'll cancel on some things and have something rough for each anim within the next week.

 

With the idle, I'll just try and see if it is the origin. If it's causing too much probs I'll just make another one, and see if I can't copy the key frames straight over - if not I'll just rough up a completely new anim.

 

I'll check the slash left and right, and thrust, that Spring mentioned, and see if I can just export them for the other AI.

Link to comment
Share on other sites

Ah Ishtvan, what about the view_model (first person) versions of these? I thought that's what you meant when you first started the thread, but in your recent post it sounds like you're talking about the full body animations, since you're talking about feet etc.

 

I'm getting started on the body versions.

Link to comment
Share on other sites

Ah Ishtvan, what about the view_model (first person) versions of these? I thought that's what you meant when you first started the thread, but in your recent post it sounds like you're talking about the full body animations, since you're talking about feet etc.

 

I'm getting started on the body versions.

 

He's talking about the AI's foot positions, not the player foot positions.

Link to comment
Share on other sites

Yeah I know - but in the first post he's talking about the first person view_models, that was what my question was about. Are they needed right now?

 

 

I just committed a combat_idle for the citywatch for now, let me know if there's any problems. I noticed there's a pause in the loop, that's because I just realised I need to export one frame less in the final anim because the first and last frames are identical.

Link to comment
Share on other sites

I just committed a combat_idle for the citywatch for now, let me know if there's any problems. I noticed there's a pause in the loop, that's because I just realised I need to export one frame less in the final anim because the first and last frames are identical.

I just noticed the new anim in the commit notification, thanks. :) I'll have to give some thought of how to embed it into the scripts (maybe a one-liner is enough, maybe not), but I can't do it immediately.

 

I noticed some weird vertex twitching in the left hand and there is something on the back of his boots, but otherwise it's more than acceptable for rough usage.

 

edit: Come to think of it, we have an idle_sword too (which caused problems). Is the new anim a replacement for that one? If yes, we should rename the new anim to idle_combat or idle_sword to stick with the naming conventions.

Link to comment
Share on other sites

Okay good idea. Yeah I forgot to bring up the stretching - this rig has weighting problems I think - there is a vertex on the butt area that doesn't seem to be weighted to anything at all (just stays there wherever the body moves) and something is screwy with the left hand vertices.

Link to comment
Share on other sites

Is that name used in the code anywhere already? Combat_idle is actually more descriptive and more accurate than idle_sword (since it isn't actually an idle animation, and the AI might not have a sword).

Link to comment
Share on other sites

The animation is just referenced in the scripts, so it can easily be changed by anyone. Look at ai_darkmod_base.script, line 513. Uncomment this to enable the anim:

 //if (AI_bMeleeWeapDrawn) { animState(ANIMCHANNEL_TORSO, "Torso_IdleSword", 3); }

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 3 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 2 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
×
×
  • Create New...