Skip to main content
gamedev.net
🔒 Locked

ID3DXAnimationController problem

Started by roos Dec 23, 2004 at 8:22 AM 1 replies 700+ views
Original Post
roos
roos
Hi, Does anyone know how to blend 3 or more tracks of a skinned mesh with the ID3DXAnimationController interface? I'm working on a game which requires that multiple animations be blended together simultaneously, but when I call GetMaxNumTracks() on the ID3DXAnimationController, it returns only "2". Indeed, if I try to create a new track beyond track 0 and track 1, it crashes :( Trying to find some info in the DX documentation but it's hard to come across this info... Any help would be much appreciated! Also, in the event that I can't get this to work, might have to ditch D3DX altogether and code up a character animation system from scratch. Besides, the artist I'm working with is still having a heck of a time trying to export to .X format... So are there any pre-existing pieces of code or good libraries for character animation that you guys would recommend? I've heard of Cal3D, haven't really looked at it much tho... Thanks, roos [Edited by - roos on December 23, 2004 8:47:51 AM]
Bulma
Bulma
I think you need to create new instance of AnimationControler (or maybe clone existing one), with number of tracks that you need.
This is just default one created with 2 tracks, it saves resources, as you usually don`t need more than 2 tracks ;)

Bulma
roos
roos
Whoa! I (stupidly) didn't even consider that it was really capable of more, and two animations was simply the default behavior. Alright! Thanks a lot, if you're right then you're my new hero :p

EDIT: I tried it and it worked! Man, it was only like, 2 lines of code I had to add to get this all working once I found there was an ID3DXAnimationController::CloneAnimationController() function which could create a new interface w/ more tracks. I don't think I would have thought of this (I was about to switch to Cal3d actually) so thanks again very much :)

[Edited by - roos on December 23, 2004 11:43:50 PM]

Topic Locked

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

Sign in to reply to this topic.