Retouching
No fusion method gets every pixel right. A halo beside an antenna, a smeared patch where a leg moved, a spot where the wrong frame won: these are easier to fix by hand than by fusing again. FocusForge’s editor lets you do that with a brush that paints pixels from one of your own frames into the composite.
You are not painting colour. Every stroke takes the pixels of one source (a source frame or an earlier result, whichever you choose in the list) and blends them into the composite where you brush. Painting from a frame in which that area is sharp puts that sharpness back.
A retouch never destroys the fused result. Strokes are kept as a list of edits on top of it: you can undo them one by one, keep them as a checkpoint, and go back to the untouched result at any time (see Checkpoints and saving).
The window in editor mode: the brush in the toolbar, the results and source frames in the dock.
Switch to the editor
The switch at the top of the dock has two halves, STACKING and EDITOR. Click EDITOR to retouch the checkpoint selected in CHECKPOINTS, and STACKING to go back to the frame list and the fusion settings.
When a fuse finishes and its result is kept (if FocusForge asks “Keep this fused result?”, by clicking Keep), the window switches to the editor by itself, as long as you are still looking at that tab. A saved project you open starts in STACKING; click EDITOR to retouch it.
In the editor the window changes in three places:
- The toolbar shows the function bar instead of Fuse stack: the Brush and Pipette chips at the left, Undo, Redo and Save checkpoint at the right.
- The dock’s list stops being the place where you arrange frames. It has no Images and Settings tabs. A Results group lists your earlier results above the frames (see Paint from an earlier result); under the heading with the number of frames (for example “8 frames”) every row shows the frame’s colour and its number. Rows cannot be excluded, removed or dragged here.
- The Composite pane becomes paintable.
EDITOR is greyed out, and cannot be selected, when there is nothing to retouch:
- the tab has no fused result yet;
- a fuse is running or waiting in the queue for this tab;
- the frame list no longer matches the frames the result was fused from, because you added, removed, excluded or reordered a frame since. Fuse again (see Fuse the stack) and the editor is available for the new result.
Switching to STACKING and back keeps your brush settings and any strokes you have not saved yet.
Choose the frame to paint from
The brush paints from the selected source: a frame, or an earlier result (see Paint from an earlier result). The Frame pane on the left shows it, with its file name in the pane’s label, so you can see exactly what the brush will put down.
The source list in the editor: the Results group above the frames. The selected frame (here 01.tif, number 2) is outlined; its colour bar matches its colour in the overlay.
There are four ways to choose it:
- Click a row in the dock’s list.
- Ctrl + mouse wheel over the panes, or the arrow keys, step to the next or previous row: first through the results, then through the frames.
- Pipette: click Pipette in the toolbar, then click a point in either pane. The frame the composite took at that point becomes the source, and the pipette turns itself off. The click paints nothing. The chevron beside Pipette opens a short reminder of the gesture.
- Alt + click on a point does the same as the pipette without arming it first. It works in STACKING mode too.
While the pipette is armed, or while you hold Alt, the cursor shows the colour of the frame under the pointer, so you can see which frame a click will pick before you click.
Tip: The pipette answers “which frame did FocusForge use here?”. To repair an area, you usually want the opposite: a frame in which it is sharp. Pick the frame next to the problem with the pipette, then step through its neighbours with Ctrl + wheel and watch the Frame pane.
How the rows look (a compact list, small previews or large previews) is set by Presentation on the settings window’s Appearance page.
Paint from an earlier result
Besides the frames, the brush can paint from a result you already have, for example to bring back an area from a fuse made with another fusion method, or from an earlier retouch.
The Results group, above the frames in the dock, lists the project’s checkpoints that line up pixel for pixel with the one you are editing. Each row shows the method, the time and, for a retouched checkpoint, “· N strokes” (for example “· 3 strokes”). Click a row to make it the brush source; clicking there changes only the source, not the checkpoint you are editing. The left pane then reads “Checkpoint · “ followed by the method and time, the brush ring turns white and gets a small layers symbol, and the strokes you paint take their pixels from that result.
Paint once the result on the left looks sharp: a stroke you start while it is still soft, or while the pane is empty, paints nothing (see Look at an earlier result).
A row can carry a small label:
| Label | Meaning |
|---|---|
| BASE | The checkpoint you are editing. Painting from it takes an area back to how it was before your strokes. |
| FUSION | The fuse the checkpoint you are editing was made from, when that is another row. |
| UNSAVED | A result that is in the window but not in the project file yet. |
Under the rows, a line such as “2 hidden: different alignment” counts the checkpoints that cannot be used and says why. A result is hidden when it was made from different source frames (“different source frames”), aligned differently (“different alignment”), cropped differently (“different crop”) or has another size (“different dimensions”): its pixels would not line up with the ones you are editing.
Good to know:
- Strokes you have not saved as a checkpoint are never offered as a source. Click Save checkpoint first; the new checkpoint then appears in the list.
- The overlay and the pipette still name frames.
- Alt + click on a point painted from a result picks that result as the source again.
- Deleting a checkpoint that strokes are painted from does not change those strokes; see Delete a checkpoint.
See which frame each area came from
The bottom bar’s Overlay switch colours the Composite pane by the frame each area came from, read from the result’s Z-Map. Each frame has its own colour, the same colour as its bar or square in the dock’s list. The slider beside the switch sets how strongly the colours cover the image (65 % when you first turn it on).
The overlay is off when the window starts and is greyed out until the tab has a result. It works in both modes, and it always shows the current state: an area you painted from frame 3 turns frame 3’s colour.
Use it as a map before you paint. A halo or a smeared patch often shows up as an island of a different colour, and the colours around it tell you which frames hold that area sharp. If a project’s Z-Map cannot be read, the overlay and the pipette are unavailable; the image itself is not affected.
Set the brush
The Brush chip in the toolbar shows a dot as big as the brush, the word “Brush” and the blend mode in use (“Normal” at first). Click its chevron, or the chip itself while the brush is the tool in use, to open the brush’s settings under it. They stay open while you drag a slider or click a mode, and close when you press Esc, click the chevron again or click anywhere outside the bar. The click that closes them does nothing else: it paints no stroke.
The Brush settings with their starting values.
| Setting | What it sets | Range | Starts at |
|---|---|---|---|
| Size | The brush’s diameter, in pixels of the image (not of the screen). The slider is logarithmic, so small sizes are easy to set precisely. | 1 to the shorter side of the result | 64 |
| Softness | How much of the brush’s edge fades out. | 0 % to 100 % | 30 % |
| Opacity | How strongly a stroke covers the result, in every mode. | 1 % to 100 % | 100 % |
| Mode | How the stroke blends, see Blend modes. | Normal, Lighten, Darken, Detail | Normal |
| Preview | Shows the source inside the brush circle, see Preview before you paint. | on / off | off |
Your size, softness, opacity, mode and the Preview switch are remembered when you quit.
The toolbar after one stroke: Undo and Save checkpoint are now available.
Softness decides how a stroke blends in. The inner part of the brush paints the source fully; from there to the outer edge it fades out evenly to nothing. Softness is the share of the radius that fades: at 0 % the brush has a hard edge, at 30 % the outer 30 % of the radius fades, at 100 % the fade starts at the centre.
The brush cursor draws both parts: a solid circle for the part that paints fully, and a dashed ring for the outer edge of the fade. A hard brush (0 %) shows only the solid circle. Because Size is in image pixels, the cursor grows and shrinks with the zoom. A small letter on the cursor names the mode: N for Normal, L for Lighten, D for Darken and T for Detail.
Tip: Keep Softness at 30 % or more for most repairs. A soft edge hides the seam between the painted area and the composite around it; a hard brush leaves a visible outline unless both frames match exactly there.
Shift + mouse wheel over the image changes Size without opening the settings. The keys and wheel gestures can be changed on the settings window’s Input map page.
Blend modes
Choose the mode in the settings or press its key while the editor has focus.
| Mode | Key | What a stroke does |
|---|---|---|
| Normal | 1 | Paints the source over the result. |
| Lighten | 2 | Changes a pixel only where the source is brighter than the result there. |
| Darken | 3 | Changes a pixel only where the source is darker than the result there. |
| Detail | 4 | Keeps the result’s own brightness and takes only the source’s fine detail. |
Lighten and Darken compare brightness over all colours together, so they never shift a colour: use Lighten to bring back a bright edge, or Darken to remove a bright halo, without touching the rest of the brushed area. Detail is for sharpness: it moves detail from a frame in which an area is sharp without carrying over that frame’s brightness, so the patch shows no blotch from a different exposure or vignetting.
Opacity lowers the strength of a stroke in every mode: at 50 % the result shows through half. A stroke keeps the mode and opacity it started with, even if you change them before you release the button.
Preview before you paint
With Preview on, the inside of the brush circle on the Composite shows the selected source at about 80 % over the result, so you see what the stroke would put down before you paint it. The circle on the Frame pane follows the pointer too and drives the same preview. The preview is hidden outside the image and while the pipette is armed. The p key switches it on and off, and the setting is the same for every project tab.
Paint a stroke
- Choose the source frame.
- Set Size, Softness, Opacity and the mode.
- Drag across the Composite pane over the area to repair. A single click paints one round dab.
A short stroke painted from 01.tif with the overlay on: the painted band turns that frame’s yellow. The cursor shows at the same point in both panes.
Some things to know while painting:
- You can paint in either pane. Both show the same part of the image, so a stroke on the Frame pane paints exactly where it would on the Composite pane. The cursor is echoed in the other pane at the same point, which makes it easy to aim at a detail you can only see in the source frame.
- A stroke keeps the source, size, softness, mode and opacity it started with, even if you change them before releasing the button.
- Panning (middle-button drag, or Space + left drag) and zooming (mouse wheel) work as usual and do not paint; see The window.
- Dragging in STACKING mode paints nothing.
Undo and redo
| Action | Toolbar | Keys |
|---|---|---|
| Undo the last stroke | Undo | Ctrl+Z |
| Redo the stroke you undid | Redo | Ctrl+Shift+Z |
Each tab keeps its own stroke history. Undo steps back one stroke at a time; Redo puts back what you undid, in order. A new stroke after an undo discards everything Redo was holding, so redo first if you want it back.
Both buttons are greyed out when there is nothing to undo or redo. The keys work in editor mode only; you can change them on the settings window’s Input map page.
Keep your strokes: Save checkpoint
Save checkpoint, at the right end of the toolbar, keeps every stroke you have made as a new checkpoint at the top of the CHECKPOINTS list; the new row flashes briefly. The button is available as soon as there is at least one stroke that is not in a checkpoint yet.
After saving, Undo and Redo are greyed out: those strokes now belong to the checkpoint. To take them back, click the checkpoint you started from in the CHECKPOINTS list.
A new checkpoint is held in the tab until you save the project. Strokes you have not saved as a checkpoint are not dropped silently: fusing again, choosing another checkpoint, closing the tab or quitting each ask first. Both are explained in Checkpoints and saving.
Example: fix a halo
A halo is a pale or smeared fringe on the background right next to a sharp edge (see Halos at depth edges). The repair is to paint the strip beside the edge from a frame in which the background there is clean.
- Keep the fused result. The window switches to the editor. Zoom in on the edge with the mouse wheel until you see the fringe clearly; judge it at 100 %.
- Turn Overlay on. The fringe usually sits in a band of one colour along the edge: the frame focused on the foreground, whose blur spread over the background.
- Find a better frame. Click a few rows, or use Ctrl + wheel, and watch the Frame pane: you want the frame in which the background beside the edge is clean and free of the foreground’s blur. It is usually a frame focused behind the subject.
- Set Size a little wider than the fringe and Softness to 30–50 %.
- Paint along the edge, on the background side, keeping the dashed ring off the sharp subject. With the overlay on, the painted band takes the new frame’s colour, so you can see exactly what you covered.
- Painted over the subject? Press Ctrl+Z and paint again.
- Turn Overlay off and look at the result at 100 %. When it is right, click Save checkpoint, then save the project (Ctrl+S) or export an image.
Note: Retouching can only paint from frames you have. If no frame holds an area sharp, the brush cannot create that detail; see Focus gaps.
On a RAW project the result holds unclipped 32-bit float samples: a live stroke blends in 32-bit float, and the canvas, the saved view and every export clip the result once, to 16 bits.
From the command line
focusforge-cli retouch applies strokes without the window. It takes an op
list, a JSON array of brush strokes, and appends each op to the project as a
new checkpoint, each the previous one’s child:
focusforge-cli retouch path/to/frames/frames.ffp --ops ops.json
[
{"brush-stroke": {"source": {"frame": 2}, "path": [{"x": 10, "y": 10}, {"x": 40, "y": 12}], "radius": 8.0, "softness": 0.3, "mode": "normal", "opacity": 1.0}}
]
sourceis{"frame": n}, the 0-based frame index to paint from (the window’s frame number minus one), or{"checkpoint": "<id prefix>"}, which paints from that checkpoint’s result. A checkpoint must line up with the one you edit, as in Paint from an earlier result."source_id": nis still read as frame n.pathis a list of{x, y}points in image pixel coordinates.radiusis half the stroke’s width in pixels (the window’s Size is the diameter).softnessis in[0, 1]: the stroke is fully opaque withinradius * (1 - softness)and fades linearly to nothing atradius.modeisnormal,lighten,darkenordetail, as in Blend modes; it defaults tonormal.opacityis above 0 and at most 1; it defaults to 1.
Every op is checked before anything is written; an invalid one is refused by
its 0-based position. The ops go on the project’s current head, or on another
checkpoint with --from <id>, which starts a branch; --name <text> names
the last one. To see the result, export it:
focusforge-cli history list path/to/frames/frames.ffp
focusforge-cli export path/to/frames/frames.ffp --checkpoint <checkpoint-id> -o retouched.tif
Every flag is in the command-line reference.