> For the complete documentation index, see [llms.txt](https://kinemation.gitbook.io/fps-animation-framework/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinemation.gitbook.io/fps-animation-framework/fundamentals/animation-system/curve-blending.md).

# Curve-blending

{% hint style="success" %}
**Tip:** curves are a great tool to control the blending of procedural animations. <mark style="color:purple;">**CoreAnimGraph**</mark> comes with a special system for curves, which allows you to add custom curves to the animation and use them in runtime to control the layer blending.
{% endhint %}

As Playables API does not support curve blending out of the box, <mark style="color:purple;">**CoreAnimGraph**</mark> has its own system for curve blending.&#x20;

The curve names are specified in the <mark style="background-color:blue;">**Runtime/Core/Types/CurveLib.cs**</mark>:

{% code title="CurveLib.cs" overflow="wrap" %}

```csharp
public static readonly List<string> AnimCurveNames = new()
{
    "MaskLeftHand", 
    "MaskLookLayer", 
    "WeaponBone", 
    "Overlay"
};
```

{% endcode %}

* **MaskLeftHand** - used to disable [Left Hand IK Layer](/fps-animation-framework/fundamentals/animation-layers/left-hand-ik-layer.md). If 1 - layer is disabled, 0 - enabled.
* **MaskLookLayer** - used to disable [Look Layer](/fps-animation-framework/fundamentals/animation-layers/look-layer.md). If 1 - layer is disabled, 0 - enabled.
* **WeaponBone** - defines the object the weapon will move along with. This will be later explained in [IK Animation System](/fps-animation-framework/fundamentals/animation-system/ik-animation-system.md).
* **Overlay** - controls the weight of the animation graph. If it's 1 - the graph is enabled, and 0 otherwise.

These curves are used for animation layers (e.g. [Locomotion Layer](/fps-animation-framework/fundamentals/animation-layers/locomotion-layer.md) or [Left Hand IK Layer](/fps-animation-framework/fundamentals/animation-layers/left-hand-ik-layer.md)) to have a better control over the IK blending. Such curves are attached to an [AnimSequence](/fps-animation-framework/fundamentals/animation-system/animsequence.md).

It's also possible to use curves from the Animator Controller, let's take a look at the example to understand the difference:

{% code title="YourCustomLayer.cs" overflow="wrap" %}

```csharp
// Will select a curve for the CoreAnimGraph
[AnimCurveName(false)] [SerializeField] private string graphCurveName;

// Will select a curve from your Animator Controller
[AnimCurveName(true)] [SerializeField] private string animatorCurveName;

public override void OnAnimUpdate()
{
    //... Your implementation
    float graphCurveValue = GetCurveValue(graphCurveName);
    float animatorCurveValue = GetAnimator().GetFloat(animatorCurveName);
}
```

{% endcode %}

{% code overflow="wrap" %}

```csharp
AnimCurveName(bool isAnimator) //false by default.  
```

{% endcode %}
