The photography workbench · 03
A little focus.
A different feeling.
Explore how your lens, sensor and distances shape the background. Two cameras. One little garden. Change a setting and watch the difference.
How this simulation works ↓Find your separation.
Camera position stays fixed. B’s focal length adjusts to keep the subject the same size.
A Your reference
50 mm · f/1.8Focus is locked to the portrait subject.
B Your comparison
50 mm · f/8Focal length and distance follow camera A.
Loading generated scene artwork…
What changed?
Adjust either camera to compare the results.
Sharpness criterion & calculation details
This threshold changes the reported depth-of-field range, not the physical blur in the preview. Both images use the largest centered 3:2 crop that fits their sensor, shown at the same output size. Distances are measured from an ideal thin lens, not a camera’s sensor-plane mark.
Focal lengths are actual millimetres. Automatically matched values can fall outside the manually selectable range; they describe an ideal lens, not a product recommendation. Brightness is held constant.
AI-generated garden, stone paving and fictional adult portrait. The portrait and wall are flat layers; the ground is projected in perspective. The woman is modeled as approximately 1.70 m tall; the lights are ideal point sources. All calculations and rendering run in your browser.
Behind the blur
What you’re actually seeing.
Framing is part of the comparison.
Changing sensor size with the same lens changes how much of the scene you capture. Matching the framing by changing the lens keeps the viewpoint fixed. Moving the camera instead changes the relative size of the subject and background.
A sharpness range, not a sharp boundary.
The lens is focused on the portrait subject. Sharpness falls away continuously in front of and behind it. The depth-of-field range marks where calculated blur stays below your chosen acceptable threshold.
Blur amount ≠ bokeh character.
We calculate the diameter of a defocused point using thin-lens geometry. Real lenses also have aperture blades, aberrations, focus breathing and optical vignetting. Their bokeh can look different even with the same settings.
An educational approximation.
The generated woman and wall each occupy one depth plane. Generated paving forms a horizontal ground plane with approximate contact shadows and depth-dependent Gaussian blur. The preview approximates circular-aperture blur with sampled layers; it does not reconstruct a complete 3D scene. Diffraction, lens coverage, minimum focus limits, exposure, film grain and sensor noise are not modeled.
The equations we use
With focal length f, f-number N, focus distance s and object distance z, all lengths in millimetres:
Blur diameter = f² × |z − s| ÷ [N × z × (s − f)]
Image distance is v = fs / (s − f). A physical object of width L projects to vL / z on the sensor. Preview blur diameter equals sensor-plane blur divided by active sensor width, multiplied by preview width.
For acceptable blur c, let K = f² / (Nc). The near limit is sK / (K + s − f); the far limit is sK / (K − s + f), or infinity when that denominator is zero or negative. These are ideal geometric results.
Research & sources
- ZEISS — Depth of Field and Bokeh: format comparisons, viewing criteria and real lens behavior.
- NVIDIA GPU Gems — Depth of Field: blur-circle calculation and rendering approximations.
- Physically Based Rendering — Thin Lens Model: image formation and finite apertures.
- Our sensor and film size directory: format dimensions and their individual sources.