Skip to main content
gamedev.net
🔒 Locked

Master Animation Controller?

Started by DarkZoulz Jan 10, 2005 at 10:15 AM 5 replies 1.1k views
Original Post
DarkZoulz
DarkZoulz
Am I suppose to have one master animation controller that handle animations for all skinned meshes or one seperate controller for each mesh? The whole animation controller object seems pretty much undocumented in the SDK. MS seems to want us to look at their samples that always are quite cluttered. Maybe I should take a look at the multianimation sample then... =)
roos
roos
Yeah... unfortunately the whole character animation part of DX is a freaking mess :) The interfaces are poorly documented, there's not any really good tutorials online, and the skinned mesh SDK sample... bah

Anyway, I don't know what the correct way to do it is, tbh, but what I am doing is for every different mesh I have a different animation controller, which is shared by all *instances* of that mesh.. (So if I have a game with 1 type of main character and 1 type of enemy, then 2 animation controllers)

Of course this means that every time I want to render a different instance of a mesh, I have to reconfigure the animation controller based on what animation is currently playing for that character, oh well...
Specchum
Specchum
I'm struggling with the exact same problem. I'm trying to have multiple characters (like the multianimation example) with each having its own animation controller. I've managed to do it but now my code almost similar to the MS sample crap. :)

Anyone know how to load a key-framed animated mesh (non-skinned) seperately, a skinned mesh (with bones) seperately and a non-animated mesh seperately and get all of them to work together at the same time (load from three different .x files)? I'm going nuts trying to get this done! Any help or pointers would be much appreciated!
"There is no dark side of the moon." - Pink Floyd
WilyCoder
WilyCoder
How about a master animation controller class that has a STL vector of all the specific object controllers?
DarkZoulz
DarkZoulz
Ok, thanks! I guess I need to rewrite my code a bit then. But not too big of a problem though. ;)
DrGUI
DrGUI
For key-framed animation use vertex tweening and the horrible DX skinning for skeletal animation.

I am doing my animation framework now for my game.
I had the MeshSkinned which holds the mesh and the animation controller that the creation functions return.
If you want more than one animation instance on the same mesh you can use an AnimationController. This clones the animation controller and has a separate set of matrices (actually AnimationOuput objects in MDX - pain) so you can update all of the animations before queuing then for rendering.

The MeshSkinnedRenderer class which renders the mesh with the animation takes in either itself or an AnimationInstance, using an interface.

I am having difficulty getting my AnimationInstance to work with Tiny. Her hips and one leg is fine, but the top half is jerking about where it looks like her hand should be. That is with the Oct SDK and I'm getting the Dec SDK as I type, so I hope my problem will be solved by that, as I'm not doing anything wrong (yes - stepping through, asserts...)

Hope that helps!
Specchum
Specchum
DrGui, I have to admit you are right about DirectX skinning. It's pretty crap insofar that it is hard to use and the documentation isn't helping.

Regarding vertex tweening, I have no idea what this is. I'll have to read up on that then. I was rather hoping that I could save a normal animation in a .X file and read it in via some DX magic. I suppose not. :(

As for skinning with multiple instances, I did manage to get it done but not without some horrible code mangling. I don't even want to touch that bit of code again for some time. It works and that's that. :)
"There is no dark side of the moon." - Pink Floyd

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.