Skip to content

💻 "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.

  1. 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.

  1. 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.
  2. In the scene there's two cars behind each other. Select the front car of the two.
  3. Enter a keyframe for the car's location and rotation: press I followed by picking LocRot
  4. Change to the last frame in the animation with Shift-Right
  5. Move the car to the end of the road it's on, along the Y axis
  6. Enter another LocRot keyframe with I
  7. Check the car movement by playing back the animation with Space, or by changing the time in the Timeline editor with Shift-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.

  1. 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 the Object 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.
  2. Click the eye icon next to Object Transforms to hide all the channels. Then click the eye next to Y Location to only show the graph for the Y location. Note that you can use the Home 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.

  1. 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.

  1. Select both curve points with A, Press V 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.
  2. Select Vector. Notice how the curve's shape changes. See what happens when you move the handle endpoints.
  3. Press V again and choose Free. Again change the handle endpoints.
  4. 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.

  1. 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 :)


Last update: 28 November 2023 17:04:35