In tutorials, I see animators making arbitrary numbers for most of their animation.
For example, a melee attack - 40 frames.
Why is that so? Why not 5 frames? Why not 10? Or 3?
The number seems really out of the hat, unnecessary and unprofessional.
Unity3d interpolates between frames to match the FPS speed of the game so it doesn’t really matter (correct me if I’m wrong). It’s not 2D drawing animation.
For aiming animation, I just use 1 frame. Why not? Unity’s Mecanim system interpolates between idle state and aiming, so the animation is smooth when it transitions from idle to aiming pose.
That’s not a very nice thing to say about animators and mocap artists. How many frames should a melee attack have, then?
I can assure you it takes longer to swing a claymore overhead then it takes to jab someone with a knife. Hence it’s logical that a claymore attack has more frames. Plenty of games have a light and a heavy melee attack, or even a multitude of attacks. Have you ever played a game where the heavy attack was as fast as the melee attack?
That would lead to the player spamming the heavy attack because it’s flat out better, not a tradeoff between speed and damage, for example. So no, how many frames “a melee attack” constitutes is quite arbitrary. We do indeed get nice stuff such as interpolation so we, the designers of the game, can string them together according to the timings needed for our melee systems. Ultimately YOU decide how many frames an animation should be.
“I can assure you it takes longer to swing a claymore overhead than it takes to jab someone with a knife. Hence it’s logical that a claymore attack has more frames.”
Why is it logical? You could have the same number of frames, just change the animation speed.
That would introduce an upper limit to the amount of keyframes based on the arbitrary needs of one developer. So how much would be enough? Twenty? Fourty? The reality of the matter is that a quick knife jab uses less keyframes then a claymore swing, let alone a character doing a fully motion capped action for 2 minutes. As such, the number of frames AND keyframes depend on the animation, not the way one developer wants to use them.
That being said, if you absolutely need a few animations to all be 40 frames for some reason, you can copy the original animation’s keyframes into a new Animation, and slink it to 40 frames before implementation in your game.