•      Sign In
• Create Account

#ActualAlundra

Posted 23 August 2013 - 01:28 PM

Blending from a "Walk animation" to "Run animation" requires some additional consideration than a standard blending because the foot keyframe need to match.

There are a lot of info from the previous post, I can let you a method.

We will assume each animation will loop and contains one full gait cycle.

We will assume the walk duration is dwalk and duration of run is drun.

We will assume the velocity of walk is vwalk and the velocity of run is vrun.

What we want is blending in phase, so we need an offset for each animation who is when the left goot hits the ground.

We will assume these offset are owalk and orun.

We will assume f is our dissolve factor [0...1].

We can compute the final velocity :

final_velocity = Lerp(vwalk, vrun, f)

To make the blending in phase we need to adjust the speed of each animation.

This means the walk animation need to speed up and the run animation need to slow down.

We will assume the current time of walk animation is twalk.

We can compute the run animation time :

trun = mod((twalk - owalk + dwalk) * (drun/dwalk) + orun, drun)

Now, we can speed up the walk animation appropriately :

speed_walk = Lerp(1.0, (dwalk/drun), f)

You should have all info you need to know to have a correct walk to run blending.

#2Alundra

Posted 23 August 2013 - 01:28 PM

Blending from a "Walk animation" to "Run animation" requires sile additional consideration than a standard blending because the foot keyframe need to match.

There are a lot of info from the previous post, I can let you a method.

We will assume each animation will loop and contains one full gait cycle.

We will assume the walk duration is dwalk and duration of run is drun.

We will assume the velocity of walk is vwalk and the velocity of run is vrun.

What we want is blending in phase, so we need an offset for each animation who is when the left goot hits the ground.

We will assume these offset are owalk and orun.

We will assume f is our dissolve factor [0...1].

We can compute the final velocity :

final_velocity = Lerp(vwalk, vrun, f)

To make the blending in phase we need to adjust the speed of each animation.

This means the walk animation need to speed up and the run animation need to slow down.

We will assume the current time of walk animation is twalk.

We can compute the run animation time :

trun = mod((twalk - owalk + dwalk) * (drun/dwalk) + orun, drun)

Now, we can speed up the walk animation appropriately :

speed_walk = Lerp(1.0, (dwalk/drun), f)

You should have all info you need to know to have a correct walk to run blending.

#1Alundra

Posted 23 August 2013 - 12:19 PM

Blending from a "Walk animation" to "Run animation" requires sile additional consideration than a standard blending because the foot keyframe need to match.

There are a lot of info from the previous post, I can let you a method.

We will assume each animation will loop and contains one full gait cycle.

We will assume the walk duration is dwalk and duration of run is drun.

We will assume the velocity of walk is vwalk and the velocity of run is vrun.

What we want is blending in phase, so we need an offset for each animation who is when the left goot hits the ground.

We will assume these offset are owalk and orun.

We will assume f is our dissolve factor [0...1].

We can compute the final velocity :

final_velocity = Lerp(vwalk, vrun, f)

To make the blending in phase we need to adjust the speed of each animation.

This means the walk animation need to speed up and the run animation need to slow down.

We will assume the current time of walk animation is twalk.

We can compute the run animation time :

trun = mod( (twalk - owalk + dwalk) * (drun/dwalk) + orun, drun)

Now, we can speed up the walk animation appropriately :

speed_walk = Lerp(1.0, (dwalk/drun), f)

You should have all info you need to know to have a correct walk to run blending.

PARTNERS