Sub topic 17
Recording the setup as an action
The frequency separation setup takes the same dozen steps on every portrait. This chapter shows how to record those steps as a Photoshop action, so one click builds the layer stack and you only make the choices that vary from image to image.
This chapter assumes you have already built the separation by hand. You should know the layer stack, the Apply Image settings for your bit depth, and how to check that the layers recombine to the original. An action only replays what you recorded. If a step is wrong in your manual workflow, it will be wrong every time the action runs.
What an action can and cannot do
An action is a recorded list of commands in the Actions panel (Window > Actions). When you play it, Photoshop repeats each command in order.
Most of the setup records well. A few parts need care.
| Part of the setup | Records well? | Note |
|---|---|---|
| Duplicate Layer, rename, group | Yes | Layers are referenced by name, so names matter. |
| Gaussian Blur | Yes, with a dialog toggle | The radius is stored, but the radius should vary per image. |
| Apply Image | Yes | Values are stored as recorded. They are correct for one bit depth only. |
| Setting a blend mode | Yes | Record it after choosing it in the Layers panel. |
| Curves adjustment layers with black masks | Yes | Record the curve at a small, fixed amount. |
| Brush strokes | No | Painting is not reliably recorded. Paint after the action ends. |
| Brush Flow and Opacity | Not reliably | Set these yourself or save a tool preset. |
The structure of the action
Plan the action before you record it. The flow below shows where the action runs on its own and where it stops for you.
Recording the 8-bit action
Open a portrait in 8-bit RGB mode. Make sure the layer you want to separate (the Background or a merged copy) is selected.
- In the Actions panel, click Create new action. Name it
FS 8-bit. Optionally assign a function key. Click Record. - Choose Layer > Duplicate Layer, name it
Low, and click OK. - Choose Layer > Duplicate Layer again from the original, name it
High, and click OK. - Click the
Lowlayer. Run Filter > Blur > Gaussian Blur with a typical radius for your files, then click OK. - Click the
Highlayer. Run Image > Apply Image with the 8-bit settings: LayerLow, Channel RGB, Blending Subtract, Opacity 100%, Scale 2, Offset 128, Invert off. - Set the
Highlayer blend mode to Linear Light. - Select both layers and group them (Layer > Group Layers). Rename the group
Frequency Separation. - Click Stop in the Actions panel footer to end recording.
The order of the layers in the stack matters. High must sit above Low, as in the layer stack from earlier chapters. If your duplicates land in the wrong order, drag them into place during recording so the move is captured.
Do not retouch anything during recording. Every click is recorded, and a stray click becomes part of every future run.
Letting the blur radius vary
The recorded Gaussian Blur uses one fixed radius. Earlier you chose the radius based on image resolution and the detail being separated, so a single value is wrong for many files.
To fix this, turn on the dialog toggle for that step. In the Actions panel, expand the action and find the Gaussian Blur row. Click the empty box to the left of the step name. A small dialog icon appears. When the action reaches this step, it opens the Gaussian Blur dialog with the recorded radius and waits for you to change it and click OK.
Do not turn on the toggle for Apply Image. Its settings should stay fixed. The toggle for the blur step is the only place where your judgment is needed.
The radius you pick must be the same one you would pick manually. A radius that is too small leaves color in the High layer. A radius that is too large moves texture into Low. Both make retouching harder, so use the preview and the same checks as before.
One action per bit depth
The Apply Image values differ for 8-bit and 16-bit files. An action stores one set, so it can only be right for one mode. If you play the 8-bit action on a 16-bit file, the High layer comes out wrong and the layers will not recombine to the original.
The reliable approach is two actions:
Actions panel
Portrait Retouching (set)
FS 8-bit Apply Image: Subtract, Scale 2, Offset 128, Invert off
FS 16-bit Apply Image: Add, Scale 2, Offset 0, Invert onRecord FS 16-bit the same way as the first action, but start with a 16-bit document and use the 16-bit settings. Keep both actions in one action set so they travel together. Name them so the bit depth is obvious.
Add a safeguard. Right after you start recording each action, choose Insert Stop from the Actions panel menu and type a message such as "Check: this action is for 8-bit documents (Image > Mode)." Tick Allow Continue so you can proceed when the mode is correct. The stop costs one click and prevents a wrong-mode run.
Adding a stop for verification
Verification is the step you should not automate away. Insert a stop at the end of the action with a message such as "Hide Low, then check that High alone looks gray. Toggle the group to compare with the original."
To add it, select the last step in the action, open the Actions panel menu, choose Insert Stop, and write the message. Tick Allow Continue only if the rest of the action has more steps to run.
Recording the dodge and burn setup
You can record the dodge and burn group in a separate action. Create Dodge & Burn, then record these steps:
- Create a group named
Dodge & Burn. - Add a Curves adjustment layer. Raise the curve slightly, name it
Dodge, and fill its mask with black. - Add a second Curves adjustment layer. Lower the curve slightly, name it
Burn, and fill its mask with black. - Stop.
Fill each mask with black by selecting the mask and choosing Edit > Fill with Black, so the recorded step does not depend on which colors are currently in your toolbox. After the action ends, choose a soft round brush, set Flow to about 5-10% and Opacity to 100%, and paint with white on the mask you need. The painting itself is never part of the action.
Pitfalls when playing actions back
- Layer names are the weak point. The action looks for layers called
LowandHigh. If the document already has layers with those names, playback may select the wrong one. Start from a clean file or rename old layers first. - Run it on the right layer. Select the layer you want to separate before you press Play. The action duplicates whatever is active.
- Do not edit mid-playback. Clicking in the document while an action runs can interrupt it or change its result.
- Test every new action. After recording, play it on a fresh file and run your verification check. Do not trust it on client work until the layers recombine to the original.
- Update after changes. If you change your preferred radius range or settings, re-record or edit the action. Double-click a step in the Actions panel to change its recorded values.
Exercise
You play your FS 8-bit action on a 16-bit portrait. What goes wrong, and how do you prevent it in future?
Show answer
The Apply Image step uses the 8-bit values (Subtract, Offset 128, Invert off), so the High layer is not the true difference between the original and Low. The layers will not recombine to the original and tonal shifts appear. Prevent it by keeping a separate FS 16-bit action (Add, Scale 2, Offset 0, Invert on) and by inserting a stop at the start of each action that reminds you to check Image > Mode.
Exercise
Why should the Gaussian Blur step have its dialog toggle turned on, while the Apply Image step should not?
Show answer
The blur radius depends on the image resolution and the detail you want in each layer, so you need to choose it for every photo. The Apply Image settings are fixed for a given bit depth and should not change between photos, so they can run without a dialog.