How to.....

Displacement Maps

13/08/2016
Displacement Maps


In the process of blending two images, It might be that you want to wrap image two around an object that is part of image one. An example might be a tattoo.
I shall now be a little contentious so bear with my little rant ! I need to "come out " .NO not not like that: I hate tattoos! I mean really, woman is one of Gods greatest creations, why would we want to mutilate that beauty with a tattoo. But perversely some Judges seem to love tattoos so you may want to disfigure a model with one in photoshop. Whilst I will never do that myself, I will show you how.
Once we have the basic technique, you can apply it other situations.
There is currently an advert running at some Cinemas in maybe Brasil or somewhere and some youth has the tattoo of a gun on his hands. I will try to replicate that.
This issue this presents is that while the base image is in 2D it has a 3D appearance. In other words the hands we use have contours albeit really a 2D image. When we apply image two over the top however, as you might expect, the gun looks flat on top of the hands and does not follow the contours of the hands.
We will illustrate that now inElements.
A displacement map will make the gun follow the contours of the hand as if it were an image or tattoo painted onto the hands.
Open the main picture, in this case hands.
Create a copy layer with Control J
To convert this to black and white we will use Control/Shift/U.
Go to Filter/Blur/Gaussian Blur and apply with a level of 2
Save file as a PSD named Displacement Hands.

Now open the original hands image and the gun.
Open the hands image and we will use the magic wand to select around the hands. I have dropped tolerance to 44 before making the selection and contiguous is off.
Select the white area then invert the selection in order that the hands might be selected. ( Control/Shift/I )
Select Control J to create a layer with just the hands.
The magic wand does not work well on the gun as there are white areas in the weapon, so make sure contiguous is on and set Tolerance to 129. Select the gun then with ADD TO SELECTION, select the trigger guard areas. Use SHIFT/Control I to invert the selection then Control C to copy it.
Open the HANDS again and re select them as before. Set tolerance to 44 and after selection invert.
Hit Control J to make a layer with the selection
Instead of using PASTE use EDIT/Paste into selection - this will result in the gun only appearing in the selected area i.e the hands.
Use Control T to invoke FREE TRANSFORM then position and size the gun to fit neatly within the hands. Hit Enter to complete and CONTROL D to remove the selection ( the marching ants )
NOW ! if you remember my open comments, you see exactly what I meant. The gun looks flat and could never be described as following the contours of the hands: In fact it looks terrible !
And this is why we are here tonight............DISPLACEMENT MAPS
Goto Filter/Distort.Displace. When the dialog appears accept the defaults. It will then request your DISPLACEMENT MAP. Select the map we created earlier.
Now change the Blending mode to Soft Light. If its too light hit Control J to replicate it.
If we now look closely at the image we can see the gun has wrapped around the hands fairly well. Magnify the image and inspect how it wraps around the fingers.

Lets do one more with a different image.
Open the main picture, in this case hands.
Create a copy layer with Control J
To convert this to black and white we will use Control/Shift/U.
Go to Filter/Blur/Gaussian Blur and apply with a level of 2
Save file as a PSD named Displacement Hands.

Now open the original hands image and the map.
Open the hands image and we will use the magic wand to select around the hands. I have dropped tolerance to 44 before making the selection and contiguous is off.
Select the white area then invert the selection in order that the hands might be selected.
Select Control J to create a layer with just the hands.
Now open the map image. Select the white around the map with the magic wand. Use SHIFT/Control I to invert the selection then Control C to copy it.
Open the HANDS again and re select them as before.
Hit Control J to make a layer with the selection.
Re select the hands
Instead of using PASTE use EDIT/Paste into selection - this will result in the map only appearing in the selected area i.e the hands.
Use Control T to invoke FREE TRANSFORM then position and size the map to fit neatly within the hands. Hit Enter to complete and CONTROL D to remove the selection ( the marching ants )

Goto Filter/Distort.Displace. When the dialog appears accept the defaults. It will then request your DISPLACEMENT MAP. Select the map we created earlier.
Now change the Blending mode to Soft Light. If its too light make a second copy of the last layer.
You could use this technique to put a poster on a lampost or place your initials on a crumpled towel of your shirt cuffs. Go explore !
Thank you for listening.