💻 "Cars": the movie¶
In this exercise you can do some more complex keyframe animation by having multiple objects move to create a city full of driving cars. You will need basic keyframing skills and use of the Graph Editor.
- Load
cars.blend
This scene has a very simple city with some building and some cars. An animation of 250 frames has been set up in the file, starting at frame 1, ending at frame 250.
Tip
All the geometry of the buildings is in the so-called collection "Collection 2". You can hide all these objects by clicking the eye icon right of "Collection 2" in the outliner.
- Change to the first frame in the animation with
Shift-Left
. Note that you can see the current frame you're working in by the blue vertical line in the Timeline at the bottom. Also, in the 3D view there's a piece of text in the upper-left that reads(1) Scene Collection | Plane
: the current frame is listed between the parentheses. - In the scene there's two cars behind each other. Select the front car of the two.
- Enter a keyframe for the car's location and rotation: press
I
followed by pickingLocRot
- Change to the last frame in the animation with
Shift-Right
- Move the car to the end of the road it's on, along the Y axis
- Enter another
LocRot
keyframe withI
- Check the car movement by playing back the animation with
Space
, or by changing the time in the Timeline editor withShift-RMB
The car's speed currently is not constant: it speeds up near the beginning of the animation and slows down starting somewhere halfway. We can edit the curve for the Y location channel in the Graph Editor to influence this behaviour.
- In the Graph Editor on the left of the screen show all the location and rotation values being
animated for the selected car by using the little triangle left of the
name
Object Transforms
. Below theObject Transforms
you should now see the 6 channels for which you created keyframes in steps 4 and 7: X, Y and Z Location, and X, Y and Z Euler Rotation. - Click the eye icon next to
Object Transforms
to hide all the channels. Then click the eye next toY Location
to only show the graph for the Y location. Note that you can use theHome
key to zoom to the full extent of the graph.
You should now see a curved line in green with two orange filled circles at the times of the beginning and end of the animation, i.e. frames 1 and 250. Attached to the squares are "handles" (the lines that end in open circles) that influence the shape of the curve.
- Select the open circular endpoints of the handles and move them around. See what this does for the shape of the curve and the subsequent behaviour of the car in the animation.
The two curve points are selectable with Shift-LMB
, but also, for example,
border select (B
key). This works just like you normally select
objects. Deleting keyframes can then be done with X
.
- Select both curve points with
A
, PressV
to bring up the Keyframe Handle type. This menu allows you to change how the curve is shaped based on the position of the handles. - Select
Vector
. Notice how the curve's shape changes. See what happens when you move the handle endpoints. - Press
V
again and chooseFree
. Again change the handle endpoints. - Try out how the different curve shapes you can produce influence the car behaviour.
Now let's animate another car: the one at the start of the road with the bend in it.
- Animate the second to move over the bended road all the way to the end.
Bonus¶
Make the cars drive over the road, choosing yourself which cars goes in what direction, how fast, which turns are made, etc. But don't make cars go through each other and have them wait if needed.
Add a camera that shows the busy streets in action :)