Introduction to compositing

The word compositing has a boring textbook definition that in a nutshell means “how the magic happens”. Compositing made it possible for Harry Potter to fly around a Quidditch pitch, for Spider-Man to swing between buildings, and for men to walk on the moon. (Just kidding.) (Or am I?)

By combining elements from different pictures into one, compositing allows photographers to trick you in more ways than you could possibly fathom . It’s used by wedding and school photographers to remove blinking faces in group shots, by newborn photographers to create those baby sleeping with head on hands shots, by landscape photographers to switch a boring blue sky with a moody cloud-filled one.

So how does compositing work? Let’s say I want a photo of me climbing the Eiffel Tower. I take a picture of me pretending to climb something, use Photoshop to cut myself out and paste me onto a picture of the Eiffel Tower and voila, there I am climbing the Eiffel Tower. However without following the rules of good compositing there’s no guarantee it’ll look convincing.

Admittedly compositing TERRIFIES me, not only because it offers unlimited possibilities—the indecisive person’s worst nightmare—but also because there’s a lot to get right for a composite to look real. I’ve done compositing in previous tutorials but in most cases all the components were shot in the same location with the same lighting and camera position so the chances that something wouldn’t fit were low. The stakes are much higher when you’re trying to piece together images from entirely different situations.

How to photograph for a composite

To work through the process of compositing I’m going to use the image I created this week, ‘Dream’s Quest’ as an example. It wasn’t until I finished the piece that I realised it vaguely resembled the painting ‘The Lady of Shalott’.

 

The first thing you need to do when creating a composite is to choose / take the photo that you want all your other elements to match. I have hundreds of photos of locations that I’ve photographed over the years specifically for the purpose of one day compositing a person into because it’s rarely practical to have the costumes, equipment and time needed to create a conceptual image whenever you see a pretty scene. This base photo becomes the one you have the least control over because it’s probably too difficult or costly to go back and shoot it again. So you need to assess this photo so you can make all your other elements match.

Dream's Quest composite base imageFor Dream’s Quest my base image was a photograph of a lovely painterly garden I took in Pitlochry in Scotland. I wanted to ease into compositing with the simple aim of shooting myself separately and making myself fit into the garden scene.

When shooting your composite components you’ll need to consider the following:

  • The location – Where was your base image shot? In a grassy field? In a desert? In water? To make your components fit their new location it helps to shoot them in a similar situation – on grass, on sand, in water. Also, what colour was the original background? If the base image is a green field you might want to shoot your subject on a green background so their skin reflects the right colour. Alternatively, consider shooting your components on a contrasting background (ie pale skin on black, dark skin on white) or using a chroma key style blue or green backdrop to make it easy for you to cut them from the background.

Dream's Quest composite postBecause my base image was an overgrown garden I shot myself sitting in grass in my backyard so the foliage and the colour would match between scenes. Had I not been wearing a green dress, shooting on green would also have made it easy to select myself out of my background by using Select->Color Range, selecting the greens and them adding a layer mask that hides the selection.

  • The lighting – Where is the scene lit from? Is the light hard or soft? What is the colour balance of the light—white 12pm daylight or tungsten 6pm sunset? When shooting/sourcing other elements to composite into your base image you have to ensure this lighting matches in each shot so you’ll need to recreate the lighting using natural or studio lights or attempt to fake the light quality in Photoshop.

My background image was shot on a very overcast day close to dusk so I made sure to also photograph myself on a cloudy day. I noticed the light in my backyard was bluer than my base image so I changed my camera’s white balance to make it warmer although I could also have achieved this in Photoshop. The two birds were photographed on sunnier days and I couldn’t quite get them dark enough in Photoshop to fit my scene so I decided to paint in some motivated light on the right of the image to make their lighting look realistic.

 

  • Perspective / Angle – If your scene is shot front on then all other elements also need to be photographed front on. If I tried to make an overhead shot fit a front on scene the perspective would be wrong and it would look ridiculous.

I don’t know what height I shot my garden image from (which is why it’s handy to use a tape measure when shooting for composites) but I made a fairly safe assumption that it was from eye height. So I set my tripod to eye height to match. Because the boat was the feature of my original image I also guessed that I’d angled the camera down slightly, so I did the same with my tripod. The boat was lower than camera height and was positioned facing slightly towards camera so I sat on the ground and angled my body to match.

  • Dream's Quest composite oarPosing – Be sure to position your person, prop or scene so it will fit your base image. If you’re compositing a prop onto a person make sure they’re posed in a way to accommodate this prop by giving them something of a similar size or shape to hold.

I didn’t have an oar, however I remembered I’d shot one while staying at a friend’s house so I played around with that oar photo to see if I could make it fit. When I posed myself I held a rake as a stand in for the oar so that my hands realistically looked like they were holding something. I also had to be mindful to pose my hands so they’d roughly cover the original hands in the oar photo.

  • Distance – It helps to shoot all your elements from roughly the same distance and with the same lens set at the same focal length to ensure consistent perspective and scale. This isn’t always crucial (although it would be if you shot your scene with a very wide angle lens and your subject with a zoomed telephoto lens because of the distortion and compression the different lenses create) but it will mean that your components are less likely to look ‘off’.

This one scared me a bit because I wasn’t shooting with the same camera or lens. The original scene was shot at 15mm on a cropped frame while I shot myself at 50mm on a full frame. I tried to position myself in the same rough area as the boat so that the area of contact between my body and the new ground would meet (although weeds ended up covering this spot anyway). You can always paint in shadows or place something over the area of contact to stop your person look as if they’re floating. I had some trouble resizing myself accurately which is where replication of distance would’ve come in handy.

  • Focus / Aperture – If you shoot your subject so their eyes are in focus and everything else is blurred
    A bad composite - the girl is out of focus but the suitcase is in focus

    A bad composite – the girl is out of focus but the suitcase is in focus.

    and yet the background is shot so everything is in focus, as soon as you put that blurry person into that sharp background it’s going to look horrible and fake. You also need to ensure that the area you focus on in the second image matches the focal point in your base image.

I shot my original scene at 1/200, f/5.6 so I made sure to shoot myself with the same settings. Because I’d focused on the boat originally I knew that if I sat in the boat then I should shoot myself in focus also. It’s best to shoot all your components as sharp as possible because it’s easy to blur things in Photoshop. Much harder to make something sharp.

  • Image quality – If I shoot my person in RAW with a full frame camera and then composite them into a background photo that’s a low quality JPEG, there’ll be a mismatch in resolution and noise.

I always shoot RAW which avoids these issues but if you’re working with a purchased stock image it might be lower quality. So while it’s not ideal you could always add noise to the RAW image to make the two match.

If you’re worried your composite won’t work you can try doing a test shoot and a rough composite first to see if there’s anything to it. Learn to make peace with the fact that sometimes you’ll need to shoot your components more than once to get them to fit. As frustrating as this may seem it’s all part of the learning process.

How to edit a composite

Once you’ve shot all your elements you’ll need to cut them out so they fit into your scene. Which selection tool you use for this task is personal choice. They’re either wildly inaccurate or time consuming so I personally use either hand painted masks or the pen tool. Obviously the more accurate your masks are, the more convincing your end product will be so don’t take shortcuts here. Also remember to feather your selections a little using the ‘Refine Edge’ or ‘Refine Mask’ commands so your cut out pieces don’t look too sharp.

Dream's Quest close up detailIn Photoshop I placed the girl layer underneath the garden layer and then masked out the garden to see through to the girl below. It didn’t occur to me when I was creating this composite how difficult it was going to be masking through all the flowers, plants and the structure of the boat to see through to the girl so I zoomed in as close as I could get and painted a black mask on my background image using a square brush. Seriously guys, using a square brush for fine masking has CHANGED MY LIFE. Pixels are square so why use a round brush!

Now THE most important thing in making your components match is to assess their saturation, colour and contrast. You don’t want one element too bright or too green because they’re going to stand out so use clipped adjustment layers to get each element to match. For this I use Phlearn’s fantastic ‘Checks’ method which is available as an action when you purchase a Phlearn Pro compositing tutorial and is a handy tool if you’re serious about compositing.

 

When you’ve cut out your subjects and placed them on their new background you need to think about how to make them look like they belong there instead of just slapped on. There are a few ways to do this:

  • Shadows – Giving your subject a shadow will connect them to the ground. Study the other shadows in your base photo and try to replicate them in Photoshop for your subject.

For my image I was lucky that the contact point between myself and the ground was hidden by weeds so I didn’t have do any work here. It was also very soft diffuse light so shadows would be unlikely. However, I did draw some grass in front of the pelican’s feet and the oar to make them fit.

  • Blur – Adding blur to your background image will give some depth to your scene and pull focus to your subject.

I added a little blur to the front left of my image and some to the sky so the busy plants weren’t so distracting.

  • Depth – Adding depth to your photo so it has a foreground, middle ground and background helps pull everything together. Composite something from the scene in front of your subject. Maybe part of a tree or plant can cross over their body. Adding mountains into the background gives dimension and draws the eye through the scene.

My scene already had its own depth with the path and the hedge but as mentioned above I did use weeds and grass from the background to cover parts of my subjects.

When you’re done there’s a couple of other tricks that will help sell your composite. First, add a little of the same colour to your entire image to tie the pieces together. I like to add a Selective Colour adjustment layer to the top of the layer stack and play around with the colours. Also try adding a small amount of overall noise with a noise filter or a texture as discussed previously to give your components a common element.

So yes, compositing is one scary beast! But after dipping my toe into the waters this week I discovered that it’s not nearly as frightening or exact as I thought it would be. And considering compositing makes ANYTHING possible then it’s surely worth the work to get it right.