A skinned Model is an X/fbx file that contains a rigged model with animations in it.

As usual we will declare an object :
XSkinnedModel skinned;

Then we Add the X/Fbx file to the Contents Folder:
  1. Right-click on Content in the SolutionsTab > Add Existing Item > Select ur X/fbx (Eg. skele.fbx).
  2. After it gets added Right Click on the X/fbx (Eg. skele.fbx) > In the Properties Tab(Right-hand side) > In the Content Processor Menu Select "SkinnedModelProcessor".

After which we create an object in the LoadContent Method:
protected override void LoadContent()
        {
            skinned = new XSkinnedModel("PlayerMarine");
            //You can start an animation in the UpdateMethod also
            skinned.StartAnimation(<index OR Name OR Clip of the animation here>);
        }

StartAnimation Method
  • The index or name of the animation can be specified here.
  • AnimationClip is a class that can be specified here after it has been assigned.
  • Check out other helpful Members of XSkinnedModel for a detailed view.
Now in the UpdateMethod call:
      skinned.UpdateModel(gameTime);
       OR
      skinned.UpdateModel(gameTime, worldMatrix);

And as usual call skinned.Draw() in the DrawMethod inbetween The BeginDraw and EndDraw.

Last edited Jan 3, 2010 at 4:12 PM by adityav89, version 3

Comments

No comments yet.