Is there a method to have the graph editor only use whole values between key frames? I've tried linear interpolation as to remove any ease in/out. For example: I have key frames at frame 1 and 100 that control a modifiers value (also 1-100). When animated at animation frame 50 one would think it should read 50 in the modifier value, but its 49.637 and frame 51 is value 50.963. I'd like the values to only be whole numbers to remove random effects. So perhaps something that generates stepping in between frames?
1 Answer
In order to have the f-curve follow precice values (eg, to follow exactly to the frame number) you can use f-curve modifiers to generate the values mathematically.
To achieve this, you first need to add a keyframe to your property to create the f-curve and then view the properties in the Graph Editor (N).
In the Modifiers section, click Add Modifier and select Generator.
The Generator allows you to define an equation to assign a value for the f-curve (y) for each frame (x) as a polynomial equation. For a 'straight line' relationship you need a '1st order' polynomial - so set Poly Order to '1'.
For the value to always equal the frame number you need to define it as y = 0 + 1x
(ie, `y=x') - so set the first parameter to '0.0' and the second to '1.0'.
By ensuring the parameters are integers the result will be an integer for any integer frame number.
You can use this same technique to generate values for more complicated scenarios - for example, to set only for a particular range of frames (enable 'Restrict Frame Range') or to jump multiple values per frame (eg, y = 0 + 5x
would increment the value by '5' for each frame) or to use a higher-level polynomial for non-linear relationships.
x
(the frame) andy
(the value). $\endgroup$