Blend Layers 101 – ShiVa Engine

Blend Layers 101

In order to make an object able to play animation, an AnimBank must be added on the object. It is a container of AnimClips. The AnimBank must contain all the animations (AnimClips) the object is supposed to use. These AnimClips are indexed in the AnimBank, this index is very important because it will be used when programming the animation management by script.

What are Blend Layers?

As you can see, animations are loaded into up to 8 different blend layers (0-7). That means, up to 8 animations can be played simultaneously. If you have more than 8 animations for xour character, you need to dynamically load different animations into the blend layers depending on your current object’s needs.
Think of Blend Layers as a DJ Music Mixing System. If I raise the “volume” in blend layer 0 to full power, the Idle animation will be running at full strength. If I put it only to half volume (Or 50% / 0.5), the animation will only run half as “strong”.
Now, if we run blend layer 1 and blend layer 0 at the same time, we will have both the idle and walk sequence running in a merged way – options for the blend mode being additive or normalized. Meaning my character will be breathing a little and also walking a little. In short, you get an interpolated animation, semi-idle, semi- walking.
This is the beauty and strength of the system. If I wanted to go from idle to run, I could do this in a smooth way by starting off with blend layer 0 at 100% (1) and everything else at 0 power. By decreasing the idle strength over time down to zero (0), while at the same time moving the “volume” of blend layer 2 (“run”) up to full power (1), we will get a smooth transition.
ShiVa at this point calculates all the frames in between and interpolates between the two animations thus creating the animation of Idle to Run on its own without you having to use your animation software to create that specific transition.
Now when you get into 3-4 animations at a single time, you would then have to play around with the various “power” settings. The issue here lies in the fact that in almost all cases, you rarely ever use 3 transitions at one time. Its usually from one blend layer to another (Ex. idle to run, or idle to walk, or walk to run, or run to jump, or idle to jump, etc.). So what most people will do is reduce the power on the blend layer they dont want, and increase the power on the blend layer they do want.


1. Character gets SPOOKED out by some other object and JUMPS immediately from an idle state. To do this, go from Idle to Jump (Blend layer 0 to Blend Layer 3) by simply moving the power of blend layer 1 down to 0 and blend layer 3 up to 1. In this case to make it look like its really a startling thing, you could move the POWER of blend layer 3 twice as fast as you move the power of blend layer 0. This will merge the animations just as fast. OR to really get it going even faster, set blend layer 0 power RIGHT to ZERO and blend layer 3 power right to 1.
2. Character needs to run from idle stage. Move power of blend layer 0 to zero and move power of blend layer 2 to one (Full Power). ShiVa will create the idle to walk to run animation and everything in between. This is great if you are planning to have your character get right into a run but look like it first did a few steps walking. ShiVa will interpolate that inner part of the animation on its own.

Need more answers?

  • slackBanner