Depth / focus
Live previewEditing AFIT
Scroll to zoom · Space + drag to pan
Focus
Click or drag on the image to move focus. Hold S to see the source.
Your depth map/—

Settings

The interface follows your device’s light or dark appearance. Colour identifies depth values, A/B focus targets and warnings; image processing is unchanged.

Starting looks

A preset changes the active band’s width and softness, plus the shared tone settings. It keeps both focus positions and the other band’s shape.


Detecting palette…

Spectral recovers approximate values from the example’s palette. Hue selects similar colours in other maps. Grayscale uses the map’s brightness. Changing encoding retains slider positions, so pick your focus values again if needed.


Keep a look

Saves both 3D planes’ pivots, angles and slide settings, the depth mix, tone controls and both detail settings; images are not included. Versions 1–6 remain flat. Active v7 planes are converted using the loaded image’s aspect ratio, so check the result. A previous single detail layer becomes Detail 1.

The preview is sized for speed. PNG export uses Map 1’s original pixel dimensions, with the depth mix applied before focus and detail. Pins and controls are excluded. Image input/output still uses 8-bit channels.

Depth mix

Import two depth maps of the same scene and framing. Each map is decoded separately, then the depth values are averaged before the focus bands and detail layers.

Depth = (1 − weight) × Map 1 + weight × Map 2
Load an original map, then an optional second map.

Both inputs need a meaningful, compatible 0–1 depth scale.

Different resolutions are fine; Map 1 sets the output size. This is resizing, not automatic image registration.

The maps must use matching depth ranges and direction. Reversal fixes opposite near/far conventions, not different scales, offsets, nonlinear encodings or a different camera angle. No automatic range calibration is applied.

50% gives equal weight to both valid maps. 0% keeps Map 1. 100% uses Map 2 where it covers Map 1. Transparent or missing pixels in Map 2 leave Map 1 unchanged; partially transparent pixels reduce Map 2’s weight. Map 1’s transparency is preserved.

Hue is a colour-selection mode, not a reliable linear depth scale. Mixing is bypassed if either input is read as hue. Select the correct Spectral or grayscale encoding rather than forcing an unrelated palette.

The preview menu on the deck lets you inspect Mixed, Map 1 or Map 2 without changing their weights. The eyedropper always samples the active combined depth. Use Compare for a split against the final result. Opening another Map 1 pauses Map 2 and both detail layers to avoid silently mixing unrelated scenes.

Averaging can reduce differing random errors, but identical errors remain. Misaligned edges or mismatched depth scales can make the result worse. Loading the same map twice provides no independent noise information.

Detail 1 options.

Each layer accepts a matching normal map, source photograph or black-and-white image. It is converted to grayscale; its colours never reach the output.

No detail image loaded.

Different pixel dimensions are fine. Use images of the same scene and framing. This resizes the layer; it does not recognise or register objects.

Multiply darkens the focus image with the detail texture, including white highlights. Overlay changes midtone contrast while leaving pure black and pure white unchanged. Both modes keep black areas black. Opacity ranges from 0–100% independently for each layer.

Stack order: depth focus → Detail 1 → Detail 2. The second layer works on the result of the first. Use Swap to exchange their images and settings together. Mixed blend modes can look different in the opposite order.

Normal maps are used as grayscale textures here, not as physically relit 3D surfaces. The supplied sample matches the built-in depth map.

Both opacity sliders stay on the editing deck. Select a Detail heading, then use D to toggle that layer, or use its switch. Opening another depth image pauses both detail layers until you re-enable or replace them.

Export uses the depth map’s original dimensions, sampling each enabled layer from its original image. Fit inside leaves uncovered areas unaffected. Preview size is capped; export reuses a strip-sized detail canvas for both layers to reduce working memory. Very large images may still exceed your browser’s memory or canvas limits.

Turn a plane. Not the image.

Imagine a translucent sheet passing through the visible surfaces in your depth map. Surfaces close to that sheet are light; surfaces farther away are dark. This version rotates the sheet itself, rather than adding a hue gradient.

RotateDrag in the 3D box. It turns the active plane about its pivot; it does not orbit the camera. The two angle sliders offer precise left/right and up/down rotation in degrees. Face-on sets both to zero.
PlaceUse A or B’s eyedropper, then tap a subject in the main image. This puts the pivot on that sampled depth and sets Slide to zero. The orientation stays unchanged.
SlideThe Slide control moves the plane along its own normal, without rotating it. Zero passes through the pivot. Positive moves toward the arrow in the 3D view; negative moves the other way.
ThicknessA band around the sheet, measured perpendicular to it. This stays a genuine thickness when the plane turns edge-on. Softness controls the fade at the band’s boundaries.

A and B are independent planes. Select A or B in the cards or 3D header. The shared 3D box and angle sliders edit only that plane. Their focus weights are combined with max, then shared tone and both detail layers are applied.

Oblique, Front, Side and Top change only the inspection viewpoint. The cloud is a reduced sample of the mixed depth map; it previews focus membership, not the downstream detail textures. The translucent sheet is clipped to the box only for display; the selection plane extends infinitely.

Geometry: the image’s longest side and the decoded depth range are each treated as one unit. Every visible pixel becomes a point (image X, image Y, depth). Selection uses signed perpendicular distance n · (point − pivot) − slide to the rotated plane. There is no division by the plane’s depth-axis component and no clipping of shifted depth values, so an edge-on plane is well-defined.

This is normalized image/depth space, not calibrated camera space. The input does not supply focal length or a metric depth scale. A colourized or relative depth map cannot establish physical scene angles here. The control genuinely rotates a plane in the chosen model, but it does not reconstruct hidden surfaces or give an accurate 3D scan.

Use Spectral or grayscale encoding. Arbitrary circular hue is not treated as a linear depth axis; 3D focus is paused in hue mode. Changing image dimensions is supported; perspective/crop registration and a raw 16-bit workflow are unchanged.

Switching Advanced off hides the 3D controls and restores the simple flat bands. It retains the saved pivots, rotations and slide values. Guide pins and the 3D diagram are never exported.

Using Depth / Focus

This is a tiny, local darkroom for existing depth maps. It turns one or two chosen bands of depth values into white and gray, while the rest goes dark. It does not generate a depth map from an ordinary photo.

1

Open or drop an image. A built-in example pair can be loaded from Settings. Pasting a copied image also works where the browser allows it.

2

Pick A, then optionally B. Tap A’s eyedropper and choose a colour in the image. Tap B’s eyedropper to enable a second band and pick its colour. Each band has its own position, width, and softness. B’s switch removes or restores it without forgetting its settings.

3

Shape both bands. The compact deck keeps the controls with the image. Advanced adds a 3D rotator; short or zoomed viewports can scroll the controls while the preview remains visible. Select the A or B heading to choose which band a direct preview tap or palette drag edits. Contrast, midtone lift, tone profile, and inversion affect both bands. Leave outside light at zero to keep unselected depths black.

4

Add up to two detail layers. Use Load in Detail 1 or Detail 2 for a matching normal map, photograph or grayscale image. Each has its own Multiply/Overlay mode, 0–100% opacity and bypass switch. D1/D2 preview their aligned grayscale images. Each settings button opens that layer’s alignment options. Detail 1 blends first, then Detail 2; Swap exchanges them.

5

Export PNG. The export contains only the finished monochrome image, at the original pixel dimensions—not the comparison or the controls. Both enabled detail images are resampled to the original depth-map dimensions. Save look stores a reusable settings file, not the images; load your matching images separately.

Average two depth estimates

Use Map 1 and Map 2 in the Depth mix section. Map 2 defaults to 50% weight, giving an equal average of the decoded depth values wherever both are valid. This is not a Multiply detail layer and does not average the final black-and-white focus results. A bypass switch lets you compare with Map 1 alone. The gear opens independent encoding, fit and reversal options.

Use maps with matching scene geometry, depth direction and depth range. Different resolutions are resampled to Map 1. Differing random errors may average down; shared artifacts and biases do not disappear. Misaligned boundaries can double or smear. A normal map is not a second depth map: use it in a Detail slot instead. Colourized maps still give approximate scalar values and this is not a 16-bit input/output workflow.

Detail without changing focus

Depth still decides which parts of the image are light or dark. The two optional grayscale layers supply surface texture independently. Normal maps are converted to grayscale rather than interpreted as lighting vectors. Multiply and Overlay both preserve black areas. Multiply can add detail to white highlights; Overlay leaves pure white unchanged. Zero opacity is identical to disabling that layer; removing or bypassing one does not disable the other. The depth map’s transparency is preserved, and transparent areas of the detail image do not affect it.

Different resolutions are supported. Match frame maps the whole detail image onto the whole depth map. Fill frame preserves aspect ratio and crops the centre. Fit inside preserves aspect ratio without cropping and leaves uncovered areas alone. None of these corrects a different camera angle or non-matching crop automatically.

3D focus planes

Switch on Advanced above the focus cards. Pick a subject with A or B’s eyedropper to place that plane’s pivot. Drag in the 3D box to rotate it, or use Left / right and Up / down in degrees. Slide translates it along its normal; Thickness is measured perpendicular to the plane. A and B have independent rotations and positions. Face-on resets only the selected plane’s rotation. Inspection viewpoints change the diagram, not the export.

Advanced is hidden by default. The diagram uses normalized image coordinates and decoded depth, not calibrated metric 3D. Hue mode pauses 3D selection. Older looks load; active two-point v7 planes are converted to the new geometry when possible. Save look retains the new pivot, rotation and slide settings, not the images.

Two depths, not two objects

Both bands appear in the final image at once. Where they overlap, the brighter result wins; their light is not added together. A and B pins show where you last sampled and are not exported. Moving a position slider clears that band’s pin. In basic mode, every pixel with the selected depth is included. Advanced compares each pixel’s 3D point with the selected plane instead.

Three tone profiles

Focus band: white at the selected value, fading toward black at either edge. Depth gradient: a directional gray ramp inside that same band. Binary mask: white inside, black outside; softness, contrast, and midtone lift do not apply. Invert swaps the final tones.

Read the right values

Auto detects the Spectral palette used by the example, grayscale maps, or falls back to hue selection. Spectral maps RGB colours back to their approximate palette positions; hue mode compares colour angles around the colour wheel. Near-neutral pixels have no reliable hue and are left outside the band. Choose an encoding manually when auto detection is wrong.

A colourized map is not a raw depth file. The palette position is not a distance in metres. Reversed palettes still work with click-to-pick; “start” and “end” do not necessarily mean near and far. Repeated colours or equal depth values will be selected everywhere in the image, not just on one object. For the cleanest tonal editing, use an original, lossless grayscale depth map.

Zoom & pan without changing the image

Scroll over the image to zoom toward the pointer, up to 400%. Use the − / + buttons or the percentage menu for exact steps. 100% places one source-image pixel in one CSS screen pixel; Fit shows the whole image and re-centres it. Fit automatically follows resizing and phone rotation. Zooming is available in Focus, Compare, Depth, D1 and D2, with Advanced either on or off.

Pan: hold Space and drag, drag with the middle mouse button, or switch on the Pan hand tool. On a touch screen, pinch with two fingers to zoom; drag to move the enlarged image. A tap still picks focus when the hand tool is off. The eyedropper temporarily takes priority over Pan for a precise pick. The separate 3D box still rotates the plane; it is not the image zoom control.

Zoom and pan change only the view, not the depth values, plane settings or PNG export. Export always contains the entire image, not the visible crop. The working preview is still capped at 1,500 pixels on its longest side; zoom enlarges that preview and does not regenerate extra detail. Export uses the original input dimensions. Navigation is not stored in a saved look.

Need a depth map?

Recommended as of 4 October 2026: Marigold V2 is the depth model recommended for this workflow. If you just want to try it, there is a public Hugging Face demo.

Privacy warning — treat the public demo as non-private. Any image you upload leaves this editor and is processed by a third-party service outside your control. Do not upload private, confidential, identifying, client, unreleased, or otherwise sensitive images. This project cannot verify or guarantee how a third-party demo retains or uses uploads.

For anything sensitive, run Marigold V2 locally from its official repository. The project currently states that inference needs about 17 GB of GPU memory at 1024² and 29 GB at 2048². Depth estimation is moving quickly, so this recommendation is intentionally date-stamped and may be outdated within weeks or months.

Privacy & precision

Editing in Depth / Focus runs locally in your browser. The app does not upload your images, perform analytics, or send editing data to a server; the external links above are optional and leave this site if you open them. Source transparency is preserved. The browser canvas uses 8-bit channels; 16-bit depth precision, EXR, TIFF, and embedded depth metadata are not supported. The app rejects images above 40 megapixels or 16,384 pixels on either side. These are upper safety cutoffs, not guaranteed device capabilities: browser canvas limits and available memory may be lower, especially on phones. For predictable results, use still images rather than animations.

+ / − · zoom   F / 0 · fit   H · hand tool
Space + drag / middle-button drag · pan
A / B · select focus   P · pick active focus
S (hold) · source
← / → on preview or curve · move active focus
Shift + ← / → · move in larger steps
1 / 2 · select detail   D · toggle selected detail
Ctrl / ⌘ O · open depth
Ctrl / ⌘ Shift O · load selected detail   ? · help   Esc · cancel picker

Inspired by the depth-to-tone focus described at Vathography. This is an independent tool, not an official Vathography app. Spectral colours: ColorBrewer, Cynthia Brewer, Mark Harrower & The Pennsylvania State University. These links are optional; the editor works offline.