HDR Exposure Stacking with Layer Masks in GIMP
Simulating high-dynamic-range (HDR) exposure stacking using manual layer masks in GIMP allows you to blend bracketed exposures for a natural, high-contrast result without the haloing artifacts common to automated HDR tone-mapping tools. By combining a normal exposure with underexposed (highlight-rich) and overexposed (shadow-rich) shots, you can manually paint or generate precise mask selections to reveal optimal detail across the entire tonal spectrum.
Step 1: Import and Align the Bracketed Exposures
- Open GIMP and navigate to File > Open as Layers.
- Select your bracketed images (typically three shots: underexposed, properly exposed, and overexposed).
- If the photos were captured handheld, align them by selecting the
layers and using Tools > Transform Tools > Align,
or use an external tool like Hugin’s
align_image_stackbefore importing.
Step 2: Organize the Layer Stack
Arrange your layers from bottom to top to make blending straightforward:
- Bottom Layer: Normal (base) exposure.
- Middle Layer: Underexposed shot (contains sky and highlight details).
- Top Layer: Overexposed shot (contains shadow and dark-area details).
Step 3: Blend the Highlights
- Hide the top (shadow) layer so you are working exclusively with the normal base and the middle underexposed layer.
- Right-click the middle layer and select Add Layer Mask.
- Choose Black (full transparency). The underexposed layer will disappear, revealing the normal base.
- Select the Paintbrush Tool (
P), choose a large, soft-edged brush with low opacity (around 20% to 30%), and set the foreground color to White. - Paint over the blown-out areas (such as bright skies or direct light sources) to gradually reveal the highlight details from the underexposed layer.
Step 4: Blend the Shadows
- Make the top (overexposed) layer visible again.
- Right-click the top layer and select Add Layer Mask.
- Choose Black (full transparency) to hide the bright exposure.
- With the Paintbrush Tool set to White and low opacity, paint over the overly dark, crushed shadow regions (such as dark foliage or interior corners) to reveal the lifted shadow detail.
Step 5: Advanced Blending Using Luminosity Masks (Optional)
For pixel-perfect transitions along complex edges like tree branches or architecture:
- Go to the Channels tab.
- Right-click the Value channel and select Channel to Selection.
- Return to the Layers tab, select the layer mask on your highlight layer, and choose Add Layer Mask > Selection.
- Use Colors > Levels directly on the layer mask to increase contrast, ensuring only the brightest highlights are visible. Invert the selection if applying to the shadow layer.
Step 6: Final Refinement
- Adjust the opacity of each layer independently to achieve a natural balance between the exposures.
- Right-click the top layer and select New from Visible to create a merged composite layer at the top.
- Apply final global color balance, contrast, and sharpening to the merged layer using Colors > Curves.