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

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...