Sonntag, 2. März 2014

Today I completed a skinned skeletal animation tutorial, which is very helpful if you are just about to start with game development.Different from the other tutorials I found in the web, this one is very light weight ( < 800 lines for the main mesh & animation code ) and works well with most modeling environments.DOWNLOAD SOURCE + DATASummaryIt has the following properties / features:

GPU Skinning / Matrix Palette Skinning

Bump Mapping (automatic normal map generation)

Spheric environment mapping

Ogre XML Based

Shaders in GLSL

Visual Studio 2010

Select LOD level with F1..F5

It is ready to use, which means you can load and display the animated models in a few lines of code:

Convert the model from Ogre binary to Ogre XML (batch file is included)

Load the model in the tutorial code

The Main Skinning in GLSL:

The main skinning is done in the vertex shader and only requires a few lines.
For the shader, the skinning weights are stored in the color information as 3 floats.
The bone IDs are unpacked from the w coordinate of the position information.
The bone matrixes are stored as simple matrix array..