Sub topic 1
What the 3D viewport shows: the view as a camera on your scene
The 3D viewport is where you build and inspect a scene in Blender. This chapter gives you the working model that the rest of the tutorial relies on. The viewport is not the scene. It is a window with its own virtual camera looking at the scene. Once you hold that model, orbit, pan, zoom, and the standard views are all ways of moving that one virtual camera.
Prerequisites
This chapter assumes the following:
- Blender 2.8 or later is installed, with the default keymap.
- You know the basic interface: the editors (areas), the header at the top of each editor, and the Properties editor.
- You have a mouse with a middle button, or a laptop with a numpad or an equivalent setup. The next chapter covers setting this up.
- For the optional Python example at the end, you know how to open the Scripting workspace and run a script.
The viewport is an editor with its own view
The 3D viewport is one editor type among many. Each one you open is a separate area on the screen. Each has its own view of the same scene.
You can split the screen into two or more 3D viewports. Each shows the same objects but from a different position. You can look at a character's face in one area and its full body in another. Moving the view in one area never moves the view in another.
The viewport holds three kinds of information.
| Kind of information | Example | Where it lives |
|---|---|---|
| Scene data | Meshes, lights, the scene camera, materials | The scene, saved with the .blend file |
| View data | Where you are looking from, projection, zoom | The viewport area (the screen layout) |
| Display settings | Shading mode, overlays, gizmos | The viewport area |
Navigation changes only the second row. Orbiting, panning, and zooming do not move any object, and they do not change the rendered image.
The view is a virtual camera
Think of the view as a camera that only you see. It has four properties.
- A point it looks at. Blender calls this the view location, or the orbit pivot. The view always sits at a distance from this point and looks toward it.
- A direction. This is the rotation of the view around that point.
- A distance. This is how far the viewer is from the pivot. Zooming changes it.
- A projection mode. This is either perspective or orthographic.
This explains behavior that confuses many learners. When you orbit, the viewer travels around the pivot on an imaginary sphere. It does not spin in place. When you zoom, the viewer moves toward or away from the pivot. When you pan, the pivot slides sideways and the viewer follows it.
The viewport camera is not the scene camera
Beginners often mix up these two cameras, so keep them apart.
- The viewport view is the virtual camera described above. It exists for you, the person working. It is never rendered.
- The scene camera is an object in the scene, usually named Camera. It determines what a render shows.
Most of the time you look at the scene from the viewport view, and the scene camera appears as a small pyramid-shaped wireframe object. Pressing Numpad 0 switches the viewport to look through the scene camera. The header then shows that you are in camera view. A later chapter covers this in detail. For now, remember that moving the viewport view and moving the scene camera are two different actions with different results.
Reading the viewport on screen
The viewport tells you what the current view is. Learn to read it before you move anything.
- Top-left text. This shows the view name and projection, such as
User Perspective,Top Orthographic, orCamera Perspective. Below it you see the active collection and the name of the active object, for example(1) Collection | Cube. - The grid and axis lines. In perspective and in most orthographic views, the floor grid and the colored axis lines show direction. The red line is the X axis, the green line is the Y axis, and the blue line is the Z axis.
- The navigation gizmo. At the top-right is a small axis widget. Its colored circles show which way X, Y, and Z point from your current viewpoint. You can click and drag it to navigate. A later chapter covers it.
- The header. It holds the mode selector, the View menu, and shading and overlay controls. The View menu lists every navigation command and its shortcut.
A view named User Perspective means you are at an arbitrary angle, not aligned to an axis. Names such as Front Orthographic mean the view looks straight along one axis.
Perspective and orthographic in one paragraph
In perspective projection, objects farther away look smaller, as they do in a photograph. In orthographic projection, objects keep the same size regardless of distance, and parallel lines stay parallel. Perspective suits judging how the scene will look. Orthographic suits measuring and aligning. The projection mode is a property of the viewport, so changing it does not change the scene. Chapter on projection covers the details and the shortcut.
Where the view settings are
Most of the view's numbers are visible in the Sidebar. Press N with the mouse over the viewport to open it, then open the View tab.
- Focal Length sets the lens of the viewport camera in perspective mode. A short focal length gives a wide, distorted look. A long one gives a flat, narrow look. The default is 50 mm.
- Clip Start and Clip End set the nearest and farthest distances the viewport draws. Objects outside this range disappear. A later chapter covers this, because it is a common cause of "my object vanished".
- View Lock options include Lock to Object and Lock Camera to View. The second one is risky. If it is on, navigating moves the scene camera, so you change scene data without meaning to.
Common errors at this stage
- Moving the object when you meant to move the view. Pressing G, R, or S transforms the selected object. Navigation uses the middle mouse button, the numpad, or the gizmo. If an object moved, press Ctrl+Z.
- Looking at the wrong area. Shortcuts act on the area under the mouse pointer. If a navigation key does nothing, check that the pointer is over the viewport and not over another editor.
- Assuming a view change is part of the scene. Navigation is not an undoable edit in the same way as a transform. Pressing Ctrl+Z will not step back to the previous view. To return to a known view, use a standard view or framing shortcut instead.
- Confusing the two cameras. If the render is wrong but the viewport looks right, you may be judging the viewport view and not the scene camera's view.
- Believing the objects are gone. Often the view, not the scene, is the problem. The view may be too far away, pointed the wrong way, or clipped. Fixing the view recovers the objects.
Reading the view with Python
Each 3D viewport stores its view in a data block called RegionView3D. You can read it from the Python console or the Scripting workspace. This shows that the view really is just a few numbers.
import bpy
for area in bpy.context.screen.areas:
if area.type == 'VIEW_3D':
r3d = area.spaces.active.region_3d
print(r3d.view_perspective) # 'PERSP', 'ORTHO', or 'CAMERA'
print(r3d.view_distance) # distance from the view to its orbit pivot
print(r3d.view_location) # the pivot point in world space
print(r3d.view_rotation) # the view direction as a quaternion
breakRun it, then orbit and zoom in the viewport and run it again. The rotation and distance change, but no object in the scene changes. A later chapter shows how to set these values to build repeatable setups.
Putting the model to use
Use the model as a checklist whenever the viewport looks wrong.
- Read the top-left text. Which view and projection are you in?
- Check whether you are looking through the scene camera.
- Ask whether the pivot, the distance, or the direction is the problem.
- Choose the matching fix: orbit to change direction, pan to move the pivot, zoom to change distance.
Exercise
You orbit around a cube, then press Ctrl+Z, and the view does not return to its earlier angle. A coworker's second 3D viewport, showing the same scene, did not move at all. Explain both observations using the idea that the view is separate from the scene.
Show answer
Navigation changes only the view data stored in that one viewport area (pivot, rotation, distance, projection). It does not edit scene data, so it is not an undoable scene edit, and Ctrl+Z has nothing to step back. Every viewport area stores its own view, so the second viewport kept its own pivot, rotation, and distance. To return to a known angle, use a standard view or a framing command.
Exercise
What is the difference between the viewport view and the scene camera, and which one decides what a render shows?
Show answer
The viewport view is a virtual camera that exists only to help you work and is never rendered. The scene camera is an object in the scene. The scene camera decides what a render shows.