Rendering Skeletal Animation

I'm looking for a sample that shows how to properly render skeletal animation using C# and MDX without using the framework.

I've tried the sample from Tom Miller's Managed DirectX Kick Start book, but I've come across a couple problems that I can't figure out. When the program runs it creates a reference device and renders the Tiny.x animation, but the model doesn't seem to be textured; it's all silvery.

The SimpleAnimation sample that came with the SDK works properly, so I tried looking for any differences between the two that might cause the problem, but I wasn't able to find anything.

I don't know if it's related, but I noticed that when I run the SDK sample, it renders the sample with a hardware device just fine, so I tried forcing Tom Miller's sample to render using a hardware device, but the program just crashes on Mesh.DrawSubset with a NullReferenceException.

I'm using Visual Studio 2003, DirectX 9.0c, and the October 2005 SDK. I didn't update to the December SDK because the updated source code from http://www.thezbuffer.com/articles/258.aspx for Tom Miller's book was written with the August 2005 SDK, so I figured updating would just make any problems worse.

I hope I made some sense. I just started learning how to use DirectX a few weeks ago.

Thanks in advance.



Answer this question

Rendering Skeletal Animation

  • Jayasankar-eSystems

    Hi there,

    is it possible to port the skeletal animation code from Tom Miller's Managed DirectX Kick Start book to MDX 2.0 beta (February SDK) I tried it but the AnimationRootFrame Structure is missing. Now I don't know how to link the mesh to the AnimationController.

    Are there any hints or examples on how to do this in MDX 2.0


  • smattessich

    Nevermind, I found my problem. I missed the line of code that disabled automatic event handlers to work around that Disposing bug, so I guess the mesh or its textures or something was getting disposed when it was supposed to.

    Thanks though.


  • JAGATCBA

    The updated code should work fine with December, the changes since August are trivial compared to the ones from when the book was writtern. So try the updated code and if you still have problems we can start from there.

  • Rendering Skeletal Animation