Wednesday, 23 June 2010

Three-dee

OK, so I wanted to do all the graphics in 3D using (surprise, surprise) a cel shader to eliminate the need for texture work.

However, for any good 3D robot game you need animated models. And, it turns out, this is quite tough. It seems that XNA actually doesn't have any built in animation support. While the content pipeline can access the bone and animation data in models, it just doesn't. So, what to do.

Well, you can override the content pipeline for models by creating a new content handler for animated models. It loads in the animation and skeleton data and saves it in the model's Tag attribute, for access later. It's then not too tough to animate models.

Also, it turns out that there is a handy example by the Microsoft peeps of how to do exactly that, so I stole it.

Unfortunately, there is then the problem of separating frames into animations. The Maya plugin doesn't do this, for some annoying reason, so I've written a tool which allows you to composite animated model files into one model with several animations.

Nifty!

Now, on to some real programming!

No comments:

Post a Comment