Any Way to Speed Up an Animation?

Started by AGP, August 18, 2008, 09:44:19 AM

Previous topic - Next topic

AGP

There's not much in the Animation class itself, but is there some way of changing the timing of animations I'm missing?

EgonOlsen

For keyframe animations? Just use a higher increment for the animation index.

AGP

Do you mean the Object3D.animate(int) method? How would that work? I'm actually trying to speed up a skeletal animation, which I'm not sure is possible, but let's go one step at a time. : -)

AGP

Egon, sorry. I assumed the Animation instance returned by the SkeletalObject wouldn't be null. Evidently, I assumed wrong and I understand what you meant by the animate(index) now. Cyber's SkeletalAnimation can only be advanced (as far as I could tell) by the advanceAnimation() method, which is really slow. There's no way to re-scale the animation as a whole. Anyway, thanks for the attention yet again.

cyberkilla

Quote from: AGP on August 18, 2008, 08:24:37 PM
Egon, sorry. I assumed the Animation instance returned by the SkeletalObject wouldn't be null. Evidently, I assumed wrong and I understand what you meant by the animate(index) now. Cyber's SkeletalAnimation can only be advanced (as far as I could tell) by the advanceAnimation() method, which is really slow. There's no way to re-scale the animation as a whole. Anyway, thanks for the attention yet again.

There is a reason for this, I believe.

The animation is done at the exact pace that it was exported in.
If waving your model's hand takes 5 seconds when you animated it, it will take that long in JPCT.

The more you call advanceAnimation(), the more the interstitial positions are calculated. If you draw at 3 frames per second, it will still take 5 seconds to move the hand, but it will not be as smooth and granular than if you update it at 25 frames per second.
See what I mean?

Now, I'm sure it's possible to speed it up, but why? Just export it at the speed you intended it to be at, and you'll not have this issue:)
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Disastorm

Where is the advanceAnimation method?  I've been using the animate(float index, int seq)  method for my animations, which u can speed up or slow down depending on the value of the float index.

cyberkilla

Quote from: Disastorm on August 23, 2008, 07:28:23 PM
Where is the advanceAnimation method?  I've been using the animate(float index, int seq)  method for my animations, which u can speed up or slow down depending on the value of the float index.

He's talking about the experimental skeletal animation classes I made.
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG