Sub topic 10
Camera view: looking through the scene camera
Camera view shows the scene exactly as the active camera sees it. Every other viewport view is a free-floating observer. Camera view is the one that matches your render. This chapter covers how to enter and leave it, how to move the camera without losing the framing, and what the frame, passepartout, and lock options do.
This chapter assumes you can already orbit, pan, and zoom, and that you know the standard numpad views and the difference between perspective and orthographic projection from earlier chapters. You should also know how to select an object and use the sidebar (N key). It uses the default keymap. On a laptop without a numpad, either enable Emulate Numpad or use the View menu entries.
What camera view is
A normal viewport view is described by the viewport's own position, rotation, and distance. Camera view replaces that with the position, rotation, and lens settings of one camera object. That camera is the active camera, stored as scene.camera. A scene can contain many cameras, but only one is active at a time.
In camera view, Blender draws a rectangle called the camera frame. Its shape comes from the render resolution in Output Properties, so a 1920 x 1080 render gives a 16:9 frame. Only what lies inside the frame appears in the final image. The area outside is still drawn, so you can see nearby objects.
The viewport shows the same view that a render would, with the following exceptions:
- Viewport shading (Solid, Material Preview) is not the render engine's output.
- Overlays such as the grid, outlines, and relationship lines appear only in the viewport.
- Passepartout dims the area outside the frame, but the render ignores it.
Entering and leaving camera view
There are several ways in. They all do the same thing, which is to set the viewport's perspective mode to camera.
| Action | Shortcut | Menu path |
|---|---|---|
| Toggle camera view | Numpad 0 | View > Cameras > Active Camera |
| Make selected object the active camera and enter camera view | Ctrl+Numpad 0 | View > Cameras > Set Active Object as Camera |
| Leave camera view | Orbit the view, or press another view key | View > Viewpoint |
Pressing Numpad 0 a second time returns you to the view you had before. In the default setup, orbiting inside camera view also leaves it and drops you into a normal perspective view at the same position. This is intentional, because orbiting is a free-view action and the camera should not move by accident.
If you press Numpad 0 and nothing happens, the scene probably has no active camera. Add one with Add > Camera, then use Ctrl+Numpad 0 with the new camera selected.
Moving the camera while you look through it
You have three common ways to change what the camera sees.
Move the camera object directly
Select the camera and use G, R, and S like any other object. In camera view, G followed by an axis key or a mouse drag moves the camera in the scene. The view updates live. This is precise but indirect, because you must choose an axis for each move.
Lock Camera to View
Open the sidebar with N and choose the View tab. Under View Lock, enable Camera to View. While it is on, navigating in camera view changes the camera object itself:
- Orbiting rotates the camera.
- Panning slides the camera.
- Zooming moves the camera forward or back.
This is the quickest way to compose a shot, because you navigate normally and the camera follows. The camera view border turns red as a warning that navigation is now editing the camera. Turn it off when you finish, or you will move the camera by accident the next time you pan.
Align the camera to the current view
Move the free viewport to a good angle first, then use View > Align View > Align Active Camera to View (Ctrl+Alt+Numpad 0). The active camera jumps to match the viewport. This is useful when you found a good angle while modeling and want to keep it as the shot. A related entry, Align Active Camera to Selected, matches the camera to the selected object.
Zooming and panning inside the frame
Even without Lock Camera to View, you can zoom in camera view. The scroll wheel changes how large the frame appears in the viewport. It does not change the camera's lens or position. This lets you inspect detail without altering the shot.
Some related tools:
- View > Frame All (Home) in camera view fits the camera frame into the viewport. Use it when the frame has drifted out of view after zooming.
- Zoom Border (Shift+B) zooms the viewport into a rectangle you drag. It works in camera view too, and it leaves the camera alone.
- Panning with Shift+middle mouse in camera view slides the viewport, again without moving the camera, unless Lock Camera to View is on.
Frame and guides
Select the camera and open the Object Data Properties tab, which shows the camera icon. The Viewport Display panel controls how the frame looks:
- Passepartout darkens the area outside the frame. The Opacity slider sets how dark it is. At 1.0 the outside is fully black, which is useful for judging composition.
- Safe Areas shows title-safe and action-safe boundaries for video work.
- Composition Guides draws helpers such as Thirds, Center, and Golden Ratio over the frame.
The Lens panel controls focal length and type. A longer focal length gives a narrower field of view and flatter perspective. Changing the lens in camera view lets you see the effect on the composition at once.
Orthographic and panoramic cameras
Camera view uses the camera's own projection, not the viewport's. A camera set to Orthographic in its Lens panel produces an orthographic view in camera view, regardless of what the viewport used before. For an orthographic camera the Orthographic Scale value controls how much of the scene fits the frame, since there is no field of view to adjust.
Controlling camera view from Python
The earlier scripting chapter introduced region_3d.view_perspective. Setting it to 'CAMERA' has the same effect as pressing Numpad 0. The script below creates a camera if the scene has none, makes it active, and switches every 3D viewport to camera view with a dimmed passepartout.
import math
import bpy
scene = bpy.context.scene
# Create a camera if the scene has no active one.
if scene.camera is None:
cam_data = bpy.data.cameras.new("ShotCam")
cam_obj = bpy.data.objects.new("ShotCam", cam_data)
scene.collection.objects.link(cam_obj)
cam_obj.location = (7.0, -7.0, 5.0)
cam_obj.rotation_euler = (math.radians(63), 0.0, math.radians(45))
scene.camera = cam_obj
cam = scene.camera
cam.data.lens = 50.0
cam.data.show_passepartout = True
cam.data.passepartout_alpha = 0.8
# Switch every 3D viewport to camera view and keep the camera unlocked.
for area in bpy.context.screen.areas:
if area.type == 'VIEW_3D':
space = area.spaces.active
space.lock_camera = False
space.region_3d.view_perspective = 'CAMERA'
area.tag_redraw()Run it from the Text Editor with Alt+P. The space.lock_camera property is the same setting as Camera to View in the sidebar. If you set it to True and then change region_3d values, the script will move the camera, so keep it False unless you want that.
Common problems
- Numpad 0 shows an empty or odd view. The scene has no active camera, or the active camera points away from your objects. Select the camera and use Ctrl+Numpad 0, then check its rotation.
- The camera drifts when you pan. Camera to View is on. Disable it in the sidebar View tab.
- Objects appear in the viewport but not in the frame. They are outside the camera frame, or closer than the camera's Clip Start or farther than its Clip End. Clipping on the camera is set in its Lens panel, separately from the viewport clipping.
- The frame has the wrong proportions. Check render resolution in Output Properties.
- Camera view will not stay on after you orbit. This is the default behavior. Use Lock Camera to View if you want orbiting to move the camera.
Exercise
You are in camera view with Lock Camera to View turned on. You scroll the mouse wheel to zoom in and then press Ctrl+Z. What does the undo reverse, and what would have happened if the lock had been off?
Show answer
With the lock on, zooming moved the camera object toward the scene, so it changed the camera's location. Ctrl+Z undoes that change and puts the camera back. With the lock off, scrolling would only have enlarged the frame in the viewport and left the camera unchanged, so there would be no camera change to undo.
Exercise
Write the one line of Python that makes a given 3D viewport area's space show the active camera's view, and name the key that does the same thing.
Show answer
space.region3d.viewperspective = 'CAMERA' sets camera view. The equivalent key is Numpad 0.