Animating Avatars

We are still building the avatar display. The most important part of the avatar display are the avatars. There are also chat balloons, nicknames, menus and more GUI stuff, but avatars are the most important part. And we want ths avatars to be animated.

What do we need for animated avatars?
  1. a renderer which puts pixels on the screen
  2. an animated avatar in whatever format
  3. a decoder, that decodes the avatar data
In the previous posting I discussed cairo as the renderer of choice. That's point 1. We now have to decide on point 2, the animation format and choose (or make) a decoder for that format. Of course, the decoder is strongly related to the animation format.

What is an animation format? An avatar can perform multiple actions. It can stand, walk, wave, etc. Therefore, we need not just one, but a set of animations for a single avatar. An animator component will then decode one animation sequence of the set and display frame after frame. If the avatar is supposed to wave, then the decoder will play the "wave" animation. Usually it will just play the "stand" animation. And when the avatar moves, then it should play a "walk" animation. So, the avatar format must provide multiple animations.

Lets review our options for an animation format
This list is very incomplete. Proposals are welcome.

Real 3D models would be cool, but I am not really a 3D expert. So, we will start by investigating the "config.xml" option.

This means: we need an XML parser (already in the Apollo framework) and a GIF decoder, which is capable of animations. Typical graphics libraries are candidates for the job. We are currently checking which library is capable of loading animated GIFs from memory and from file and be integrated into the project. Getting to know a code library takes some time. So, this will take a while. We are checking:
  1. OpenCV (no GIF?)
  2. CImg (no GIF?)
  3. GraphicsMagick (very complex, GIF loader not found)
  4. DevIL (GIF only from file, but we need decoding also from memory)
  5. GIL (GIL from Adobe does not support GIF)
  6. CxImage (GIF works)
  7. Imlib2 (could not find a Windows MSVC build)
  8. ...others?
The high profile image libraries seem to ignore GIF. This sounds weird, but is logical. GIF has only indexed color with max. 256 colors. It is not suited for real image processing applications.

Only CxImage survived the test. This is not an optimal solution, because CxImage is Windows based. It must be replaced for a Mac/Linux port. Replacing CxImage should not be too difficult, because there are only few lines of code in the application code. Basically loading an image file and iterating through the frames.

We do not want to spend too much time on this. So, we will now continue with the latest CxImage version.


Sven said...

Xaml (supports storyboards)
Flash (practically timebased)

Cujo said...

Tut sich hier noch irgendwas oder wurde das Projekt aufgegeben?

Heiner said...

Es lebt noch. Es geht langsam. Weil wir arbeiten zum Leben und nur in der Freizeit daran arbeiten können.

Post a Comment