An animation channel can be though of as a joint overrider. It is used to merge a list of animation together into one seamless animation (e.g. combining a running animation with an animation of the model pointing at something will yield an animation of the model pointing and running at the same time).
The animation channel modification goes as follows. For each model instance, I have a list of animation channels. Each animation channel has an associated animation sequence (startFrame, endFrame, currentFrame) and loop boolean (channel removes itself from the list if the sequence completes and loop is set to false).
I currently have only 2 channels defined, BASE_CHANNEL and UPPER_BODY_CHANNEL. Adding new channels is straightforward in my codebase.
The way I define an animation channel is pretty simple. For each model, I maintain a map which associates a channel to a list of joint indexes. To load the UPPER_BODY_CHANNEL, i simply find the joint named "torso" (a required joint name for my models) and add it and all of its children to the list for the UPPER_BODY_CHANNEL. BASE_CHANNEL is simply a list of all the joints.
Aside from cleaning up various areas of the model code, I also fixed a visualization bug that was really bothering me for quite some time.
To have the texture splats showing up properly, I added a real tiny tweak value to tile location, so that the splats would be rendered slightly above the base tile, and thus would not be lost during depth testing. The result of this produced some crappy results depending on where the camera was located (see below).
Well, I finally used glPolygonOffset to remove this ugly artifact, and was left with some nice results.
No matter what angle the camera is at, it always looks that good.