Martin Evening shows you how to fill selections with Content-Aware Fill and how to tame the results
The Content-Aware Fill feature can be used to fill selected areas by cleverly blending with the surrounding textures. It does this by analysing the colours and textures outside the current selected area, and randomly fills the selection. At the same time it creates a Healing brush-type blend around the selection edges so that the filled area merges seamlessly with its surroundings.
Content-Aware Fill has been a core component of Photoshop’s image processing for many years and used in tools such as the Spot Healing Brush and Patch tool. It is also available as a finishing option when applying a rotated Crop, or when creating a Photomerge panorama, so that it automatically fills the transparent edge pixels. In these situations you can use a Content-Aware Fill to fill in the blank areas and extend the boundary. This in turn gives you more flexibility when cropping such images. The new Content-Aware Fill feature, however, provides you with a complete workspace and is useful for filling areas that are too large to repair using other tools, or where there isn’t a clear area to sample from if using the Patch tool. As a ‘straight fill’ command, a Content-Aware Fill can produce great results, but the new, modal Content-Aware Fill feature for Photoshop CC now provides even greater flexibility with which to fine-tune the content-aware settings and edit the sample area. For example, you can skilfully control which areas to sample textures from and further adjust the settings that control how the sampled textures fill the selected area.
To use, go to the Edit menu and choose Content-Aware Fill. This opens an Options bar, a Tools panel, a live preview window showing the Content-Aware Fill outcome, and a Content-Aware Fill panel. The green shaded area in the preview represents the area the Content-Aware Fill will analyse and sample from. The Tools panel Sampling Brush tool (B) can be used to paint over the working image preview to remove from the sample area.
As you do this, you will notice Photoshop update the Content-Aware Fill preview. Hold down the Option key (Mac), Alt key (PC) to temporarily switch the Sampling Brush tool from the Erase mode to the Add mode. Should you need to, the Lasso and Polygonal Lasso tools (L) can be used to refine the original selection area. You can click and drag to add to the selection, or hold down the Option key (Mac) or Alt key (PC) to subtract and make use of the buttons in the Lasso tool mode Options bar to modify the selection edit behaviour. In the Content-Aware Fill panel Sampling Options section you can adjust the opacity of the shaded area, or change the colour if necessary. By default, the shaded area indicates the Sampling area, but you can set this to indicate the Excluded areas instead. The Fill settings section can then be used to adjust the sampling adaptation method. The Color Adaptation settings allow the colour and contrast to adapt, which can be critical if blending on top of smooth tone areas, such as when removing clouds from a clear blue sky. The Rotation Adaptation determines how much the Content-Aware Fill can flexibly rotate the sampled pixels to create a better match. With higher Rotation Adaptation settings, the Content-Aware Fill will be more randomly rotated. With the Venice scene, I needed to set this to ‘None’, so that the lines of the windows were kept more rigid. Then, under the Output settings you can choose to output to a Duplicate layer, the current layer, or to a new layer, that contains just the Content- Aware Filled pixels.
New Content-Aware Fill Controls
The following steps show how I was able to quickly and simply remove the distracting poster that was hanging outside this museum in Venice. By using the new Content-Aware Fill mode in Photoshop I was able to remove the poster completely and full from the surrounding areas for a clean end result.
Make a selection
Select the Rectangular Marquee tool (M) and create a simple selection of the poster. Go to Edit > Content-Aware Fill. Here, you can see the selected area in the document window surrounded by a green overlay that represents the area the Content-Aware Fill was sampling from to fill in the selection.
Fill Preview panel
This screen shot shows the Content-Aware Fill panel controls alongside the Content-Aware Fill Preview panel. The initial fill using the default settings was not too bad, but the window detail in the selection area was somewhat distorted. This could be improved by editing the Fill Settings and the sample area.
To refine the sample area select the Sampling Brush tool (B) from the Content-Aware Fill Tools panel and paint over the green overlay to delete from the sampled area. Leave the Color Adaptation and Rotation Adaptation settings as they are, but experiment with the Enable the Scale option to see what gives the best result.
In the Content-Aware Fill panel Output Settings section, set the Output to New Layer and click OK. This will apply the Content-Aware Fill to the selected area, which will be output to a separate new layer in the Layers panel, preserving the original image on the Background layer.