Recently I was inspired by mosaic artwork to create a digital mosaic from a portrait image. See Pixel Portrait by me.
The method I used was time consuming and a bit laborious so I thought I’d share a simple and faster method that, although it has its limitations, creates acceptable results.
Important Notes
This tutorial will be using a Photoshop filter from the Stylize category called: Tiles. This filter tries to replicate the look of a mosaic of square tiles; with the varied placement and tile spacing.
For ‘Pixel Portrait’ I wanted a uniform grid of tiles with control over the tile spacing so I didn’t use the Tiles filter. But after experimenting with the filter later I found that if the Offset percent variable is about 4 or lower, the filter produces a uniform grid. This limits the size of the tile spacing which is the limitation mentioned earlier.
If you want crisp vector-like tiles in your finished artwork you should avoid resampling the image as this introduces anti-aliasing which softens the edges; spoiling the clean effect. I suggest deciding the final image size and resampling your image, before you start the transformations.
Preparing The Image
1. Adjust the contrast and brightness if necessary:
Image>Adjust>Brightness/Contrast
Mosaic Filter
To replicate the plain tile look of a mosaic we need to convert our continuous tone image to blocks of solid colour/tone.
2. Filter>Pixelate>Mosaic
Adjust the cell size until the squares are the size you like. Make the number an even number, e.g. 20. This is important for the next step.
Calculating Squares
We need to calculate how many squares we have horizontally across the image.
3. Image>Image Size
Check the Pixel Dimensions section at the top and note the width in pixels. Eg. 840.
4. Divide the width in pixels by the cell size used in the Mosaic filter options. E.g. 840 image pixel width by 20 mosaic filter cell size = 42.
42 is the amount of squares horizontally across the image.
Foreground Colour
Before we apply the Tiles filter to create our mosaic we need to change the Photoshop foreground colour to a colour e.g. bright green for a black & white photo or a tone e.g. 50% grey for a colour photo.
This will allow us to select the ‘grout’ between our tiles and put it on a separate layer for later colour selection. E.g. if the ‘grout’ is black or white and the tiles range from black to white we will have difficulty in separating the grout from the tiles and thus, selecting it for whatever reason.
5. Click on a relevant colour in the Swatches palette.
This will change the foreground colour to that colour.
Tiles Filter
6. Filter>Stylize>Tiles
Number of tiles: 42
Maximum offset: 1 to 4 % (5 and above adds randomness)
Fill empty area with: Foreground colour
What we are trying to achieve is: the Tile filter matching the blocks we created with the Mosaic filter, so all the ‘tiles’ are one block with no part blocks showing through. That is why it is important to calculate the number of tiles across the image.
You should now have your mosaic image with colour/tone ‘grout’.
Separating The Grout
We need to separate the ‘grout’ from the tiles.
7. If the Background layer is locked:
Double click the layer.
Click OK.
This changes the Background layer to Layer 0 and unlocks it.
We need to select the ‘grout’.
8. Magic Wand tool: tolerance 1.
This will make the Magic Wand select only 1 colour.
Select the ‘grout’.
We need to hide the ‘grout’.
9. Select>Inverse (Ctrl+Shift+i)
Click Add Layer Mask at the bottom of the Layers palette.
This hides the ‘grout’ and leaves the resulting area transparent.
We need to create the separate ‘grout’ layer.
10. Click ‘create a new layer’ icon at the bottom of the Layers palette.
Double click the Layer name and call it: Grout.
Click a suitable ‘grout’ colour/tone on the Swatches palette.
This changes the foreground colour.
Press Alt+Delete to fill the layer with the foreground colour (or Ctrl+Delete for the background colour).
Drag the Grout layer below the Mosaic layer.
You should now have the Grout layer showing through the masked area of the Mosaic layer and the basic image completed.
Converting Colours/Tones
To convert a black & white image to a one hue image:
Image>Adjustments>Hue/Saturation (Ctrl+U)
Check the Colourize box.
This converts the image to a colour but only in the one selected hue, e.g. shades of blue.
Adjusting the Hue slider lets you choose a particular hue.
The Saturation slider controls intensity of colour and the Lightness controls brightness.
To convert a colour image to a black & white image:
Image>Adjustments>Desaturate (Ctrl+Shift+U)
This is a basic form of conversion but suitable for this project.