Away3D Smooth transitions

Flash

normalmaps1

This is something I wanted add to Away for quite a while now and I’m pretty sure animators and game makers will be pleased with this one: Be able to have smooth transitions between actual playing animation state and the next one while still playing own smooth animation.
The engine was already able to interpolate smoothly between keyframes of an animation, but when a new animation was started, if the animator did not provide any logical keyframes to start the next one, the result was a sort of hard cut between sequences. Even with the addition of smart keyframes, there was allways a gap. Not anymore!

This little demo illustrates the differences. Just clik on the objects to toggle the animations and be able to see the transitions at work.Watch movie online The Transporter Refueled (2015)

This behavior is now standard to the engine, and can be updated at runtime.
It works for all the supported mesh animations of the engine: md2, AS3 animated exports and the Animator class. It will be automatically triggered when a new animationSequence is started.

The standard transition duration is set to 10. Witch means that during the next 10 render sessions, the animation will be interpolated using its own animation information and will gradually get 1/10 less information of the last state of the previous animation.

To change it runtime it’s easy (like most Away code):
(myanim as Mesh).transitionValue = 20;
This value for instance would, depending on swf playrate, display a very smooth transition.
Ideal for changes between logical states such as “sit” to “stand”.
For transitions that should go faster, like “jump”, just set the value lower.

To keep the previous engine behavior, set it to 1 witch is the lowest value possible.
(myanim as Mesh).transitionValue = 1;

You do not need to set it per enterframes unless you want to. You can set it just once if you want another value than the default 10 or set it runtime on animation changes to get most logical movements between your animation sequences. If you are pleased with the default value: do nothing!