Saturday 23 November 2013

Touch It Again I think It Moved!

Boss: Bob can you animate a character for me?

Bob: Sure boss. 

Boss: Nice! There's one catch though. The client wants it done "traditionally", that means moving the pixels around to the next pose. 

Bob: OoooK? what character do you want me to animate? 

Boss: This one: 

Bob: WHAT!! I can't do that! That guy has a TON of pixels to him! 

Boss: Well joke's on you cause pixels don't weight anything, and you have two weeks. Have fun! 

I hope you liked my little script there but they really did used to animate video games but moving around the pixels so that they formed each sequence of a single movement like a a walk or an attack. 
These separate posses would then be placed in a row where they can be loaded one after the other into the game at a fast enough rate that it gave the illusion of movement. This form of animation was known as sprite animation. 

it looked something like this
 Though that is not how things would stay. Eventually developers began to make 3D games, and no I don't mean 

I mean THIS

LOVE this game!!
and this

One of the best multiplayer experiences I ever had.
But with new graphics comes new ways of doing them such as rigid hierarchy animation. Which involved creating the models (3d objects in the game) as a set of pieces. These pieces were modeled after the parts of the body that typically would not bend, like the forearm or the thigh. These pieces were linked to each other in a hierarchical order that resembled the way the model would be put together in reality such as right hand  > forearm > upper arm > torso. This allowed the models to be moved freely with their limbs following like they should. But this method had a problem due to the models being made up of rigid parts. As the models were put into various poses they would show "cracks" around their joint areas, "cracks" being areas where the pieces would separate showing some spacing between pieces. You can typically see it in really old 3D games such as virtua fighter.


Though this is not so common now since we use different methods than rigid hierarchy. One such method was per-vertex animation which involved moving each of the vertices of a model. Vertices being the points on a model that make up a the polygons.  The motions of these vertices were then exported for use in the game. But calculating the motion of every vertex is very calculation heavy which is not good for the processor and can slow down the game. Which is why this method was not used very often for games. 

An alternate method is using morph target animation which is similar to per vertex animation in that it still involves the vertices but uses predetermined sets of positions so all that's needed to display the movements of a model is to linearly interpolate between the set positions which is much less calculation heavy. This method is usually used for facial expression as it allows the artist to create the various facial expressions which the model can them be morphed to as needed but moving the vertices themselves to make each pose for the animation can be quite trouble some so another method is used. 

This method called "skinned animation" uses a skeleton to manipulate the model. By attaching the model or "skin" to the skeleton the model moves as the skeleton does. The vertices of the "skin" keep tabs on the movements of the skeleton via its "joints", the areas of the skeleton between the bones that allow it to bend. You know, joints! 

That's what your knee looks like on the inside!
This method also made use of what's called a weight map which is essentially a texture that holds the amount of influence that each joint has in the vertices of the model. When applied, this method allowed the model to move more naturally. This produced results aesthetically pleasing and wasn't computation heavy which made it the most used method of animation today. 



Sources

Gregory, Jason.Game Engine Architecture. Boca Raton: CRC Press, 2009.







No comments:

Post a Comment