Sub topic 11
Positioning and Aiming the Camera
Assume you know how to orbit, pan, and zoom in the 3D Viewport. You should also know the difference between a viewport view and a rendered image. This chapter uses those skills to place a camera and aim it at a subject.
Place the Camera
A camera is an object with camera data. The object has a location and rotation in 3D space. Its camera data contains settings such as focal length and clipping distances.
Select a camera and press N to open the Item panel. Edit its Location and Rotation values directly when you need repeatable placement. You can also position it interactively:
- Select the camera.
- Press
Numpad0to enter camera view. - Press
Gto move the camera orRto rotate it. - Use
G, thenG, to move the camera along its local axis. - Press
G, thenZ, thenZto move it along its local Z axis.
In camera view, enable Lock Camera to View in the View panel. You can then orbit and zoom the viewport to adjust the camera. Disable this option after framing the shot so ordinary viewport navigation does not move the camera accidentally.
Aim at a Subject
A camera points along its local negative Z axis. Its local Y axis defines the top of the image. Rotating a camera by hand can be difficult because several rotation axes interact.
A Track To constraint calculates the rotation needed to point one object at another. Set the camera as the constrained object and the subject as the target. Use -Z as the tracking axis and Y as the up axis.
import bpy
# Create a visible subject.
bpy.ops.mesh.primitive_uv_sphere_add(location=(0, 0, 1))
subject = bpy.context.object
subject.name = "Subject"
# Create and place the camera.
cam_data = bpy.data.cameras.new("ShotCamera")
camera = bpy.data.objects.new("ShotCamera", cam_data)
bpy.context.scene.collection.objects.link(camera)
camera.location = (6, -6, 4)
# Aim the camera at the subject.
constraint = camera.constraints.new(type="TRACK_TO")
constraint.target = subject
constraint.track_axis = "TRACK_NEGATIVE_Z"
constraint.up_axis = "UP_Y"
bpy.context.scene.camera = cameraThe constraint keeps the camera aimed at the subject as you move the camera. Moving the target also changes the camera's aim.
Align a Camera to the Viewport
You can build a view interactively and then make the camera match it:
- Navigate the viewport until the composition looks right.
- Press
Ctrl+Alt+Numpad0. - Blender aligns the active camera to the current view.
- Press
Numpad0to check the result in camera view.
This method is useful for exploratory framing. Use numeric transforms or constraints when you need a repeatable setup.
Check the Framing
After aiming the camera, inspect the frame boundaries rather than the full viewport. Check that the subject has enough space in the direction of movement or gaze. Keep important details away from the edge unless the tight framing is intentional.
Use the camera's composition guides, such as thirds, to evaluate placement. If the subject appears tilted or vertical lines converge unexpectedly, check the camera rotation and position before changing the lens.
Exercise
How would you keep a camera aimed at a moving subject during an animation?
Show answer
Add a Track To constraint to the camera and assign the moving object as its target. Use TRACKNEGATIVEZ and UP_Y.