Saturday, June 13, 2009

AVATARS 101

One of the cool new features included in the now available 3.1 version of the XNA Framework, is the support for "Avatars".

But what is an "avatar" anyway?

During the 4th quarter of 2008 the XBox 360 User eXperience (UX) was enhanced with an awesome change in the look'n'feel of the Dashboard.

As part of this "extreme make-over", quite really cool 3D-animated characters were added to the system to represent gamers.

How come? Well, once a user is logged in, she/he can customize how her/his avatar looks: body, cloths, apparels and so on. And if the user has a XBox Live account, that avatar description will be also available on the Xbox Live servers when sined-in, representing her/him with other friends.

You may wonder: "Ok, I got my avatar but, can I use it in a 360 game?" The answer is: "Yes, as long as the game supports the use of avatars".

The video below shows the use of avatars in the 360 game called "Uno Rush".

Now, going back to the XNA Framework 3.1, what is it supported, exactly? And how can we properly use these avatars in our XNA-based games?

To start with, avatars are only available on the XBox 360. Meaning that "Games For Windows - Live!" does not support it,

Visit Dean Johnson’s blog -developer in charge of implementing avatars support in 3.1- for more in-depth info about this feature,

The skeleton is not available for the public yet but it was mentioned that a Maya skeleton rig will be published sometime in the future (no dates posted though), and

Right now, there is only support for built-in animations, so once the skeleton gets released, and unless an official sample is provided when that happens, you will have to create your own "CustomAnimation" class to handle your own animations. Again, more information will be provided by the XNA Team in the future.

Any code snippets? Fortunately, there are great official and unofficial samples and articles out there explaining "How-To":

Next week I'm going to post an example showing how to create, render and process a transition out from one animation to the next one, as a slightly different approach to the method included in one of the samples of the XNA Team.