Jump to content
The Dark Mod Forums

Turning animations


squill

Recommended Posts

I'm working on some turn animations but i need to know i few things:

 

- How do i setup these angles with the origin joint: Once a guard turns 90 degrees right or left should i rotate the model back to the X-axis (front)? Or should i animate the origin along the rotation?

 

- Do we also need turns for walking, running?

Link to comment
Share on other sites

I know next to nothing about how the code handles turn animations, but maybe the D3 animations might give you a clue how to set them up? I remember looking at one in the past, which basically was just a short lift-right-foot-step-lift-left-foot-step anim.

Link to comment
Share on other sites

I know next to nothing about how the code handles turn animations, but maybe the D3 animations might give you a clue how to set them up? I remember looking at one in the past, which basically was just a short lift-right-foot-step-lift-left-foot-step anim.

 

from what i can see ingame using r_showskel they rotate the origin joint with the angle of the body. I'll just finish the steps so we can see what happens ingame.

Link to comment
Share on other sites

Ah well if you want to use mine as a guide...

 

mine ensures the guy never actually changes position - he rotates exactly on the spot. It's safer that way.

 

If he changes position in an anim like this, it could open up all sorts of subtle bugs that wouldn't show up for a long time, eg. depending on a certain sequence of turns, he might end up slowly travellling over a long amount of time. Or if someone has him hard up against a wall or an edge, he might intersect something, or fall off the edge.

 

This kind of bug showed up in Thief: Deadly Shadows. You just had to watch the guards playing their cursing animation at you while you stood on the other side of a gap, and eventually their cursing animation would take them off the edge to their deaths, because it changed their position ever so slightly each time.

Link to comment
Share on other sites

Just to avoid confusion: after looking at some D3 NPCs I'm pretty sure that the turn_left and turn_right animations don't turn anything for real on their own. The actual turning is done by the code, but the way they are lifting their feet one after the other makes it look like they shift their weight properly.

Link to comment
Share on other sites

Also, I don't think we need anything for walking or running. They're already picking their feet up in those animations, so when the code pivots them as they walk/run, it already looks pretty natural. It's just the standing position that looks bad when the code pivots them in place without an animation to pick their feet up.

Link to comment
Share on other sites

Just to avoid confusion: after looking at some D3 NPCs I'm pretty sure that the turn_left and turn_right animations don't turn anything for real on their own. The actual turning is done by the code, but the way they are lifting their feet one after the other makes it look like they shift their weight properly.

Hm, well that's even SAFER. With the code driving the turning, if the code is turning 90 degrees, then the animator MUST ensure the animation turns 90 degrees and does nothing else, otherwise they'll get feet sliding.

Link to comment
Share on other sites

Hm, well that's even SAFER. With the code driving the turning, if the code is turning 90 degrees, then the animator MUST ensure the animation turns 90 degrees and does nothing else, otherwise they'll get feet sliding.

Let me repeat: the animation does not and should not turn the model.

Link to comment
Share on other sites

  • 3 weeks later...

I look forward to seeing this in action. :)

 

We're going to use something like this for turning in chairs too, where the code rotates the AI and an animation moves the legs. Not a crucial animation for 1.0, but if you have the time, feel free. :)

Link to comment
Share on other sites

The AI will use the turn anims while turning now. :) See test/ai_turn map.

It looks a bit strange right now, like they start shuffling their feet a little bit too late.

 

ok cool..can't wait to see it ingame! The code will probably turn the model instantly while the actual turn in the animation happens after 1/2 second. Is it possible to let the code wait that 1/2 second before turning?

Link to comment
Share on other sites

ok cool..can't wait to see it ingame! The code will probably turn the model instantly while the actual turn in the animation happens after 1/2 second. Is it possible to let the code wait that 1/2 second before turning?

 

Wouldn't it be better if the animation didn't wait 1/2 second? With 0 wait time I think the code can make smoother turns?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Angua and me already discussed possible solutions, and ideally the turn rate should/will be controlled by anim frame commands. Hardcoded delays in the code are not a good thing, as we might end up with slightly different turning animations for various AI, and a 0 delay might be too restrictive for more realistic anims (like the above).

Link to comment
Share on other sites

Yes, that was the idea. I would have put a really small turn rate at the beginning of the anim, and a faster one when the weight is shifted. But if you want to adjust the anim so that these framecommands aren't necessary, that's fine with me as well. Depends on you.

Link to comment
Share on other sites

i've tweaked the turns which look better but not yet right. The actual turn in code seems to take about 1/2 second. I tested this by scaling the animation to half a second which makes the feet slide less but it's way too fast. Is it possible to set the turning speed/rate to take 1 second?

 

The turn rate can be linear because i can vary the movements of the legs in the animation. Also i noticed when an idle animation is playing the idles are overriding the turns.

Link to comment
Share on other sites

The turn rate can definitely be altered.

 

Which one of the recent turn anims do you think would be ideal? I'll try to come up with a solution to make that one working with anim frame commands controlling the turn rate.

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

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...