Get the latest Education e-news

Go Back   Game Career Guide Forums > Programming
Forum Home Register Members List Mark Forums Read

Thread Tools Display Modes
Old 04-08-2009, 09:43 PM   #1

Activity Longevity
0/20 17/20
Today Posts
0/11 sssssss77
Location: N. America
Default Bone Animation Concept in XNA

Aighh..I am trying to learn to make the animation stored in a model to work in xna. Now, I have been reading some stuff and I understand that XNA processes the animation data, but thats about it. Well, I read a couple of few things and I just want to make sure that what I understood is correct (so, this post can run long, and >> I warned you ).

Here it goes :
Syntax is in [COLOR="RoyalBlue"]blue [/COLOR]and the classname is in [COLOR="Red"]red[/COLOR]
>> Root is the root (BoneContent type) of the given skeletan.
[COLOR="Blue"]Root.Animations[/COLOR] => (Animations is a property of type AnimationContentDictionary)

[COLOR="Red"]Animations[/COLOR]: This property holds all the animations associated with a model(for e.g. walking, running, jumping) in AnimationContentDictionary.

[COLOR="Red"]AnimationContentDictionary [/COLOR]: is a dictionary of <string name, AnimationContent>
where name = name of the animation and AnimationContent is the animation data for that animation of the whole model

Thus, one AnimationContent describes a single animation (for e.g. walking).

[COLOR="Red"]AnimationContent [/COLOR](e.g. WALK):
It contains a collection of data channels. Also, it represents one complete animation for the model; which can be visualized with all the data channels working together.
[COLOR="Blue"]AnimationContent.Channels[/COLOR] => (Channels is a property of type AnimationChannelDictionary)

[COLOR="Red"]AnimationChannelDictionary [/COLOR]: Dictionary of <string name, AnimationChannel>
where name = name of the object being animated by each channel.

[COLOR="Red"]AnimationChannel [/COLOR](e.g. Movement of right leg in WALKing animation= 1 AnimationChannel):
It is a collection of Keyframes describing the movement of a single object/bone.
[COLOR="Blue"]class AnimationChannel : ICollection<AnimationKeyframe>[/COLOR]
Thus, I said AnimationChannel "is" made up of a bunch of AnimationKeyFrame.

It describes the position of AnimationChannel at a single point in time, a.k.a, the position of the associated bone/object (from the AnimationChannelDictionary.Key (string)).
It comprises of these members which completely describe the AnimationChannel:
[COLOR="Blue"]Matrix Transform[/COLOR] : Position/Orientation
[COLOR="Blue"]TimeSpan Time[/COLOR]: Time instant

I want to know if I understood these three things correctly or not? Is there something that I am missing here? Also, I will soon be posting about using animations in XNA and I will be using these classes to extract the animation info. Thus, I wanted to be crystal clear with them, before I proceed.

Also, this might sound like a dumb question, but What is the difference between meshes and bones ?

Thanks a lot

(My source has been mostly msdn)
Twitter ~ Blog

Last edited by brainydexter : 04-08-2009 at 09:45 PM. Reason: some more info
brainydexter is offline   Reply With Quote
Old 04-09-2009, 07:28 AM   #2
Junior Member

Activity Longevity
0/20 16/20
Today Posts
0/11 sssssss13
Location: Nashville, TN

Here's a tutorial from the XNA website that in the least will be another resource for you to look through.
sbodie is offline   Reply With Quote
Old 04-09-2009, 09:29 PM   #3

Activity Longevity
0/20 17/20
Today Posts
0/11 sssssss77
Location: N. America

Thanks for the link

They take individual parts from a model, and animate it via transformations from code.

I am trying to write a generic library which would let u animate .x models. I have actually written the model processor, content reader/writer for it. But, need to write the last class which would bring it all together..anyways, ill keep posting here as i make progress.
Twitter ~ Blog
brainydexter is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.
All times are GMT -8. The time now is 07:56 AM.

UBM Tech