Jump to content
The Dark Mod Forums

Turning animations


squill
 Share

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.

 Share

  • Recent Status Updates

    • STiFU

      Be honest: Who of you have actually finished Cuphead? This game is freaking tough! It might even be harder than Sekiro. Dark Souls is a joke in comparison to Cuphead! :-D 
      · 8 replies
    • duzenko

      Please, can we finally group the missions by year in the game menu?
      · 6 replies
    • duzenko

      I vaguely recall someone recently complained about two-sided materials (curtains?) not getting lighting from both sides
      I just found a piece of code that's supposed to do just that
      Where was that discussed? (@nbohr1more?)
      · 9 replies
    • Xolvix

      I still play classic Doom (albeit with user-made mods and maps rather than the original campaign) on a regular basis. A game from the early 90's which has still got a healthy following in 2022. Pretty amazing.
      · 3 replies
    • Nort

      I'm beginning to understand why people who aren't into social clubbing "don't last long" on this project, and why it's so full of holes. When moderators are siding with bullies, by closing down threads that they derail, then I start to wonder if I should support the platform to begin with.
      I'm sure that the core development is solid, but when you're constantly tone policed and bullied, and moderators are playing into it too, then the project will just drive away talent, and replace it with socialites instead. ...and without talent, you only end up with a small skeleton crew trying to do everything themselves.
      ...so Dragofer and Airship Ballet, and all you other socialites, you win. From now on I'll just keep to myself. You'll never be able to do my work, but at least you'll be happy together, and that's what matters to you.
       
      Update
      Actually, I have to revise my statement:
      I actually messaged greebo - the top dog, I gather - about nbohr1more's outburst of insanity below, and since I haven't even heard back from him, I just have to assume that there's not a single core programmer here, who's not backing nbohr's threats. ...and that's bad.
      ...so if you're a newbie reading this, or an honest soul like ZergRush, then just slowly back out of these forums, run, and don't look back. This is nothing more than a cult posing as a game development project, using Thief and IDTech4 to sucker hopefuls in, to do work for them, while trying to cajole them into something going on behind the scenes, which apparently - according to nbohr - is something that should be hidden from the state. These people aren't programmers - they don't even understand things like how to fix the simplest bugs. All they have, is an engine, and an IP, and some sort of fascist social cult. There was some other project I saw being made in the Unreal Engine. Try joining that project. ...or start a project of your own. Anything but this asylum.
      Hopefully that was "divisive" enough for a final post, because at this point I really want people to leave this place. This project is, on a management level, just awful garbage, run by garbage people, apparently from the top down, and I'm just glad that they have a garbage place to stay, together, and hopefully forever.
      Nort
      · 16 replies
×
×
  • Create New...