I use Blender and Unity3D for 3D game development.
I would like to ask: how many frames should game animation have?
In tutorials, I see animators making arbitrary numbers for most of their animation. For example 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.
Typically, animations are designed at 30hz-- 30 frames per second of animation. The reason why a melee attack might be designed to use 40 frames is because the action takes 1.33 seconds to pull off, to look right. That’s artistic, subjective, but it’s not arbitrary, not given the framerate these animations are built at.
Now, why 30hz? That’s arbitrary. You could build your animations for a different rate. Like you say, it’s going to get interpolated into your actual, running framerate anyways. 30hz is just something that people are used to using for other kinds of animation data, that’s not too low of a number to give good detail, and not too high of a number to manage the data, not too high of a number that you’re wasting memory, and as an even multiple of your likely framerate cap (30 fps, 60 fps, 120 fps) it’s not going to give you any sampling error (when capped).
(Why are framerate caps integer multiples or fractions of 60? Because the alternating current that feeds our homes runs at 60hz or 120hz, and that impacts cathode ray tubes, which used to be how you interacted with games.)
Way back when, games were made with 10hz animations instead. Quake was made with 10hz animations. There wasn’t much point to 30hz animations when nobody could get 30 fps anyways on their unaccelerated 100Mhz Pentiums…
I wouldn’t call a one-frame aiming animation an animation. It’s static. 1 frame is a pose.