Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Night Elf

Animation blending in DX9

This topic is 5628 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The DirectX 9 docs mention blending many times, especially in the ID3DXAnimationController reference section. But it isn''t clear (for me, at least) what they are talking about. Is it possible to blend two animations together so as to achieve a smooth transition from one to the other using the new DX9 interfaces? If so, how do you do it? (A source snippet would be great).

Share this post


Link to post
Share on other sites
Advertisement
I''ve been playing with the Mesh Viewer source code, trying to make tracks 0 and 1 blend but I''ve been unsuccessful.
These are the functions I''ve tried (they all belong to the ID3DXAnimationController class):
- Key/SetPriorityBlend()
- Key/SetTrackAnimationTime()
- Key/SetTrackEnable()
- Key/SetTrackWeight()
- RegisterAnimationSet()
- SetTrackAnimationSet()

Share this post


Link to post
Share on other sites
I've also been experimenting with animation blending, and like you, I've also been unsuccessful. For some reason I can't get anything other then track 0 to animate. Everything from track 1 and up doesn't work.

Has Anyone successfully blended between two animated tracks?

[edited by - MagTDK on December 26, 2002 12:28:20 PM]

Share this post


Link to post
Share on other sites
quote:

Does ID3DXAnimationController::GetMaxNumTracks return more than 1 track?


Yeah, it returns: 2

I'm loading two animation sets.

I can do this:

      
LPD3DXANIMATIONCONTROLLER AnimationController;
LPD3DXANIMATIONSET AnimSet;

AnimationController->GetAnimationSet(1, &AnimSet);
m_pAnimController->SetTrackAnimationSet(0, AnimSet);


But this only renders track 0. Can't I just render track 1 directly without getting and setting the track?

[edited by - MagTDK on December 26, 2002 1:06:41 PM]

Share this post


Link to post
Share on other sites
I''ve also been unsuccesful so far with blending animations. I can play different tracks, but whenever I switch animations, the transition is not smooth, it just resets to the new animationset.

Share this post


Link to post
Share on other sites
I would think this portion of code would blend from track 0 to track 1 but it doesn't.

AnimationController->KeyTrackWeight(0, 0.0f, AnimationController->GetTime(), 0.5f, 0);
AnimationController->KeyTrackWeight(1, 1.0f, AnimationController->GetTime(), 0.5f, 0);

There's something I'm missing

[edited by - MagTDK on December 26, 2002 2:17:40 PM]

Share this post


Link to post
Share on other sites
How I wish the DX9 docs were complete (or something other than 90% function prototypes).

Anyone planning on writing up a nice tutorial on using the animation classes in DX9? (maybe in C#)

Share this post


Link to post
Share on other sites
Even before you get to animation blending...how do you export a 3DS model with more than one animation or timeline?

Cheers.

Share this post


Link to post
Share on other sites
quote:

How I wish the DX9 docs were complete (or something other than 90% function prototypes).



I agree with you, Pseudo. It''s really hard to learn from the DX docs... The only way to learn form the SDK is to decrypt the poorly-commented source code of the samples. Unfortunately they haven''t included an animation blending sample :-(

Thank you all for your replies.
I will keep looking into animation blending and will post anything I find. I hope you do the same.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!