Author Topic: Any Way to Speed Up an Animation?  (Read 7329 times)

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Any Way to Speed Up an Animation?
« on: August 18, 2008, 09:44:19 am »
There's not much in the Animation class itself, but is there some way of changing the timing of animations I'm missing?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Any Way to Speed Up an Animation?
« Reply #1 on: August 18, 2008, 09:52:23 am »
For keyframe animations? Just use a higher increment for the animation index.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: Any Way to Speed Up an Animation?
« Reply #2 on: August 18, 2008, 05:36:20 pm »
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. : -)

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: Any Way to Speed Up an Animation?
« Reply #3 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.

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Re: Any Way to Speed Up an Animation?
« Reply #4 on: August 21, 2008, 01:08:28 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

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
Re: Any Way to Speed Up an Animation?
« Reply #5 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.

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Re: Any Way to Speed Up an Animation?
« Reply #6 on: August 25, 2008, 02:31:35 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