Page MenuHome

Cycles modifier changes the shape of the F-Curve
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 457.30

Blender Version
Broken: 2.80, 2.92.0 Alpha (hash: rB8330e19cb2e7)
Worked: 2.73, 2.79

Short description of error
When putting a modifier "cycles" on a F-Curve created with default settings, its shape changes with rotation on the keyframes tangents.

Exact steps for others to reproduce the error

  • Open the file
  • Add a "cycles" modifier on the selected F-Curve
  • The shape changes

Event Timeline

Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Confirmed.Nov 26 2020, 1:56 PM
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".

I can confirm the problem.
Although there are many ways to get around it, the curve handle should not be affected by the modifier in that way.
I tested it on blender 2.79 and it works there.
It seems that the problem was introduced in Blender 2.80.

This is an intentional documented feature, intended to allow one to create an actual smooth cyclic curve using auto handles. Otherwise all keyframes on the boundary must be manually tweaked to achieve a smooth transition.

You could argue that 'modifiers' shouldn't do that, but curve cyclicity is a fundamental property that should not be a modifier in the first place, and originally wasn't. In a very old version of blender before modifiers it was an extrapolation type, next to Constant and Linear, and it is in effect still in the extrapolation menu.

If you really intend a discontinuous curve, enable the Use Influence option on the modifier - even if the actual influence is 1, the special handling is turned off. Or switch the handle type at the boundary to aligned.

P.S. The real bug here is that the curve doesn't turn into a straght line - it's the natural interpolation for just two points. Mathematically the handles of the first and last keyframes of a cyclic curve are the same, so probably there are more unknowns than equations and the solver becomes confused.

This appears to be the effect of rB8bdc391c5488: Implement a new automatic handle algorithm to produce smooth F-Curves.. The automatic handles attempt to keep the curve smooth, but this fails because of the discontinuity in the keyframe value at each end of the cycle. This is controlled by the handle type (set to Auto Clamped in the example) as well as the curve's Handle Smoothing setting.

Top top bottom, these are:

  • Before adding the Cycles modifier
  • After adding the Cycles modifier, with the handles still at Auto Clamped.
  • After setting the handles to Aligned, and then adding the Cycles modifier.

You could argue that this smoothing shouldn't happen when there is a discontinuity in the FCurve value, but that's not how things are implemented at the moment. Possible improvements can be discussed in the design task T54724: Workflow improvements for creating Animation Loops.

The slight wobble you see in the curve shouldn't happen, though, which is something @Alexander Gavrilov (angavrilov) will look into (discussed this on Blender Chat).

Thanks a lot for the answers, sorry for this report, but at least it was probably not completely useless :) Cheers !