HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Animation System: Animation Speed  (Read 747 times)

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Animation System: Animation Speed
« on: Aug 09, 16, 12:43:52 PM »


Several have asked about the ability to change the speed of animations dynamically...
I myself have wondered about this, so I have done a study on the subject (and still am actually)
and decided to post my findings so far.

Animation System:

the wiki is quite outdated on this subject, and so I'm putting this together as somewhat of an update to what the wiki has...
this doesnt replace the information on the wiki , but should instead make some corrections as well as go a little further in
depth into especially the duration of sequences and the speed of the animation itself...

Included in this write up are some "Opinions", some "Uncertainties", as well as "FACT"...
I will point out each as I address them.  I include them all as others may be able to shed light on the NON factual
information.  What I state as "FACT" is what I have through testing, and based on my understanding of the system, found to be "true".

*******************************************


On the forums, you might find reference to animation speed....

You'll note that it was said that animation speed relies SOLELY on a single fKnob called "Speed"

FACT: This is no longer correct.  Since that post (and since many updates to the animation system on the wiki), the ability was
added to support custom fKnobs.

FACT: Blends now make use of custom fKnobs made by you the designer...

Whats an fKnob?
FACT: its nothing more than a float variable that remains in memory once created, and can be accessed readily in the client,
and changed, allowing you "some" control over the speed which an animation plays by adjusting the fKnob.
"f" because its a float...  "Knob" because its adjustable... make sense?
there is also an "sKnob" which is a "string" variable instead of a float.  works the same way.
simply offering you a variable which can be changed on the fly to make adjustments to the way blends and animations are processed.

Blend Facts: *****************************
this will deal especially with blends as the purpose of this study was concerning the alteration of animation speed in the client.

This "can" be accomplished using a "blend".
If you blend a slower animation with a faster animation, the speed which you see in the client will depend on your blend ,
more specifically, it will depend on the value of your fKnob.

The value of your fKnob will determine how much of each animation blended is played.

the amount of change that can be accomplished depends on two things:
1) the .initialSpeed setting of each animations .asq file
2) the value of your fKnob (speedController)

If you set the .initialSpeed of either animation sequence in your blend to "1",
That animation may not be considered in the blend.. it may amount to a speed of "0" in the client.

Some Uncertain Suggestions about Blend:
if you have problems with your animation not playing or an error stating that both or one are a speed of zero:

Try adjusting your fKnob to something between 0.001 and 0.01 and see if it plays.  try several values between these two.

Try adjusting the .initialSpeed setting in your .asq files... for example, for sequenceA set it to 0.5 and sequenceB to 0.7

The .initialSpeed of SequenceA will determine the duration that the animation plays on the character.
The fKnob will determine how "fast" or "slow" the animation is displayed in the client...
so if you set the fKnob too fast, the animation will be performed much faster than the duration and end up looping (playing multiple times)
for the duration specified by sequenceA... make sense?
For example if i set the fKnob for "sideSlash" too high, the character will chop away, swinging numerous times until the duration of the
animation(sequenceA's .intitialSpeed) has been reached.


FACT: Because of this, the speed of an animation "CAN" be altered slightly using a blend, however, the degree of change one can reach
depends on the difference between the animation duration of each sequence used.
FACT: You can use a single animation in a Blend to accomplish this, by creating two new .asq files which point to the same animation.hgm
but with two different .initialSpeed values.
******************************************

Some FACTS about NON Blend Method of Speed change for an animation:
1) Create new .asq files, which point to the same animation.hgm
2) Set each .asq's .initialSpeed to a new desired duration
3) Based on demand, call which version you want to play from the .aas file based on a variable in the .aas which can be set via HSL


FACT: This allows for much more precise speed adjustment, but is based on hard speed values, and the speed itself is not adjustable dynamically.
(NOTE: if this method does allow the adjustment of the duration of the animation... or any other method for that matter... I have
not found it)

Disclaimer:
While I have noted FACTS in this write up, do note that this is a study in progress, and I will update as I am able...
It is entirely possible that what I have stated as fact is indeed a blatent lie and I will not be held responsible for
any lies found herein!
Do take this as a "study" of the subject, and if you are able to add to, or take away from this, then by all means do so and I will
make edits where needed.