- [Instructor] The timeline,
not only displays keyframes for selected objects,
but also allows us to edit those keyframes
in the time dimension.
The timeline is properly called the track bar
because it gives us access to animation tracks
or channels of animation data such as position
and rotation keyframes.
With the select object tool active,
click on an animated object, in this case the camera
and the keyframes for the selected object
are displayed in the track bar.
We can simply click on these to select them,
a selected keyframes is highlighted in white
and then we can just click and drag on it
to move it in time.
I can move it to an earlier point in time
and that's going to speed up
the first half of the animation.
So I can play this back and we can see that the camera moves
very quickly in the first half
and then quite slowly in the second half
of this animation.
So I haven't changed the position of this keyframes,
I've merely changed when that position happens.
Instead of happening at frame 70,
it's happening at frame 30, much earlier.
All right I'll rewind that.
Likewise we can move a keyframes to a later point in time
and we'll see the opposite effect,
if I move that down to frame 100
and play it back the first half of the animation is slow
and the second half is fast.
Okay, I'll undo that with control z and send it back.
Hit control z a couple of times
and now my keyframes is back on frame 70.
We can edit multiple keyframes at the same time,
just drag a selection rectangle around multiple keys
and they're all selected.
And then we can just click on any one of them
to move them all as a unit.
So I can click on this one for example and drag
and I've sped up the animation in the first half
but I haven't changed the timing here in the second half.
We can rewind that and play that back
and see that we've got a bit of a different effect
than we had before.
Realize that you can actually move the keyframes
beyond the active time segment.
If I once again click and drag and move these,
I can push that last keyframes out of the range
of the current active time segment.
Okay, so I'll undo that,
bring everything back where it was,
hit undo a couple of times.
Even better than that,
we can move and scale selected keys as a unit
using selection ranges
and that's the black bar that appears below the timeline
whenever you have two or more keyframes selected.
So we can click and drag on that selection range bar
and perform the same operation,
we can move keyframes in time.
Okay, I'll undo that control z.
But additionally we can also scale a selected time range.
For example, I can select all the keys, from zero to 149
and then click on the little selection box on the right side
of that selection range, click on that and drag to the left
and I can scale all of those keyframes at once.
So I can bring this last keyframes
down to frame 30 for example and play this back
and we've got a much faster animation.
By default, any editing of keyframes in the track bar
will cause the keys to snap to whole frame numbers.
It's going to round off any proportional scaling,
so that keyframes land on whole frames.
And that will change the time relationship among keys.
If you repeatedly scale keyframes regions,
you'll introduce a series of round off errors
that will shift the keyframes around
in undesired or unexpected ways.
Let's demonstrate, so I'll undo, control z
and let's say I scaled this time range down
to a very small range of let's say only 10 frames.
And then I decide, I want to scale it back up again,
so I'll click on that and bring this back
to where it was at frame 149.
And now my keyframes in the center
is no longer landing on frame 70.
If we select it or if we actually scrub in our timeline
till we land on that keyframe,
we'll see it's now on frame 75.
So successively scaling has introduced this round off error.
Okay I'll undo those, control z a couple of times,
take it back to where I was.
If you need to maintain precise timing
and you need to perform multiple scale operations like this,
you can disable snap to frames.
Right click on the track bar and you get a popup menu.
You can choose configure and disable snap to frames.
And now let's see what happens when we scale,
we'll bring this down to let's say frame 10 or so
and then bring it back to frame 149 or so
and we see that we've landed approximately on frame 70 here.
But what has happened is actually
that keyframes has landed on a fractional frame,
it's actually between frames.
Remember that the internal time base of max is
4,800 ticks per second.
I know that I'm dealing with a fractional frame here
because the keyframes is shown
as being very narrow in the interface,
it's only a few pixels wide.
That's an indicator that that keyframes is not
on a whole frame.
And why does it matter?
Because keyframes on fractional frame numbers
could cause problems with your animation.
For example, in a simple bouncing ball.
The key at which the ball is supposed to touch the ground
could easily end up between frames.
And then if we rendered the shot,
there would be no rendered frame
on which the ball visibly touched the ground.
The keyframes itself would never get rendered
because it's between frames
and we would only only see the adjacent whole number frames.
If you disable snap to frames,
remember to re-enable it when you're finished animating
and then snap everything to whole frames.
The process for that is to re enable snap to frames,
right click configure, snap to frames
and then select any keys that are shown
as these narrow keyframes, just select them and move them,
that causes them to snap to whole numbers
and then move back.
So now I've just restored my original animation.
That seems a little bit clunky, but it works.
There actually is no command
to just round off all selected keys
to the nearest whole number frame.
We have to move them, that causes them to snap
and then we can move them back.
The other solution to this round off error problem
somewhat limits our creative freedom
but it is much less error prone.
And that is to leave snap to frames enabled all the time
and just try to never perform
more than one successive scale operation.
If you need to scale something,
do it once and try to do it only once.
Scaling keyframes is a destructive operation
and it needs to be treated as such.
That's how to edit keyframes
and keyframes ranges in a track bar.