I have question about 3d animation. I know that 2d games with sprites have a set number of frames, a move may require 3 frames and there will never be a frame between the 2nd and 3rd frames because it doesn't exist. Now my question is, are 3d games animated via frames or is the whole motion created but only certain frames will be displayed?
Or maybe the whole motion is made, but programmers only allow certain frames to be shown so frame data is consistent?
For example in Smash Bros. Samus for example can attack with her arm cannon in the 2nd hit of her jab. Did the animators only created 3 frames? One with the Cannon above her, one with her arm extended in front and in with the cannon below near her legs. Or did they create a whole motion but the game speed only allows those 3 frames?
Maybe Smash is different, and we could use Street Fighter 5 as an example.
TL;DR: do 3d games have "whole " motions for animation and the game only shows certain frames or just key frames are created and there are no " in-between " frames?
I don't know how to ask the question, lol
This may be somewhat oversimplified:
For 3D games in *general*, the animation will generally consist of a start and end point (or a sequence of points in between), with an expected traversal time, and the software interpolates to find the actual location required at the given frame time.
So, for instance, imagine a simple animation of a square moving along a line, taking 1 second to do so.
At 0 seconds:
Code:
[]----------------------------------------
At 0.5 seconds:
Code:
--------------------[]--------------------
At 1 second:
Code:
-----------------------------------------[]
Because the framerate may be variable, it's not strictly well-defined *which* interim position is needed at a given time, so instead it's calculated; the software knows the start position of the animation, it knows the end position, and it knows what proportion of time has elapsed since the animation has begun, and from that it can extrapolate the interim data.
The bar is 40 -'s long.
At... 0.4 seconds?
(40*0.4 = 16)
Code:
----------------[]------------------------
At... 0.825 seconds?
(40 * 0.825 = 33)
Code:
---------------------------------[]-------
(It's worth mentioning that - in general - this gives much *smaller* animation data than a set of defined points per-frame, too; perhaps less of an issue today, but animation data can get surprisingly large and on earlier memory-starved systems, that space may have been at a premium)
I did emphasise at the start of the post that I said that was true for 3D animation in general, but I do have to highlight that I'm not sure if that's necessarily the case for frame-dependent games. I would *imagine* it is - a fixed framerate would still give the consistent behaviour the enthusiasts would appreciate, while still having the size benefits of the interpolation method. If the framerate isn't necessarily guaranteed to be fixed... I'm not sure what the best approach would be.
It has to be said, though, I'm not a big fighting game fan, so I'm not quite sure if the whole
notion of frame data has adapted *anyway*. As a non-fan, it strikes me that there's not a great deal of difference between "Hit the button between frame 3 and 7" and "Hit the button between the point where the fist is *here* and the point where the fist is *here*".