Get the latest Education e-news
 

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

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

Activity Longevity
0/20 16/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 blue and the classname is in red
>> Root is the root (BoneContent type) of the given skeletan.
Root.Animations => (Animations is a property of type AnimationContentDictionary)

Animations: This property holds all the animations associated with a model(for e.g. walking, running, jumping) in AnimationContentDictionary.

AnimationContentDictionary : 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).

AnimationContent (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.
AnimationContent.Channels => (Channels is a property of type AnimationChannelDictionary)

AnimationChannelDictionary : Dictionary of <string name, AnimationChannel>
where name = name of the object being animated by each channel.

AnimationChannel (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.
class AnimationChannel : ICollection<AnimationKeyframe>
Thus, I said AnimationChannel "is" made up of a bunch of AnimationKeyFrame.

AnimationKey:
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:
Matrix Transform : Position/Orientation
TimeSpan Time: 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
sbodie
Junior Member

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

Here's a tutorial from the XNA website that in the least will be another resource for you to look through.

http://creators.xna.com/en-US/sample/simpleanimation
sbodie is offline   Reply With Quote
Old 04-09-2009, 09:29 PM   #3
brainydexter
Member

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

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
Reply


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 - 2014, Jelsoft Enterprises Ltd.
All times are GMT -8. The time now is 12:28 AM.






UBM Tech