Jump to content
System downtime for updates - Sunday 13 July 2025 ×
The Dark Mod Forums

Recommended Posts

Posted

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?

Posted

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.

Posted
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.

Posted

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.

Posted

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.

Posted

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.

Posted
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.

Posted
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.

  • 3 weeks later...
Posted

i've added the turns. The 90 degree turns are in place, only the 180 turns are actually rotating the model and origin joint just like they did with the D3 characters.

Posted

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. :)

Posted

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.

Posted
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?

Posted
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

Posted

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).

Posted

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.

Posted

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.

Posted

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.

Posted

ok sounds good, i've only tweaked the 90 degree turns (left & right) which you can use. They both are a second in length. Are the 180 turns going to be used as well?

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...