Mylovetechnology

The Complete Blog On Technology

Skeletal Animation’s Technique compares CPU-based & GPU-based implementations

Posted by Kamleshwar Bhatt On July - 25 - 2009

Skeletal animation is one of the advanced real-time animation technique which is the commonly used technique. In this skeletal animation, a model is converted into a simplified representation which is consists of a number of bones to define the model’s skeleton which are organized into a hierarchy.

By positioning the bones into some number of key frames specified as relative transforms for each bone, the animation is defined. Then the positions of Bone can be interpolated between key frames. A polygon mesh, the model’s skin is layered on top of the bones. By single or more bones in the skeleton, every vertex of the mesh is influenced. Skinning is the process of matching the current bone positions to the model’s skin and modifies the position of every vertex based on the current bone positions. The game engine finds the appropriate animation time and sequence at runtime; it transforms the skeleton to the appropriate position, skins the model and draws the model finally.

The game engine identifies the animations currently applied to a model which may have multiple animations applied simultaneously to determine the position of skeleton for a given render frame and it extracts the suitable key frames for the animation sequences and these key frames have information to transform each bone from its reference position to the specified position by the key frame. The bone transformations are interpolated from the two key frames (surrounding frames) for each animation. The whole work is typically performed on the CPU.

Skinning moves the polygonal mesh of model to the correct animated relative position. In this, each vertex is transformed first from the mesh’s reference position to the bone’s reference position. Using the bone’s transform, vertex is moved to its final position. Each bone’s influence is calculated independently if the vertex is influenced by number of bones and then possibly with different weights for each bone, they blended together to determine the final vertex position. Skinning may be performed on the GPU or on the CPU (referred as “GPU-based skeletal animation” or as “CPU-based skeletal animation”). Where GPU based skeletal animation can take advantage of high throughput of modern GPUs. In GPUs implementations, skinning is faster and requires less memory than CPU-based implementations. But for some applications it may be advantageous to perform skinning on the CPU. Skinning performance on the CPU improves compatibility across a huge range of systems. The older systems may have graphics cards which do not support the necessary features for skinning performance on the GPU. Graphics cards that allow skinning on the GPU may have some limitations that force huge skeletal models to be subdivided into number of meshes that reduce efficiency.

To temporary buffers or surfaces, some rendering techniques require a mesh to be drawn number of times. For every rendering pass, any vertex transformations need to be recalculated on the GPU as intermediate results cannot be saved. It may cause performance by vertex program execution to be limited on today’s mainstream GPUs.

So, our article introduces the technique of skeletal animation and compares CPU-based and GPU-based implementations. We hope now you understand this process.

Blog Widget by LinkWithin

Leave a Reply