Animation Curves

Animation Curves provide a way to change the value of a Material parameter or a Morph Target while an animation is playing back. Their workflow requires that you designate the asset you want to modify (either a Material or a Morph Target), name the curve accordingly, and then adjust keyframe values across the duration of an animation.

When you import Morph Target animations into UE4 via FBX, Morph Target Curves are automatically generated for that AnimSequence. However, they are hidden by default. This is by design; hiding away what could be many different Morph Target Curves will prevent the editor from slowing down.

It should be noted that the ability to adjust curves for Morph Targets, while useful, is more of a convenience feature than anything else. If you are handling a very complex Morph Target animation, you will probably have a much easier time if you perform the animation in the 3D animation package from which you exported out the original Morph Target.

Setting Up a Material Curve

In this example, we will show how to set up a Material Curve that causes our attacking bear's eyes to glow red with rage as they perform a melee attack.

The setup for a Morph Target curve would be similar, requiring only that the name of the curve match the exact name of the Morph Target that was imported. For more information on Morph Targets, please see FBX Morph Target Pipeline and Morph Target Previewer .

For this example, we will start with our bear character's melee attack where we want to have the bear's eyes glow redder as they are attacking.

If we open our bear's Material, we can see that there is a Material Expression Scalar Parameter that controls the intensity of the eyes glowing with a parameter named Eye Glow Intensity. You will want to take note of the parameter name that you wish to drive with a Material Curve as that name must be the same as the one used inside the Material to affect it. The Eye Glow Intensity has a default value of 20 and it is this value that we will drive with our Material Curve to produce a brighter red glow during the animation.

Click image for full view of the Material.

Inside the Animation Editor for our melee attack, we start by clicking the button_AddFloatTrack.png button located in the Curves area, then select Add Variable Curve... and Create Curve.

CreateCurve.png

When prompted to enter a name for the curve, we enter Eye Glow Intensity to match the name of the parameter inside our Material.

NameCurve.png

This creates the Curve we need, but we must also make sure to identify it as a Material Curve. This is done using through the Anim Curves menu under Window.

OpenAnimCurvesWindow.png

In the Anim Curves window, we click the option under Type to make it a Material Curve.

ConvertToMaterialCurve2.png

We can now add keys in the curve window (Shift + Left-click) to affect how/when to adjust the parameter's value (we added 4 keys as shown in the video below).

Our end result is that the curve now drives the associated Material parameter, causing the bear's eyes to glow as it performs its melee attack.