Home Animation Showcase & Critiques

Individual Animation or Animation Blend?

Greg DAlessandro
polycounter lvl 6
Offline / Send Message
Greg DAlessandro polycounter lvl 6
I am working on several animations to export to UE4:
  • idle
  • walk
  • run
  • crouch
  • jump in place/ jump forward
  • block
  • dodge left/ right/ forward/ back
  • shield bash
  • sword attack
  • reaction - getting hit

I've finished the Idle pose animation in Maya, but my question is, "For the sword attack animation do I need to:"
  1. For the fist keyframe - start the pose from the idle stance, or from an attack stance? (attack stance as in the moment after you wind up, but before the sword swings forward)
  2. Animate the transition between idle stance and attack stance in Maya? (or will UE4 handle that with blend animations?)
  3. Keyframe/animate the sword windup in Maya? (or will UE4 handle that with blend animations?)

These questions also apply towards the other animations that I need to create. Thank you.

Replies

  • slipsius
    Honestly, the best answer I can give you is just test all those methods! Some games will have the attack animation starting with the wind up, and the engine just blends from idle to that pose, which makes it appear to be a fast antic. But, other games will animate it all to give it a more realistic look. 

    Each method has its draw backs and successes. For instance, if you animate the wind up yourself, from the idle pose, to make it look realistic it's going to take away from the responsiveness of the controls. Not really a good thing, but it depends on the game. If it's a fast paced game, chances are you wont want to do that. 

    Also, if you`re starting your attack from the idle stance, you also have to make sure that idle is a good idle to blend from. If the character is just standing straight up, as if you`re standing around doing nothing, it wont seem very realistic. In a lot of cases, you`ll want to have a regular idle, but also a combat idle, where if there is an enemy near by, or if you have your weapon drawn, you`re playing the combat idle where they look ready to fight.  

    Depending on the game, you might also have frame restrictions. I believe that shadows of mordor, the attack cycles have to "hit" by the 12th or 14th frame? I think it is? I could be wrong. But generally they are really quick. So, at 30 frames a second, you have to have an antic and an attack within half a second.  If you`ve having problems making it look right when you start in the idle, then you can take away some of the frames at the start so that your animation starts mid way through the back swing. Gives you more frames to play with for the rest. 

    This is my understanding of it so far. But, admittedly, I haven't personally done combat animations in game yet. My experience is more for non-combat AI and cinematics. Im sure someone around here has though. Hopefully they`ll jump in.
  • Greg DAlessandro
    Offline / Send Message
    Greg DAlessandro polycounter lvl 6
    What I'm going for is almost like a mix of Chivalry and Dark Souls. (1st person sword and shield combat) It won't be as in depth with the amount of attacks, but the combat will have that type of pace to it. I'm not sure how many frames to restrict the animations to. Also, right now I'm animating at 60fps in Maya.

    So regardless of if I animate the wind up or not, should there be 2 idle poses?:
    • Neutral Idle: sword + shield held at the sides of the hip angled downwards to the ground (standing around position)
    • Engaged Idle: shield + sword held upwards/in front of the character? (combat ready position)
  • slipsius
    2 idles is definitely the more realistic approach, and makes the gameplay more readable to your player. It's a good indicator of if you`re in combat or not.  

    Also, animate at 30fps. Really, the only time animators animate at 60fps is probably for slow motion stuff, I think. At least, in my experience. Could be other scenerios though.
  • Greg DAlessandro
    Offline / Send Message
    Greg DAlessandro polycounter lvl 6
    Alright thanks. I figured that your game is ideally running at 60fps, then the animations should also be at 60fps as well. Is that not the case? If it is not, is there a simple way to convert the anim to 30 from 60fps?
  • Greg DAlessandro
    Offline / Send Message
    Greg DAlessandro polycounter lvl 6
  • Archanex
    Offline / Send Message
    Archanex polycounter lvl 18
    We animated at 60fps when I worked on Killer Instinct. It made sense for that game because of how fast paced it is and how important the frame data is for a game like that. Animating at 30 is much more commonplace in my experience, as far as converting one to the other, I think the easiest way if you're using maya is to use a timewarp to stretch or compress the frames by a factor of 2.

    As far as starting your attacks from idle or from an anticipation pose... it really depends how much time you have until the "hit frame" In general, for faster/more responsive actions, you will want to start in a pose that is not quite idle, but not so extreme that it causes a noticeable pop when played back in game, where for for slower actions you can get away with starting from a pose that is very close to if not exactly your idle pose. You just have to experiment and see what works best for the type of game you're making. Good luck
  • slipsius
    Ohhh, interesting, Archanex! Now, I havent played that game. Does it have slow motion parts in it?  Like, does code every have to slow down the fight, in a replay or anything like that. 
  • Greg DAlessandro
    Offline / Send Message
    Greg DAlessandro polycounter lvl 6
    Great! Thank you.

    1) Is it more commonplace to move/animate the character root in Maya, or keep it at origin, and have the game engine control the root?
    Specifically regarding these animations:
    • Dodge/ evade - left/ right/ forward/ backwards
    • walking/ running - forward/ backwards
    • sidestepping - left/ right
    • jump - forward
    2) How would you go about animating/ blending walk animations? For example, lets say in UE4: when the character walks forward and slightly to the right or left, do you blend two animations together (walkForward + walkRight or walkLeft)?

    3) For quick combat (similar to Dark Souls or Chivalry) Should follow-through (of an attack) be handled by animation blending between anim-states in UE4? Do you treat follow-through as the same as anticipation, in the sense that I have to decide between realism vs responsiveness?
  • _adamturnbull
    This is all based on what I'd do from previous experience and could definitely be done in other ways but..

    1) I'd always keep the root at its origin and let the game engine control the root. If you need to move it initially to work out the footsteps and whatnot thats fine but I'd set it back to its origin once you've finished it.

    2) In the games I've worked on we usually have 8 directional animations. Forwards, backwards, side-stepping and one for each of the 45 degree angles. Then for your example just blend the forward with the forward-45degree angle. Blending a forward directly with a side-step could give weird results.

    3) I'd assume in a game like dark souls the follow-through would just be in the attack animation and then it would blend back to idle once its finished. Unless the player attacks again, then it would blend into the next attack or whatever movement the player initiates next
  • Archanex
    Offline / Send Message
    Archanex polycounter lvl 18
    slipsius said:
    Ohhh, interesting, Archanex! Now, I havent played that game. Does it have slow motion parts in it?  Like, does code every have to slow down the fight, in a replay or anything like that. 
    It does, but not exactly like you're thinking. The game has special shadow moves that the characters can perform, which are like powered up versions of special attacks. Basically when a player performs a shadow move the gamestate freezes for about 1 second, during that one second, a VFX will play on the player performing the shadow move, and  the startup frames of that attack are stretched out for dramatic effect, so if that move has 6 frames of startup, those 6 frames are stretched out over that one second since we didn't create special "shadow" versions of the special attacks. If this is confusing, just skip to around 7:38 to see a couple examples in the video and it should make more sense :)

    [url]https://www.youtube.com/watch?v=KkwWxSQOQ-U&feature=youtu.be&t=458[/url]
  • Archanex
    Offline / Send Message
    Archanex polycounter lvl 18
    Great! Thank you.

    1) Is it more commonplace to move/animate the character root in Maya, or keep it at origin, and have the game engine control the root?
    Specifically regarding these animations:
    • Dodge/ evade - left/ right/ forward/ backwards
    • walking/ running - forward/ backwards
    • sidestepping - left/ right
    • jump - forward
    2) How would you go about animating/ blending walk animations? For example, lets say in UE4: when the character walks forward and slightly to the right or left, do you blend two animations together (walkForward + walkRight or walkLeft)?

    3) For quick combat (similar to Dark Souls or Chivalry) Should follow-through (of an attack) be handled by animation blending between anim-states in UE4? Do you treat follow-through as the same as anticipation, in the sense that I have to decide between realism vs responsiveness?
    1. I think the easiest way to think about it is if the locomotion moves the character at a constant rate of speed, ie: walk, run, sprint etc then you should animate the character walking in place and let the engine control the movement. For animations where the character is NOT moving at a constant rate of speed, you'll probably want to animate the root bone, and uncheck enable root motion when you import that anim into UE4 (I still feel like UN checking a box that says ENABLE root motion is backwards if you DO want the character to use the root motion from the animation, but whatever)

    2. If you're using UE4, you should definitely read up on Blendspaces for this sort of thing. The idea is if you have a walk and a run, you can set the speed for the walk and a speed for the run and then easily blend between them

    3. Again I think this is a balancing act to see what works best for your game, I think you have a bit more leeway with attack RECOVERY than you do with anticipations. That being said, you definitely want to animate the recovery, If you just do a quick attack and then put a heavy blend on the end it's going to look and feel pretty bad. Ideally you could set up rules that allow you to break out of the animation after a certain point.
  • slipsius
    Ah ya, @Archanex ! That's really interesting! I wonder how animating at 60fps affects that. If it makes those shadow moves smoother or not.  Thanks for the info!
  • Greg DAlessandro
    Offline / Send Message
    Greg DAlessandro polycounter lvl 6
    Is it important to have the same amount of keyframes for both the walk cycle and run walk cycle? (for UE4 character animations)  My walk cycle loops at 25 keyframes. However, the guide for the run cycle  uses a 20frame run cycle. Is this an issue? Thank you.
  • SpecterShadow
    Offline / Send Message
    SpecterShadow polycounter lvl 7
    Its not an issue with amount of frames your cycles have,  walk, jog, run,sprint cycles and frames for them could be all different.
    Walk can go in 60 frames, really slow walk, and sprint in 16 frames, all them will be blended in game engine, however its important that your cycle starts from the same legs, if your walk starts from left leg up, passing position, your other cycle like run, jog, sprint should start from the same leg, if not, game engine blend behavior will not be so good as you expected.
  • Headless
    Offline / Send Message
    Headless polycounter lvl 5
    The following advice isn't specific to Unreal, it's just how we do it in games in general. For context, I'm a Senior Technical Animator at EA, and have previously worked for Ubisoft Montreal and Activision, so I have some experience with this.

    Walk Cycles: It depends on the engine / animation system, but for most games you would do multiple sets of left then right footsteps within a single walk animation (maybe 4 cycles). We do this to add variety to the motion and make the walk seem less bland. The thing to be aware of with this is that you need to keep track of what foot you're on (sometimes referred to as the footstep "phase"), so that if you transition to a stop (or to a plant and turn, or whatever other animation), you know whether to play say...a left foot stop, or a right foot stop. Typically the way you keep track of this is to add markup tags (different engines have different names for this; some might call it markup events, or meta-data, or whatever else). This is additional information that you attach to the animation to specify what footstep you're on at any given frame. Usually you do this in the engine but again, different engines have different requirements.

    In terms of how many frames for your locomotion cycles, again, that depends on the engine you're using and the specific setup that you're going for. In some cases you would have completely separate states for walk and run, and then you'd transition between the two (again based on on footstep phase). This is sometimes referred to as a "stepped speed" movement system, because you step between the different speed. In this case you don't have to worry about the number of footsteps or frames in each cycle: They're independent from one another.

    Alternatively you might have an "analogue speed" movement system, where you gradually blend from one animation to another animation depending on the amount of stick deflection. This one is highly dependent on the engine. Some engines have a pre-made construct for this and you just plug the animations in. In other cases you do it manually. If you're doing it manually, you want to make sure that you have the same number of footsteps in the walk and the run cycles. You also want make sure that they start on the same foot. Finally, you want to make sure that the cadence of the footsteps is roughly equal (so don't have like a limp, where one footstep is slow and the other fast, mixed with a standard cycle). The exception to this last point is that your engine might have a "phase blend" node (again, this is likely called something different in every engine), that will blend each footstep individually. If that's the case then you can put whatever footstep cadence that you want in the cycles.

    To make the cycles blend properly (this is with the manual method), you'd speed scale the walk and run animation so that they both match whatever speed your character controller is moving (based on stick deflection). You'd then set the blend value between the walk and run animation so that that's also based on the speed/stick deflection. This way your walk and run constantly stay in sync: If the stick is at 30% deflection, so like a normal walk, you would have a walk scaled to normal walk speed (so basically not scaled much at all), a run scaled down to slow motion, but because of the blend value, you'd see a much higher percent of the walk. If you then deflect the stick to 100%, both the walk and run would scale their speed up to closer to the run speed, and at the same time, the blend would start to show less of the walk animation and more of the run. That's a big difficult to visualize, so hopefully it's clear.

    As for the frame rate to animate to, I'd suggest 30fps. That's what most studios do, although I agree for something like a fighting game you might want 60 because it's so precise. There are actually 3 things to think about here: The animation frame rate, as in the frame rate you made your animation at, the tick rate, which is how often the game world updates, and the rendering frame rate, which is how often the game renders a new image.

    Unlike traditional drawn animation where a frame is a single drawing and you're popping between frames, in computer animation, the animation frames are defining a curve, and we interpolate between frames. This means that if you create an animation at 30fps, but the tick rate and the rendering frame rate are at 60fps or 120fps or whatever, you will still see movement on every frame. The game is just sampling the curve at a different rate.

    Going above 30fps is more work because it's more frames to define. The only reason to do this, is say you want very, very fast, stylized motion (like a fighting game), you may want to have sub-30fps movements, like a very high contrast melee strikes. Of course, if your game doesn't tick at 60fps or doesn't render at 60fps, you wouldn't see it anyway.

    Hopefully that helps.
  • Aabel
    Offline / Send Message
    Aabel polycounter lvl 6
    Motionbuilder is great for this, look into story mode (specifically clip matching) and animation triggers. Maya's new time editor should in theory allow for similar functionality but I found it to be more temperamental and less refined than motionbuilder.
Sign In or Register to comment.