Fine-tuning animation -- Animation's frame rate

Two questions:

1st: What do you use to fine-tune animations, more specifically the speed of it? Any changes I do in the Graph Editor seem to physically modify the animation: I alter the X location curve and the object moves, I alter the rotation and it rotates. That’s to be expected, I guess. The DopeSheet is for actions and modifying frames. So, what to do? I haven’t used 3ds Max in a long time, but I think the Curve Editor did that.

In short: How to do slow ins and slow outs in Blender?

2nd: This one is video game related. Most games are made to run at either 30 or 60 frames per second—some are even locked at that rate. The question is, what frame rate should a video game Blender-made animation have? Does it matter if I make the animation at 24, 25, or even 60 frame rate per second? Other than the extra frames I have to work on the animation, of course.

In short: Will my 24 frame rate animation will have trouble when running at 60 in a video game?

Thanks in advance for all the answers.

Just as in 3ds max, and maya, slow ins and outs can be controlled by adjusting the tangents of the keyframes in the graph editor.
The steeper the curve the faster the motion, the smoother the curve the smoother the motion

Re: Video game animations. AFAIK most modern game engines can make an adjustment based on an animation’s native frame rate, so that it’s constantly-changing in-game frame rate does not adversely affect the animation playback speed. Of course in serious lag situations that all goes to hell, but in general, the game engine adjusts the animation rate on the fly to compensate for its internal frame rate variations.

That being said, 30fps as a base animation rate for game characters is a pretty common standard. It provides enough “hard” frames that when things slow down, the anims don’t get too jerky, but doesn’t overload the data processing unnecessarily. If in doubt, check the game engine docs, or ask on a game-specific forum, that usually yields better answers, 'specially when the game engine hasn’t been identified.

Adjusting the overall timing of an animated sequence can be done in the Dope Sheet / Action Editor, by tweaking the keyframe positions along the X-axis (Time). Keys can be dragged and scaled to adjust timing points. The Graph Editor adds the ability to adjust key values (Y-axis), as well as use the bezier handles to adjust curve slopes, as freen mentions.

Thanks both of you for your answers.

@freen: It isn’t working that way for me, though. I have all my animations divided into actions, and they are all quite simple that max at 100 frames each. Let’s assume my animation is an almost-perfect straight line, modifying the line with the bezier handles to make it curve should, as far as I know, give the animation ease in an ease out (since it was a straight line to begin with, any variation will do that), but what it’s actually doing is modifying the location of the selected object. The Graph Editor is working with space and not time—it should be time. So there lies my problem.

@chipmasque: That actually makes a lot of sense; that information will provide me with a good starting place. Thanks.

The DopeSheet works with the frames itself, so moving the frames will reduce or increase the time between actions, but there will be no ease-in and ease-out, still. As I explained to freen, the Graph Editor is working with space and not with time, so it’s pretty weird.

If you adjust the curves of any animation channel, you are altering the values of the transform that curve controls. So any adjustments there will cause some aspect of the object’s transforms to “move,” in space, if you please, but actually it applies to non-space transforms as well. The keys in the Graph Editor are the same as those seen in the Dope Sheet, so adjusting them on the time (X) axis adjusts the time dimension. Space & time – Albert would be proud :smiley:

What you are referring to as “time” is actually more accurately characterized as “rate of change”, i.e., how fast a transform proceeds within a given segment of the time axis. The slope of the curve of a channel within that time segment determines that rate of change and whether it is constant, linear or non-linear. A flat horizontal curve is constant and linear. A sloped straight-line curve is not constant but is linear. A curve that actually “curves,” i.e., the slope changes over the time segment, is both non-linear and non-constant. That is the means by which ease-ins and -outs are done: the slope changes from steep (fast rate of change) to flatter (slower rate of change) to nearly flat at the end of the ease-in. The ease-out proceeds in the opposite manner, with a flat slow curve gradually increasing slope until the rate of change is more rapid.

So the Graph Editor works with all three dimensions – time (X-axis), value (Y-axis, your “space” dimension) and also slope, or rate of change. The Graph Editor is the ONLY Editor where these three dimensions of an animation channel can all be adjusted.

No offense, but I already know how that works.

Let’s assume this: I have a ball with any animation. The Graph Editor shows a linear and constant curve line. By how things are supposed to work, by giving said curve line and actual curve with a bezier, it would now be non-constant and non-linear. That means it now has ease-in and ease-out, correct? Since it’s non-constant now. My problem is that the slope is affecting the location of the ball and not the time. To explain a little more: Ball moves in a straight line, curve is completely straight. I give it a slope, and what happens is that the ball jumps—or rotates or whatever, depending on what I’m modifying.

Bottom line: I don’t want to change anything but time!

Worth noticing: I’m using bones and Quaternion. The problem doesn’t happen when I’m not using bones.

Edit: This seems to be a bone-related problem. I’m gonna do some more testing but some theories would be nice.

You said the Graph Editor doesn’t work with Time, but it does. It also works with rate-of-change. And transform magnitude. What other parameters to an animation channel are there?

A constant and linear curve – a horizontal line – produces no change in the affected channel, because the Y-axis value is constant. It’s still a curve, just not one that produces “movement.”

If this line is given a slope and its start and end keypoint handle-types are made Vector (or the entire curve is made Linear) then there is change in the Y-axis value that produces “movement,” but because it is linear, it has no ease-in and -out. Its rate of change is constant, though the Y-axis values are not.

Switching to bezier handles allows the curve to curve. To ease-in, the rate of change in the Y-axis has to be faster at the beginning (steeper slope) than at the end of the curve. So it follows that compared to a linear sloped curve, the channel value at any particular frame of a non-liner curve has to be different, causing the “movement” you mention. It cannot be any other way. It is not any other way in any other animation package that uses animation curves. You cannot “change anything but time,” because time and “movement” are inextricably linked. Even with a linear curve, if you mess with the time dimension (the X-axis) you also change the slope of the curve (rate of change). The only curve that is not affected by time-axis shifts or slope changes is the constant linear curve where no “movement” takes place at all.

And this applies to any animation channel. Quats, Eulers, translations, scale, even RGB material parameters – they all change based on the curves in their anim channels, and those curves follow the same rules regardless of the effect they have in the Scene.

Maybe posting a specific example in a .blend would help clarify, since we seem to talking about the same thing from different angles.

EDIT: Here’s some specific numbers. For an animation curve that extends 10 frames in Time (the x-axis) and 10 units in value (the Y-axis, or “movement”), a linear curve will produce the following values at each frame (stated as frame/value):

1/0, 2/1/, 3/2, 4/3, 5/4, 6/5, 7/6, 8/7, 9/8, 10/9

The “movement” is positive one unit per frame, producing a linear slope and a constant rate of change.

Adding ease-in, the values might be these:

1/0, 2/2, 3/3.75, 4/5.25, 5/6.5, 6/7.5, 7/8.25, 8/8.75, 9/8.875, 10/9

Here the change between frames (rate of change ) is non-linear, as it needs to be for the “movement” to be faster at the start than at the end but wind up at the same value after 10 frames. But since the per-frame values differ, there is a “movement” relative to the two curves that is a result of adding the ease-in. It can’t work any other way.

The “time” you want to adjust is rate of change, and that will always force some sort of “movement” within the actual time segment (X-axis extent) being edited. Without that “movement” there is no easing in or out.

I think I found a way to make it simpler to understand.

First, even if time is affected and there’s actually ease-in and ease-out, it doesn’t matter much in this case.

I understand everything about ease-in and ease-out; the problem seems to be bone related.

Horizontal line. Let’s play with the X location axis. Object is at 0,0. I make the horizontal line a curve (forget about ease-in and ease-out for the moment) and now the object is at 14,0 (or 0,14. Whatever :P). The curve was pointing up; if it were to be pointing down, it would have moved to -14,0.

So, if this object is the leg of a model, the leg now would be far away from the body (think rooms apart), as if it has no connection with the body. The curve moved the leg, and nothing else.

I rather not post the .blend. Sorry.

If the problem as simple as you describe, construct a simple example file and post that.

In the case of translating your leg bone, simply do not edit that channel – if it’s not moving (i.e., a horizontal line as you describe) why do you need an ease-in or -out, or any modification to the flat no-movement curve? If you’re using this as an arbitrary example, then what’s the point? No one would want to translate a leg bone away from the main body, unless for a dismemberment effect :wink: That’s why dealing with an actual case where you want to add an ease-in or -out but apparently can’t for some reason is better than throwing explanations back and forth. Let’s get down to brass tacks (or dismembered leg bones, as the case may be :D)

The curve moved the leg, and nothing else.
Were you expecting something else to be moved? I don’t see your point here. Changing the LocX value (on the Y axis) moves an object in X. That’s how it’s supposed to work. If you don’t want it moving in X, don’t edit that curve. Only the curves that require an adjustment to their affected channels need be edited. If you add an ease-in (to use an example of a curve edit) to RotX, you don’t need one also in LocX, just leave it be.

OK. I understand how the Graph Editor works, and I see why I’m not making sense for you.

Modifying the curves do affect the timing—ease-in and ease-out—but it does so by modifying the location, rotation, or scale of the object. So in order for me to add an ease-in or ease-out, I would have to move the object. Edit: Unwanted movement. If my character is throwing a punch, the Graph Editor would modify it in order for ease-in and ease-out to take place.

I’m uploading two blend files. One with a simple animation without using the Graph Editor at all, and the other modifying the curve on the Y location. Altering the rotation gave the same results.

The problem is that I don’t want the location or rotation to be altered, I just want to add acceleration, for example.

Attachments

Test2.blend (409 KB)Test1.blend (409 KB)

I’ll look at the test blends, thanks. I understand what you are trying to do, but what doesn’t seem to be registering for you is that it cannot be done without altering the curves, and thus the location or rotation, in some fashion. For example to make a punch land faster you can decrease the number of frames between start & end of the punch – a time edit. If there is a curve in that time segment, it will get steeper, an edit to rate of change.

To make the punch start slow and end fast (for example), you increase the slope of the latter part if the curve. This changes the location of the fist at those parts of the curve but that is necessary to get the acceleration – the fist travels over a greater distance in the same or even a shorter amount of time compared to a linear curve, which has constant rate of change – no acceleration. Location and or rotation MUST be altered to alter the rate of change, and thus give you the acceleration.

Now, the cumulative change in location or rotation can stay the same – that’s what keyframes are for. But in between keyframes, the curve can change its character and still get the object to the same point, and at the same time, but in a different fashion, e.g., starting slow and ending fast. Compared to an un-accelerated punch, the location/rotation between keyframes is different, but that is how the acceleration is accomplished.

I’ll see if I can clarify further using your test files.

EDIT: I used your file1 to show how curve character affects motion within a certain time segment, compared to a linear curve. Note the acceleration. The original file had accelerations also, positive during the ease-out and negative during the ease-in, as indicated by the toe and shoulder of the curve in your original. I also stretched the sequence to 60 frame to show how even just a time edit (x-axis) will affect the slope pf the curves, showing that time & “space” are linked.

In file2 I edited the curve to add a second component of retro-motion, an effect often used in the “wind-up” phase of certain kinds of motion. It corresponds to the kind of “wind-up” that precedes a punch, where the fist is drawn back before driving it forward. But this required no keyframes because the values along the curve take care of it without needing keys. This is why editing F-curves can be both powerful and economical.

I noticed that you also edited the curve in file2. By dragging the bezier handles around, you can do a lot to change the nature of the motion, but because the curve does alter its profile, this means that there will be some “movement” compared to the un-edited curve. But that’s the way it’s done, and it really can’t be done any other way.

Attachments

Test1_revised.blend (388 KB)Test2_revised.blend (385 KB)

Thanks a lot! It’s the closest I can get to what I wanted, I guess.

Nothing “close” about it, it’s the only way to get what you wanted. Acceleration (be it positive or negative) is the same as rate of change (for translation that means rate of change in velocity), and you alter that by editing the slopes of the f-curves. The Graph Editor is the only place you can do that. It’s very powerful animation methodology, allows for a great deal of subtlety in motion-building.

It almost sounds like you want to adjust framerate between keys. If that’s what you want, then it certainly cannot be done in Blender (or most animation software that I’m aware of).

You can slop-fake this in the NLA Editor, perhaps, by scaling the strips, but given that the same thing can be done in the Dope Sheet or Graph Editor, I don’t see the point. K.I.S.S., right?

True… But as you pointed out, that’s a sloppy hack and I really wouldn’t recommend it. I’ve used the NLA to retime full shots before and that works okay… but I’d rather just get it right the first time. :stuck_out_tongue:

I think the basis of the problem is a misunderstanding of animation itself and keyframe animation in particular.
I definitely would not suggest mucking with the NLA until you understand the basics.

Animation deals with change over time. If you’re animating location, you’re manipulating both space and time. Keyframes define a position at a given point in time and the shape of curve (as defined by the handles) defines the transition between keyframes,
Therefore if you manipulate a keyframe’s handle, of course the Location will change either side of it.

There are two ways you can define the change in position when altering the speed of an animation. First, if you alter the frames directly, the position will change as a direct consequence of the change of time—The action stays the same, but the position is now different in each frame. Second, and this is what I don’t like, is when you alter the curves in the Graph Editor: You don’t change the time between frames (the action still takes X seconds) but the action itself changes as a consequence of the change in—the newly added— acceleration.

The problem is that it doesn’t seem to be a way in Blender to just change how time works on each frame. 3ds Max has a ‘time’ option for each frame in which you can directly alter the ease-in and ease-out without the need to modify the animation in the process. The Blender’s Graph Editor seems to be the only way one can alter the acceleration, or rate of change, and it seems that I will have to work with that. Unless, of course, someone can provide an alternative to that. I would appreciate it a lot!

OK, I think I have a better idea of what you’re wanting. It wasn’t really clear to me that you want to preserve an existing set of keys and their values, while creating a non-destructive variation of it with acceleration added. Sort of like adding a modifier to the process, as is done in other areas of Blender and other 3D apps.

There are two ways I know of to do this, though I’m not sure either is exactly what you’re looking for. First is the NLA Editor, as mentioned. In that case, only the Time parameter for a given strip can be altered by adjusting the Scale of the strip, and that affects the entire strip equally. You can’t create a variable rate of change (acceleration) this way, at least not easily, just speed up the motion in the strip as whole. If the motion already includes acceleration, then its momentary velocities along the time axis will be increased/decreased. But time-shifts done this way do not affect the Action from which the NLA strip was made.

Blender also has F-curve modifiers, a suite of functions that modulate an existing curve non-destructively. The Envelope function may do what you want, if it acts like most “envelope” tools, allowing adjustments to amplitudes on a curve (the Y-axis values) though not in the time axis. Here I think you could create a acceleration effect within an existing given time segment, by altering the Y-axis values via the envelope. Haven’t tried that tool yet, however.

There is also a scriptable F-curve modifier (“Python,” I think) that could perhaps be used to create a custom tool for what you want to do.