Re: [Plib-devel] key frame animation approach - aka Dance Moves
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-04-08 03:24:39
|
> Dave McClurg wrote: > > In order to implement key frame animation from ASE files (TM_ANIMATION samples) I need a selector that can choose between ssgTransforms. I am considering the following approach: > > use a ssgSelector (or derived class) branch. the branch would have ssgTransform kids all sharing a single ssgVtxTable kid. the selection would cull the correct transform to be applied to the kid. > > The problem with this approach is the limit of 32 total selections. The selector branch may easily have hundreds of transform keys to guide a camera around the scene or a bird in it's flight path. I'm trying to get a humanoid figure to do a single dance move and it takes around 70 keys to finish the spin. I think that if you are storing a LARGE chunk of matrix-type stuff, you wouldn't want to use an ssgSelector at all I think. If you have dozens of keys, the amount of memory consumed by all those SSG nodes would get out of hand pretty quickly. You'd also (presumably) want to use some keyframe interpolation - surely the file doesn't store a matrix for every frame of an animation? Pushing the actual matrices one level down from the selection mechanism makes doing this interpolation impossible in an elegantly structured manner. Perhaps this is the kind of thing that would be better left to the application, but if you want to do it in SSG, I think we need a new node type (derived from ssgTransform I guess) which knows how to do this. > my approach is to create a ssgBaseSelector to remove the limit of 32 total selections. the constructor will take a count 'ns' and i'll use a flag array to keep track of the selections for culling. This should not impact any existing code. ssgBranch will construct a ns=32 ssgBaseSelector. This change will not happen until 1.3 development gets underway. > > Any comments or suggestions? This seems a little unwieldy. -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |