Skip to content

💻 Camera orbiting using parenting

We will try another way of doing a camera orbit. This method involves parenting the camera to an empty. Parenting is creating a hierarchical relation between two objects. An empty is a special 3D object with no geometry, but which can be placed and oriented in the scene as usual. It is shown as a 3D cross-hairs in the 3D view. It is often used when doing parenting.

  1. Load orbit.blend.
  2. If you happened to have saved the file in the previous assignment with some keyframes set on the camera you can delete these by selecting the Camera. Then go into the Timeline editor at the bottom and select all keyframes (diamond markers) with A, press X, choose Delete Keyframes.
  3. Reset the 3D cursor to the origin with Shift-C
  4. Add an Empty to the scene: Shift-A > Empty > Arrows
  5. Select only the camera, then add the Empty to the selection by clicking Shift-LMB with the cursor over the empty (or using Ctrl-LMB in the outliner). The camera should now have a dark orange selection outline, while the empty should have a light orange outline, as the latter is the active object.
  6. Press Ctrl-P and pick Object to add a parent-child relationship

A black dotted line from the camera to the empty should now be visible in the scene. This means the camera is now parented to the empty. Any transformation you apply to the empty will get applied to the camera as well.

Bad Parenting

If you made a mistake in the parenting of step 6 then you can clear an object's parent by selecting that object, pressing Alt-P and picking Clear Parent.

  1. Verify in the outliner that the Camera object is now indeed a child of the Empty (you might have to use the little white triangles to open the necessary tree entries)

  2. Make the empty the single selected object. Enter Z rotation mode by pressing R followed by Z. Note that as you move the mouse both the empty and camera are transformed. Exit the rotation mode with Esc, leaving the Z rotation of the empty set to zero.

  3. Add key frames at the beginning and end of the animation to have the empty rotate 360 degrees around Z over the animation period

  4. Check the camera orbit, including how it looks in the camera view. Is this orbit better?

You might have noticed that, even though we now have a nice circular rotation of the camera around the object, the rotation speed actually isn't constant. If you select the empty and look at the Graph Editor you can see that the graph line representing the Z rotation value isn't straight, but looks like an S. This is due to the default interpolation mode that is used between key frames.

  1. To make the rotation speed constant make sure the empty is selected. Then in the Graph Editor select all curve points with A and press V to set the handle type, pick Vector. The curves should now have become straight lines. Check the animation to see the rotation speed has become constant.

  2. Depending on how exactly you set up the animation you might notice a hickup at the moment that the animation wraps around from frame 99 to frame 0. This happens in case you set the same visible rotation of the empty for frame 0 and 99 (e.g. 0 degrees for frame 0 and 360 degrees for frame 99). You can fix this by changing the animation length to 99 frames by setting End to 98 in the Output properties panel (the value is directly below Frame Start). Now, the animation should wrap around smoothly.


Last update: 20 March 2024 10:18:57