How to Clean Keyframes in Blender

Cleaning keyframes in Blender optimizes animation performance, reduces file sizes, and makes animation curves significantly easier to edit by stripping away redundant or dense data. Whether you are dealing with dense motion capture data, baked physics simulations, or simply want to optimize manually set keys, Blender provides native tools to remove unnecessary samples without distorting your motion.

Method 1: Using the Clean Keyframes Tool

The Clean Keyframes tool removes keyframes that do not affect the animation curve, such as consecutive identical values on a flat curve segment.

  1. Switch to the Graph Editor or Dope Sheet workspace.
  2. Select the object, armature, or specific animated channels you want to clean.
  3. Select the keyframes you want to process (press A to select all).
  4. Navigate to the top menu and select Key > Clean Keyframes (or press Shift + Alt + O in the Graph Editor, depending on your Blender version).
  5. Open the Clean Keyframes operator panel in the bottom-left corner of the viewport.
  6. Adjust the Threshold slider:
    • A lower threshold keeps more detail.
    • A higher threshold removes more keys, deleting frames that deviate only slightly from a straight line between their neighbors.

Method 2: Using the Decimate (Simplify) Tool

When dealing with heavily sampled animations like motion capture (mocap) or baked physics where every single frame has a keyframe, the Decimate tool is the best option for reducing density while retaining curve shape.

  1. Open the Graph Editor.
  2. Select the animated curves you want to simplify.
  3. Press A to select all the keyframes on the active curves.
  4. In the top menu, go to Key > Decimate (Simplify).
  5. In the operator panel at the bottom-left corner, choose a decimation mode:
    • Ratio: Removes a percentage of keys (e.g., a ratio of 0.1 keeps only 10% of the keyframes).
    • Error Margin: Removes keyframes that fall within a specific visual error tolerance from the original curve.
  6. Adjust the parameters until you achieve a balance between a low keyframe count and accurate motion.

Method 3: Cleaning Channels

If an animation channel contains keys but has no actual change in value across the entire timeline, you can remove the unnecessary channel data entirely.

  1. In the Graph Editor or Dope Sheet, select the channel list on the left side.
  2. Go to Channel > Clean Channels.
  3. In the operator panel, set the threshold to define what counts as an inactive or flat channel. Blender will automatically delete keys from channels that remain static.