animation advice - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: animation advice (/thread-3295.html)
animation advice - wyrmmage - May 7, 2007 02:25 PM
My 3D game that I'm working on supports 3D hierarchies, and I need it to support them in animation too. I'm thinking about using key-frame based animation, and I'm basically wondering:
Would it be better to store the rotation/translation of every key-frame in an array, have a set time that each keyframe takes, and then calculate the translation/rotation of the object based on how much time has gone by between each keyframe, or would it be better to have an array of the key-frame values, and then have an array with varying times in it for each keyframe (so if the object was going in a line, it would use less keyframes and have a different time), and then calculate the translation/rotation based on how much time has gone through on the current key-frame?
Sorry if the explanation was hard to follow
Thanks in advance
animation advice - ThemsAllTook - May 7, 2007 02:40 PM
Both seem viable. If you're comfortable constraining yourself to a constant keyframe interval, you might get a more uniform-looking animation; on the other hand, if you specify the interval for each keyframe, you might be able to save a significant number of keyframes throughout the animation.
Also, approach B is a superset of approach A, so you don't lose any flexibility if you go that route.
Had to read that several times before I saw any difference between the two.
animation advice - wyrmmage - May 7, 2007 08:37 PM
Ok, Thanks for the advice Something you said made the sparked a realization that made the decision pretty easy. Since my program is pretty much just advancing through the keyframes and not accounting for lost time if the keyframe max time is exceeded, then I would actually be getting rougher animation if I used more keyframes
Anyway, thanks again
animation advice - ThemsAllTook - May 8, 2007 06:23 AM
wyrmmage Wrote:Since my program is pretty much just advancing through the keyframes and not accounting for lost time if the keyframe max time is exceeded, then I would actually be getting rougher animation if I used more keyframesSounds like something easily fixed...