Image manipulation

When people hear the phrase "Photoshop" they might be thinking about the program itself, but in broader society the phrase has almost become a verb, as in when an image is "shopped". This can refer to many kinds of image manipulation, from something as simple as removing a few scratches from an old photo, to more drastic changes such as adding a second story to a house, or even to more surreal images that delve into science fiction and fantasy.

This section will deal almost exclusively with raster images. Techniques for vector tools are more heavily covered by the logos and simplified images section.

There are many approaches to combining multiple elements into one image but they will share many similarities. On this page we'll be making use of masked elements and layers to combine what we want. The general idea behind a complex element insertion will be this;

  1. Isolate element to be inserted from its own source.
  2. Make a clean plate of the target image.
  3. Position, scale, rotate inserted element as needed.
  4. Adjust inserted element masks.
  5. Adjust inserted element color.

Throughout all this the main concept that should always be in the back of your mind is that of non-destructive editing! When step one mentions isolating the element to be inserted this does NOT mean deleting the image around it but using masks instead. The same will go for even the target element. Always remember that.

Isolating elements

An image element within this reading will be a selectable object that is distinctly different than other objects such as on a unique layer or shape that can be separated from other shapes.

Even in projects where you are not adding or removing anything you will still often need to isolate an image from the background. For instance if you want to move two people in a photo closer together, you'll need to isolate them so that they can move over the background between them without distorting it.

Remember also everything that was said previously about the importance of non-destructive editing. While unavoidable in some cases it's extremely rare that you'll ever want to just select an area and hit "delete" to remove it.

For our purposes the ways in which you would extract or isolate an element from the pixels around it are the same as the techniques discussed in the layers & masks section. So for a more in-depth discussion of that process see the following links.

Layers & Masks

Layers & Masks (using Adobe Photoshop)

Tips for isolating images (using Adobe Photoshop)

Matching Element Qualities

Regardless of whether or not you are just placing a single object to appear within a background or "merging" two elements together to appear as a continuous object it will be important to make sure that all elements have similar properties.

These elements can fall into two specific groups.

  • Perspective
  • Light direction / quality

It's extremely important to spend time acquiring source elements that fit each other well because with good source elements the majority of your work is already done.

Inserting Single Elements

Merging two images should obviously be more difficult than seperating them. If you're simply adding a logo on top of an image without any interaction then you've no problem. But for any objects that are suppsoed to appear as if they are *within* an actual space many factors to take into account to be believable.

Let's start with a simple premise. I want a peanut butter cup the size of a dog. I can't have one in real life YET. so I'm just going to Photoshop one to satiate my peanut butter cup fantasies.

After gathering some options of my candy from various angles I start to throw them into the scene to look at my options. Below is option one...

Option 1

So good! But wait. This doesn't look right.

In this case the perspective of the inserted element is not correct.

Now remember that we want similar properties between the inserted object and the background plate. Right away you can probably see problems with the way this first option looks. Forget about whether or not the light matches for now, the perspective of the element is all wrong.

What do we mean by that? Examine the edges of the handicap zone markings and the edge sidewalk. These form lines that move in a particular direction. If you were to imagine a square around the base of the candy then the lines that make it up should go in the same direction as the existing lines on the ground. They do not.

So while this first option might work ok if we were putting the candy further in the back, near the car for instance, it doesn't match the perspective of its current location at all.

Let's try a different angle for our candy. One where we can see more of the top surface that might better fit the angle of the background photo itself.

Option 2

Option 2 works much better as far as the perspective of the images are concerned. But it's still not a good fit for us. Why?

Look closely at the light of the background image. Particularly of the shadow being cast by the car. See how it is being cast in teh same direction as the parking lines on the ground? This tells us that any and all shadows (from that same light source) should follow suit. Shadows cast by objects near the camera should fall in the same direction as the aforementioned blue handicap lines. But if you examine teh light within the candy image itself you see that the shadow indicates a light source that is very much to the right of the candy.

And so while the perspective might be better, the lighting of the inserted element does NOT match the lighting of the background image. Let's try one more option.

Option 3

Much better! Now not only does the perspective of the object match the perspective of the background but the lighting does as well. In this case it was not a difficult goal to achieve because both the inserted object and the background pictures were taken specifically for this page but it still illustrates how effective getting a good starting element can be. We haven't even done anything beyond simply masking the element and our work is half done.

It should be obvious there is still work to be done. Everything else in the scene is casting a shadow as we've already observed. So should our candy.

Below is an image of the actual shadow layer. This shadow was simply painted using the brush tools.

Specifically the "falloff" of the shadow where it recedes from the darkest part (near the base of the candy) to the lightest part was achieved via a large brush with the "hardness" set to "0".

Shadow layer

So now when you put them all together...

And there we have it. Dog-sized peanut butter cup!

You might also notice that a slight reflection was added to the top of the candy where the chocolate had begun to melt in the daylight. Since the paper wrapper had such a clear reflection it made sense that you might be able to see a reflection of the tree branches above. Adding it was a simple matter of selecting the visible sky in the surface and using it to create a mask for a duplicated section of the image.

Such small details are fairly invaluable to "selling" an image like this.