Sub topic 5
Finding vanishing points and perspective lines
This chapter assumes you can make selections and layer masks, use adjustment layers, and work with the Layers panel. It also assumes you have read the chapter on finding the horizon and eye level. Here you will find where the lines in a photo converge, then use that information to place and transform an element.
The working model
In a photograph, parallel lines in the real world do not stay parallel. Lines that run away from the camera appear to converge toward a single point. That point is a vanishing point. The horizon line is the horizontal line that passes through the vanishing points of all lines lying flat on the ground. It sits at the camera's eye level.
Three cases come up in practice:
| Perspective type | Vanishing points | Typical scene |
|---|---|---|
| One-point | One, on the horizon | Looking straight down a road, corridor, or railway |
| Two-point | Two, both on the horizon | Standing at the corner of a building |
| Three-point | Two on the horizon, one far above or below it | Looking up at a tall building or down from a rooftop |
An element looks wrong when its own lines point to different vanishing points than the background's lines. A table, a car, or a sign pasted into a corridor will look tilted or floating until its edges aim at the same points as the surrounding architecture.
Finding perspective lines in the background
Look for edges that you know are parallel in the real world and that run away from the camera:
- Building edges, window rows, and rooflines
- Floor tiles, paving joints, and road markings
- Table edges, shelves, and door frames
- Fence rails and railway tracks
Avoid natural curves, hand-drawn signs, and anything that is slightly off true in real life. A leaning old wall gives you bad data.
Pick at least two lines for each vanishing point. Choose lines that are far apart in the frame, because lines that sit close together amplify small errors when you extend them. Long lines are better than short ones for the same reason.
Drawing perspective guides manually
The most dependable method is to draw the lines yourself on a separate layer. This works in every Photoshop version and gives you full control.
- Create a new empty layer named
Perspective guidesabove the background. - Choose the Line tool (U) in Shape mode, or the Pen tool in Shape mode, and set a thin stroke with a bright colour such as magenta.
- Draw a line along each building edge or floor line. Hold Shift to constrain a line to the angle you are drawing.
- Extend each line well beyond the canvas edge. Enlarge the canvas temporarily with Image > Canvas Size if the vanishing point is off the image. You can also zoom out and work on the pasteboard area around the document.
- Find where the lines meet. If you drew several lines for the same direction, they will not meet at a single point exactly. Place the vanishing point in the middle of the cluster.
- Drag a horizontal guide from the ruler to the horizon height (View > Rulers, then drag from the top ruler).
Check your work. For lines lying flat on the ground, the vanishing points must lie on the horizon. If a vanishing point falls well above or below the horizon you drew, one of your lines is not truly horizontal in the real world, or the horizon estimate is wrong. Re-check both before moving on.
Using the Vanishing Point filter
Photoshop's Vanishing Point filter (Filter > Vanishing Point) lets you define a plane in the photo and then paste or clone content so that it follows that plane's perspective. Availability depends on your Photoshop version: it is present in current releases, but some recent builds list it under the Filter menu only when a pixel layer is active. If it is greyed out, select a pixel layer rather than a Smart Object or an adjustment layer.
To define a plane:
- Copy the element you want to place, so it is on the clipboard.
- Create a new empty layer above the background. The filter will write its result to this layer when you set Render to a new layer.
- Choose Filter > Vanishing Point.
- Select the Create Plane tool and click the four corners of a surface that you know is rectangular, such as a floor tile, a wall panel, or a tabletop.
- Watch the grid colour. A blue grid means the plane is valid. A yellow grid means it is approximate. A red grid means Photoshop cannot compute the perspective, and you must move corner points until it turns blue.
- Drag the plane's edge handles (Ctrl or Cmd and drag an edge) to extend the grid across the surface you want to cover.
- Paste with Ctrl+V or Cmd+V. The pasted content appears at the top left of the dialog. Drag it into the plane and it will snap to the plane's perspective.
- Use the Transform tool in the dialog to scale it, and the Marquee tool options to adjust Heal and Opacity.
- Click OK to commit.
The grid is a model of the perspective, so its accuracy decides how good the result is. Spend your effort on the four corner points. Zoom in on each corner and place it precisely on the edge.
Using the guides to transform a regular element
For most composites you will not use the filter. You will transform a layer by hand, using your guide lines as a reference. This is covered in more depth in the next chapter, but the check is simple.
- Convert the element to a Smart Object so that transforms stay editable (right-click the layer > Convert to Smart Object).
- Press Ctrl+T or Cmd+T and move the element near its target location.
- Look at the element's real-world edges. If it is a box, its top and bottom edges on one side should point toward the same vanishing point as your guide lines.
- Hold Ctrl or Cmd and drag a corner handle to skew the shape until the edges line up with your guide lines.
- Turn the guide layer on and off to check that the element's edges visually continue the lines of the scene.
Note that a flat photo of an object has its own perspective baked in. If the object was shot from a different height than the background, no amount of skewing makes it right. A photo taken from above can never be fixed by a tilt to match a background shot at eye level. Choose source images with a similar camera height and angle whenever you can.
Common errors
- Picking short lines. A short edge gives an unreliable direction. Extend it only if it is the best you have, and confirm it with a second line.
- Treating curved lenses as straight. Wide-angle lenses bend lines near the frame edge. Use lines near the centre of the frame, or apply lens correction first (Filter > Lens Correction).
- Mixing vanishing points from different surfaces. A building's left facade and right facade each have their own vanishing point. Do not average them.
- Ignoring the horizon. If an element's vanishing points do not lie on the same horizon as the background's, the element will look as though it is floating or sinking.
- Over-trusting the filter grid. If the grid is blue but visibly misaligned with the surface, the result will still be wrong. Judge by eye as well.
A worked example
You are placing a rectangular street sign on a brick wall that recedes to the right. The wall's horizontal mortar lines run away from the camera.
- Draw two mortar lines, one near the top of the wall and one near the bottom, and extend them to the right. They meet at a point on the right side of the canvas. Mark it.
- Draw a horizontal guide through that point. This is the horizon.
- Draw two vertical lines along window edges. They stay parallel, so the scene is two-point.
- Convert the sign to a Smart Object and open Free Transform.
- Drag the sign's top and bottom edges so that they aim at the vanishing point you marked. Its vertical edges stay vertical.
- Reduce the width of the sign slightly toward the vanishing point, because the far end of a receding surface is smaller than the near end.
When you toggle the guides off, the sign should look attached to the wall rather than laid over it.
Exercise
You extend two building edges and they meet at a point well above the horizon line you drew. What does this tell you, and what should you check?
Show answer
Lines that lie flat on the ground should converge on the horizon. A meeting point above it means that either the lines are not truly horizontal in the real world (for example, they are roof slopes or leaning edges), or the horizon estimate is wrong. Check that the edges you chose are horizontal in reality, and re-check the horizon position using other lines before transforming any element.
Exercise
In the Vanishing Point filter, the plane grid is red. What does it mean, and how do you fix it?
Show answer
Red means Photoshop cannot compute a valid perspective from the four corners. Move the corner points, zooming in to place each one exactly on the edges of a surface that is really rectangular, until the grid turns blue.