Horde3D

Next-Generation Graphics Engine
It is currently 25.11.2024, 18:09

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 15.09.2008, 20:36 
Offline

Joined: 10.04.2008, 09:13
Posts: 86
Why is there a limit on the number of animation stages? My character has over 30 animations, so changing "MaxNumAnimStages" fixes this, but I was wondering if there is a design decision about this.


Top
 Profile  
Reply with quote  
PostPosted: 15.09.2008, 22:46 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
It is safe to increase the limit but there is a pointer array for each animatable node that has MaxNumAnimStages elements, so it should not be much higher than required to save memory.


Top
 Profile  
Reply with quote  
PostPosted: 16.09.2008, 01:31 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
Are you blending 30 animations at a single time?!?!?
Otherwise you should probably just write up an animControl class, that uses Horde3D::setupModelStage().


Top
 Profile  
Reply with quote  
PostPosted: 16.09.2008, 08:30 
Offline

Joined: 22.05.2008, 18:30
Posts: 37
The way we attempted to do animations in Plight of the Weedunks involved using three of the animation blend channels.

Basically, you'd have a previous animation, your current animation, and a possible next. You could simplify this to just two channels easily, but we were trying to "pre-cache" animations as there were some which only followed on after specific actions, so the three-channel split made some sort of sense.

In this way, when an animation state changes, you fade out Current while fading Next in, then just move them down the line so that the "Next Channel" is free for whatever you're planning on doing afterwards.

Unfortunately, we had some odd bugs in this method in that we were moving the animation states down too quickly, so the weights weren't sorted by the next render frame, causing some interesting artifacts... this was a problem with how I was implementing it, and as I had a huge amount of other work to do, we eventually ripped out the animation blending, and used "immediate animations" where it just uses the one channel and changes whenever a new animation is called ( though we still kept the "pre-cache" system of following animations on after others where needed )

Dunno if that's of any use to you, but that's how I saw the animation channels/stages being used for.. obviously they can be interpreted in many ways which is the nice thing about programming, there's always a few ways to do the same thing ;)


Top
 Profile  
Reply with quote  
PostPosted: 16.09.2008, 08:41 
Offline

Joined: 10.04.2008, 09:13
Posts: 86
My strategy is to load all animations in different stages and "trigger" an animation to increase to a certain weight.
Unless the animation is triggered again the weight will decrease. So when there's no trigger all animations will go to weight 0, except for the idle animation. This produces very nice blending. For instance
my character can run, strafe, jump, fire and get shot at the same time.


Top
 Profile  
Reply with quote  
PostPosted: 16.09.2008, 09:09 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
I doubt that it looks like running and jumping at the same time if you just blend those animations together, does it? Normally those animations would manipulate the same joints and just blending them with some weighted influences should lead to strange looking animations.


Top
 Profile  
Reply with quote  
PostPosted: 16.09.2008, 10:11 
Offline

Joined: 10.04.2008, 09:13
Posts: 86
Well of course it's a bit more complex. There are different types of animations, some loop others play once. Some start from a specified joint, some have higher priority and some cannot combine. Running and jumping for instance causes the jump animation to increase in weight very fast up to 1 with a higher priority than running, so the running blends very quickly into jumping. Just before the jumping animation finishes (on like 2/3rd) it's weight goes down which causes the running to blend in again. Firing woks the same but with an even higher priority. And so forth...


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Google [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group