Applying animation tracks to specific frames in a DirectX frame hierarchy?
I was wondering if it's possible to separate which frames get which animation tracks in DirectX. The animation controller seems to be very specific to the entire hierarchy and I'm not sure if there is a way to separate this without having to create a whole different clone to the animation controller and substituting the bone transforms (which I would imagine would be a fairly messy process).
I'm not positive what you mean by "frames" in the context of your question. Do you mean hierarchy frames (bones, joints)? If not, perhaps you can explain it differently.
Yes, the animation controller is specific to a particular hierarchy and applies to the entire hierarchy. If you want to apply an animation to just a particular set of bones/joints in that hierarchy, it might be very difficult. When the animation controller Advance function is called, it updates all the frame transform matrices in the influence bones in the hierarchy (which it appears you understand).
You probably know this: it's possible to blend two or more tracks together with a fraction of each track applied at a particular time. But it sounds like you, perhaps, want one track to be a "shoot" animation and another track to be a "run" animation and have them applied in full simultaneously to have the character run and shoot at the same time. That isn't directly supported.
Commonly, you'd have to have separate "run," "shoot," and "run-and-shoot" animations.
EDIT: you don't necessary have to have cloned anim controllers. You wouldn't want to apply two separate animations by two anim controllers to the same hierarchy simultaneously.
Is that what you're asking?
Yes, the animation controller is specific to a particular hierarchy and applies to the entire hierarchy. If you want to apply an animation to just a particular set of bones/joints in that hierarchy, it might be very difficult. When the animation controller Advance function is called, it updates all the frame transform matrices in the influence bones in the hierarchy (which it appears you understand).
You probably know this: it's possible to blend two or more tracks together with a fraction of each track applied at a particular time. But it sounds like you, perhaps, want one track to be a "shoot" animation and another track to be a "run" animation and have them applied in full simultaneously to have the character run and shoot at the same time. That isn't directly supported.
Commonly, you'd have to have separate "run," "shoot," and "run-and-shoot" animations.
EDIT: you don't necessary have to have cloned anim controllers. You wouldn't want to apply two separate animations by two anim controllers to the same hierarchy simultaneously.
Is that what you're asking?
Quote:Do you mean hierarchy frames (bones, joints)? If not, perhaps you can explain it differently
Ah yes, I mean bones, joints etc. Sorry that was ambiguously worded, I've been working with D3DXFRAME stuff for a while and I'm starting to forget that :P
Quote:You probably know this: it's possible to blend two or more tracks together with a fraction of each track applied at a particular time. But it sounds like you, perhaps, want one track to be a "shoot" animation and another track to be a "run" animation and have them applied in full simultaneously to have the character run and shoot at the same time. That isn't directly supported.
Yeah I pretty much want stuff like that, currently I have basically loaded up the hierarchal mesh and render it twice, once for the lower body, once for the uppder body, and I synch up their animations as needed. It's a bit fiddly and honestly I'm not too proud of the code..
Re: D3DXFRAME - Okay. That makes sense and your terminology is fine, actually. It's unfortunate the word "frame" has several meanings in animation.
If you're using a shader, and you're willing to do a lot of messing around with arrays of matrices, you could perhaps (I haven't thought this through entirely):
- calculate frame transforms for one animation
- save those matrices to an array and reset the frame transforms
- calculate frame transforms for the second animation
- mix and match the frame transforms, storing matrices for only those bones you want to move for animation 1 in the appropriate array positions and doing the same for animation 2.
- send that "mixed" array of matrices to the shader for rendering
That seems really messy compared to combining animations in a modeling program for each combo you need. Admittedly, that could run into quite a few animation sets, but that's how it's normally done.
If you're using a shader, and you're willing to do a lot of messing around with arrays of matrices, you could perhaps (I haven't thought this through entirely):
- calculate frame transforms for one animation
- save those matrices to an array and reset the frame transforms
- calculate frame transforms for the second animation
- mix and match the frame transforms, storing matrices for only those bones you want to move for animation 1 in the appropriate array positions and doing the same for animation 2.
- send that "mixed" array of matrices to the shader for rendering
That seems really messy compared to combining animations in a modeling program for each combo you need. Admittedly, that could run into quite a few animation sets, but that's how it's normally done.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement