Sub topic 12
F-curve modifiers: Cycles, Noise and more
This chapter assumes you can insert keyframes, open the Graph Editor, and identify an F-curve. An F-curve modifier is a rule that changes a curve during evaluation without adding ordinary keyframes. Modifiers are useful when repeating or varying motion would create too many keys.
How modifiers change a curve
A normal F-curve evaluates its keyframes and interpolation. A modifier then changes that result. Blender evaluates modifiers in stack order, so moving a modifier can change the final motion.
| Modifier | Main use | Typical result |
|---|---|---|
| Cycles | Repeat a keyed section | Looping motion |
| Noise | Add procedural variation | Vibration or drift |
| Limits | Restrict values or time | Clamped motion |
| Stepped | Hold values at intervals | Stop-motion effect |
Repeating motion with Cycles
Create a short animation first, such as a rotation from frame 1 to frame 24. Select the relevant F-curve in the Graph Editor and choose Add Modifier > Cycles. The curve repeats before and after its keyed range.
The Cycles modifier has separate settings for the area before the first key and after the last key. Common modes include:
- Repeat Motion repeats the same values.
- Repeat with Offset repeats the shape while adding the change between the first and last cycle.
- Mirror reverses every other repetition.
Use Repeat Motion for a wheel or blinking light. Use Repeat with Offset for continuous movement, such as an object traveling forward by the same distance each cycle. If the first and last keyframes do not form a sensible cycle, the loop will visibly pop.
Adding variation with Noise
A Noise modifier adds mathematically generated variation to the curve. Its Scale controls the frequency of the variation. A larger scale produces broader, slower changes. Its Strength controls the amplitude.
For example, add Noise after a keyed camera movement to create slight handheld shake. Keep the strength small. Large noise values can make an object appear to teleport or pass through nearby geometry.
import bpy
obj = bpy.context.object
obj.location = (0.0, 0.0, 0.0)
obj.keyframe_insert(data_path="location", frame=1)
obj.location = (4.0, 0.0, 0.0)
obj.keyframe_insert(data_path="location", frame=24)
fcurve = obj.animation_data.action.fcurves.find("location", index=0)
cycles = fcurve.modifiers.new(type="CYCLES")
cycles.before_mode = "REPEAT_MOTION"
cycles.after_mode = "REPEAT_MOTION"
noise = fcurve.modifiers.new(type="NOISE")
noise.scale = 5.0
noise.strength = 0.2The script modifies only the X location curve. To shake all location axes, add a Noise modifier to the Y and Z curves as well.
Choosing and troubleshooting a modifier stack
Use Cycles when the motion should repeat exactly or follow a predictable offset. Use Noise when the motion needs controlled irregularity. Use Limits when a modifier might produce unsafe values.
If a curve appears unchanged, check that the correct F-curve is selected and that the modifier is enabled. If noise is too fast, increase its Scale. If a cycle jumps, compare the values and slopes at the first and last keys. Also check the modifier order: adding Noise before Cycles produces a repeated noise pattern, while adding it after Cycles can vary the repeated result.
Exercise
You have a two-key rotation that should repeat, with a small irregular variation on each loop. Which modifiers should you add, and in what order?
Show answer
Add Cycles first and Noise second. Cycles repeats the keyed rotation, and Noise then adds variation to the repeated result.