Depth of Field in Photography: What It Is and How to Control It

Explore depth of field in photography, including the factors that affect focus and ways to create shallow or deep focus effects. Discover camera settings, editing tools, and AI-assisted image and video creation.
Kling AI
Nov 19, 2026
18 min read
Depth of Field in Photography: What It Is and How to Control It

Depth of field determines which parts of an image appear sharp and which fall out of focus. It shapes how viewers perceive a subject and its surroundings, from blurred portrait backgrounds to detailed landscapes. Understanding this effect helps you make better creative decisions, whether you're adjusting camera settings or exploring new visual ideas with AI tools.

What Is Depth of Field in Photography?

To define depth of field simply, it is the range of distances in front of and behind the plane of focus that appear acceptably sharp in a photograph. The point isn’t how much of the scene the camera captures, but how much of the scene is in focus.

Picture your portrait taken in a garden. With a shallow depth of field, the person's face remains sharp while the background appears blurred. Also, a greater depth of field means that more of the surroundings are visible and defined.

Sharpness does not stop at a sharp boundary. As objects move away from the plane of focus, it decreases gradually. The extent of the area that looks acceptably sharp depends on camera settings, focusing distance, viewing conditions, and the final size of the image.

What Are the Ways to Create Depth-of-Field Effects?

You can create depth-of-field effects while taking a photo, edit them in post, or build them into a new visual. Each approach gives you different levels of control over focus and background blur.

Control Depth of Field With a Camera

A camera lets you control optical depth of field through aperture, lens choice, and focusing distance. These settings determine how much of a scene appears sharp.

Portraits and close-ups often use a wide aperture to blur backgrounds, while landscapes and architecture benefit from smaller apertures that keep more detail in focus. Greater subject-to-background distance can also make the blur more noticeable.

Adjust Background Blur With Photography Software

Editing software can simulate a different depth-of-field effect in an existing photo. Portrait and lens blur tools soften backgrounds, while masking helps keep selected areas sharp.

This works well when you want to preserve the subject and composition but change the focus emphasis. Complex edges, hair, and transparent objects may need extra refinement to keep the effect natural.

Explore Depth-of-Field Effects With AI Creation Tools

Beyond camera settings and traditional photo editing, AI offers another way to explore depth-of-field effects in new visual creations. Kling AI is a platform for generating and editing images and videos. Kling IMAGE 3.0 Omni helps you shape focus and background blur in still images, while Kling 4.0 lets you describe focus transitions and camera movements in cinematic videos.

For video, shallow depth of field can isolate a subject, while focus transitions help guide viewers' attention through a scene. Kling 4.0's Omni Reference lets you combine up to 15 reference assets, including images, videos, and Elements, to guide character appearance, composition, and camera movement. For example, use a portrait image to maintain character consistency and a reference video to guide a slow camera push-in, then describe a rack focus from a foreground object to the character's face in your prompt. This allows you to adapt existing shot concepts to your own scenes without planning every camera movement from scratch. With Kling 4.0's AI video editor, you can also refine existing footage by adjusting backgrounds, framing, or visual style while specifying which parts of the scene should remain unchanged.

For still images, Kling IMAGE 3.0 Omni supports both text-to-image and image-to-image generation. Its prompts can specify depth of field alongside composition, perspective, shot size, focal length, aperture, and lighting. You can create a portrait with the subject's eyes in sharp focus and a softly blurred background from text, or upload an existing photograph and describe which details to preserve while changing the focus and visual treatment. This gives you more control over the intended photographic look when developing a new image or refining a reference.

视频缩略图播放视频

The 4 Main Factors That Affect Depth of Field

Aperture, focal length, shooting distance, and sensor size all influence how much of a scene appears sharp. Understanding these factors helps you control focus in photography and describe the visual effects you want in AI-generated images and videos.

1. Aperture: Control How Much of the Scene Stays Sharp

Aperture controls how much light passes through a camera lens. A lower f-number, such as f/2.8, means a wider aperture and generally a shallower depth of field, making it easier to blur the background. A higher f-number, such as f/8 or f/11, usually keeps more of the scene in focus.

2. Focal Length: Choose the Right Lens

Focal length affects framing and depth of field. Wide-angle lenses, such as 24mm or 35mm, are commonly used for landscapes and interiors, while longer lenses, such as 85mm or 135mm, are popular for portraits. Longer lenses can create stronger background separation, although the result also depends on shooting distance and framing.

3. Subject Distance: Move Closer to Create More Background Blur

Moving closer to a subject generally creates a shallower depth of field, while stepping back increases the range of acceptable focus. This is especially noticeable in macro photography, where small changes in camera distance can affect which details appear sharp.

4. Sensor Size: Understand the Difference Between Cameras

Sensor size also influences depth of field. With equivalent framing and the same f-number, larger-sensor cameras generally produce a shallower depth of field than smaller-sensor cameras. Smartphones often use Portrait mode to simulate stronger background blur through software.

Shallow vs. Deep Depth of Field: Photography and Film Examples

These depth of field photography examples illustrate two different creative approaches. Shallow depth of field isolates a subject by keeping a smaller area sharp, while deep depth of field preserves more details across the scene.

Feature

Shallow Depth of Field

Deep Depth of Field

Sharp area

Relatively smallRelatively large

Background

More blurredMore clearly defined

Common apertures

f/2–f/2.8f/8–f/11

Popular uses

Portraits, macro, close-upsLandscapes, architecture, group photos

Main purpose

Separate the subject from its surroundingsPreserve environmental details

These aperture settings are common starting points rather than fixed requirements. The actual result also depends on focal length, focusing distance, and framing.

When to Use Shallow Depth of Field

Shallow depth of field works well when you want viewers to focus on a particular subject or detail. In portrait photography, a wide aperture can keep the subject's eyes sharp while softly blurring the background. In product photography, it can highlight a watch dial, jewelry detail, or cosmetic texture.

Macro photography also often produces a very narrow focus range because the camera is positioned close to the subject. However, excessive background blur can remove important context or leave parts of the subject unclear.

When to Use Deep Depth of Field

Deep depth of field is useful when the surroundings are as important as the main subject. Landscape and architectural photographers often use smaller apertures, such as f/8 or f/11, to keep foreground elements and distant details reasonably sharp.

This approach also works for group portraits, documentary scenes, and product photography where the entire product needs to remain visible. Choosing an appropriate focus distance helps balance sharpness across the composition.

Depth of Field in Film: Rack Focus and Moving Subjects

In filmmaking, depth of field helps directors guide viewers' attention as a scene unfolds. One common technique is rack focus, which shifts focus between subjects at different distances. For example, a coffee cup in the foreground may start in sharp focus before attention shifts to a character in the background.

Deep focus, by contrast, keeps multiple areas of a scene relatively sharp, allowing viewers to follow foreground and background action together. When subjects move, maintaining focus becomes more challenging, especially with shallow depth of field.

These examples show that depth of field is more than a camera setting—it also shapes how viewers experience a scene. The same creative principles can guide AI-generated images and videos, even without a physical camera or lens. By translating these ideas into prompts and visual references, creators can explore different focus effects and cinematic compositions.

How to Create Depth-of-Field Effects With Kling AI

Creating a depth-of-field effect with AI starts with a clear description of the subject, focus area, background appearance, and any changes in focus over time.

Kling AI supports both video and image workflows for this. Its AI video generation tools help you create new scenes from text and visual references. For video, Kling 4.0 supports focus-related prompts, camera movement, and Omni Reference. For still images, Kling IMAGE 3.0 Omni supports image creation with specific focus and composition.

Create Cinematic Videos With Depth of Field Using Kling 4.0

Kling 4.0 lets you describe focus relationships and camera direction in a video prompt. You can also use Omni Reference to provide visual and motion guidance, helping you develop a scene around a particular subject, background, and camera path.

Step 1: Open Kling 4.0 and Add Reference Materials

Open Video Generation and select Kling 4.0. The Omni Reference entry is the default creation mode. If you have reference images or videos, upload them to guide the subject's appearance, scene composition, or camera movement. If you don't have reference materials, you can start directly with a text prompt.

Step 2: Write a Prompt That Defines the Focus and Camera Movement

Describe the main subject, the details you want to keep sharp, and how blurred the background should appear. You can also specify the camera movement and whether the focus should stay on one subject or shift between the foreground and background.

Step 3: Generate and Review Your Video

Generate the video and check whether the main subject stays visually clear, the background blur supports the composition, and any focus transitions occur as intended. Review moving subjects and camera changes for unexpected shifts. If needed, refine the prompt or reference materials and generate another version.

Reference Image 1

Reference Image 2

Reference Image 1

Reference Image 2

Generated Video

视频缩略图播放视频

Create Images With Depth of Field Using Kling IMAGE 3.0 Omni

Kling IMAGE 3.0 Omni supports text-to-image and image-to-image generation, giving you two ways to develop a photograph with a specific focus effect. You can describe a new composition from scratch or use an existing image to guide the subject, lighting, and overall scene.

The model also supports detailed instructions for composition, perspective, lighting, and depth of field, making it useful for portrait concepts, product photography, and cinematic stills.

Step 1: Select Kling IMAGE 3.0 Omni and Choose Your Input

Open Image Generation and select Kling IMAGE 3.0 Omni. Choose text-to-image if you are creating a new composition, or upload a reference image if you want to retain an existing subject, product, or scene. Prepare a clear visual reference before writing your prompt.

Step 2: Describe the Focus Area and Depth-of-Field Effect

Specify the subject, camera framing, lighting, and background appearance. For shallow depth of field, describe which details should remain sharp and how the background should blur. For deeper focus, explain which foreground and background elements need to stay visible.

Step 3: Generate and Check the Image

Generate the image and inspect the subject's edges, background blur, and overall focus distribution. Check whether important details such as facial features, product edges, and foreground objects remain clear. Adjust the prompt or reference instructions if the blur looks excessive or inconsistent.

Input Image1

Output Image

Woman in denim jacket and jeans

Man in teal suit

Cinematic subway scene with shallow depth of field

Common Depth of Field Mistakes to Avoid

Whether you're shooting with a camera or creating visuals with AI, these mistakes can affect the final depth-of-field effect.

  • Choosing the wrong aperture: An overly wide aperture may leave important details out of focus, while an extremely narrow aperture can reduce sharpness through diffraction.
  • Focusing on the wrong area: For portraits, prioritize the subject's eyes. When filming moving subjects, consider how the focus should follow their movement.
  • Ignoring background composition: Blurring the background does not always eliminate distracting shapes, bright spots, or unwanted colors.
  • Overusing simulated background blur: Excessive blur in photo editing or AI-generated images can create unnatural edges around hair, transparent objects, or overlapping subjects.
  • Giving unclear AI focus instructions: Instead of simply requesting a blurred background, specify which subjects should remain sharp, which areas should appear out of focus, and whether the focus should change during a video.

Always review the subject, foreground, and background together to ensure the focus effect supports the intended composition.

The End

Depth of field shapes how viewers see a scene, from softly blurred portraits to detailed landscapes. Understanding aperture, focal length, and shooting distance helps you control focus and create the look you want.

For your next creative project, Kling 4.0 offers video generation and editing with text prompts and visual references, while Kling IMAGE 3.0 Omni helps you create and refine still images with different focus effects.

FAQs

What Is Depth of Field in Simple Words?

Depth of field is the part of an image that looks sharp, from the area in front of the focus point to the area behind it. A shallow depth of field keeps the main subject clear while blurring the background. A deep depth of field keeps more of the scene in focus. In Kling AI, you can describe these effects directly in image or video prompts to create different visual compositions.

What Is f/2.8 Depth of Field?

An f/2.8 aperture is relatively wide and is commonly used to create a shallow depth of field. It works well for portraits and close-up product shots where you want the subject to stand out against a blurred background. The actual result also depends on focal length and shooting distance. With Kling IMAGE 3.0 Omni, you can use terms such as "f/2.8" and "shallow depth of field" in a prompt to explore a similar photographic look.

What Are the Two Types of Depth of Field?

The two commonly discussed types are shallow depth of field and deep depth of field. Shallow depth of field keeps a smaller area sharp, making it useful for portraits and close-ups. Deep depth of field keeps more of the foreground and background visible, which works well for landscapes and architectural photography. You can describe either effect when generating images with Kling IMAGE 3.0 Omni or videos with Kling 4.0.

What Is Depth of Field in Film?

In filmmaking, depth of field describes how much of a scene appears in focus. Directors and cinematographers use shallow focus to draw attention to a character or object, while deep focus allows viewers to see activity in different parts of the frame. Focus changes can also guide attention as a scene develops. Kling 4.0 lets you describe these focus relationships and camera movements in video prompts, with Omni Reference providing additional guidance through reference images and videos.

Can You Give an Example of Depth of Field in Film?

A common example is a conversation scene where one character is in sharp focus while another character in the background appears blurred. When the background character begins speaking, the focus shifts to them. This is called a rack focus. With Kling 4.0, you can describe the starting focus, the subject receiving attention, and the intended camera movement in a prompt to explore a similar cinematic sequence.