How To Use The Displace Filter In Photoshop - Displacement Maps

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we're going to talk about the displace filter in photoshop the displace filter allows you to map one image on top of another by using a displacement map the classic examples include placing a logo on a shirt or adding a texture on a face we'll cover both on this video but we'll first talk about how this filter works and what the options of the displacement panel do and at the end i'll show you how you can create water reflections with this filter so what does that displace filter actually do the displace filter shifts or displaces pixels in one image by using the luminance values of another this second file is known as a displacement map and it must be saved as a psd that's a photoshop document this displacement map tells photoshop whether to move the pixels horizontally or vertically illustrated by the positive and negative values on this graph the instructions for how much each pixel will shift is directed by the luminance values in the displacement map black which has a luminous value of 0 is the maximum positive shift white which has a luminance value of 255 is the maximum negative shift in 50 gray which has a value of 128 produces no displacement and before we go any further i want to point out that this graph is not your traditional cartesian coordinate system that you probably used in math class when you were a kid this is an upper left origin coordinate system that is typical in graphical interfaces so that's why the y-coordinate is different than what you might have expected the positive and negative coordinates are inverted in the y axis but anyway i just wanted to point that out in case you were wondering why the graph look a little bit weird okay so now let's talk about the channels in the displacement maps if a map has only one alpha channel the image shifts along a diagonal defined by the horizontal and vertical scale ratios essentially it creates diagonal movements a similar effect is created if all channels are the same if the map has more than one channel the first channel controls the horizontal displacement that's the x-axis while channel 2 determines the vertical displacement the y-axis and also i want you to notice on this graph we have these gradients they're to help you illustrate which way the pixels will move brighter values will push pixels up into the left those are the negative values well darker pixels will push things down into the right those are the positive values now we're going to work with this file here and it's just a grid with a star and we're just going to add a simple displacement map i'm going to go into filter distort displace and these menu options are very simple to explain the first two options are the scale horizontal and vertical so these values are actually a percentage there's no percentage sign there but these are percentages you can type in 100 and that will be 100 however you can actually go between negative 999 percent all the way up to positive 999 percent so what are we talking about here exactly when we talking about percentages well what this means is that the percentages are based off the values provided by the displacement map so if you have black at 100 that is 128 pixels because that is the number of values that we can actually move 128. remember from 50 gray all the way to black we only have 128 values from 50 gray all the way to white we have 128 values that we could use so when you type in 100 on any one of these boxes you will move 128 pixels if you have black or white but right now we only have 50 so what does that mean well that's 50 of 128 pixels which equals 64 pixels so the maximum amount of pixels that you can move using a displacement map is 1280 if you were to do 999 on the scale now that's obviously assuming that we go to the extremes black or white different levels of luminosity will of course give you smaller movements and if you're wondering why you would use negative percentages well that's just simply to invert the displacement it's just so that you have more control unfortunately there is no live preview so this filter will definitely heavily rely on trial and error so just keep trying different numbers until you get the results that you're looking for the next option is how the displacement map will fit on the image so if you have a displacement map that is not as big as the image then this option here allows it to stretch and fit the image or you can tile it much like a seamless texture the undefined areas are simply what happens to the edge of the image when pixels get pushed off the edge repeat edges means that photoshop will fill in the areas with whatever tonality the image boundary contain and wrap around simply means that the pixels that get pushed off the edge are going to come right back from the other side and if the pixels uh do not interact with the edge then you don't really have to worry about these two options they're both going to produce the same result but anyway for now we're just going to leave the horizontal scale at 50 in the vertical scale at 50 stretch to fit and repeat edges then i'm going to press ok and we're going to click on this file here called displace white circle and press ok and notice what photoshop did it pushed up into the left if you look at the graph we'll see that we went up into the left that means that we got some bright values and some bright values on the horizontal as well if we open up that same file you will see this white circle and if we look at our graph you'll see that the brighter values do in fact push things up and to the left so what would happen if we turn the circle black well let's see what happens by the way i'm working with a smart object here so i can always come back and adjust my displacement filter so i'm going to double click on it to bring up the displace window again and just simply press ok and this time i'm going to select displace black circle and let me just disable the graph so we can see what happened and look what happened this time we went to the right and we went down if we look at the graph you will notice that dark pixels are on the right and they are going down so that's what that particular displacement did let me open it up so you can see what it looks like and as you expect it is just the same as the white one but black let me go ahead and edit this filter we're going to try one other displacement map i'm going to press ok and this time i'm going to open up this one called displace white circle two channels psd i'm going to open that up and this time the star only went to the left it didn't go up if we look at the graph we didn't go anywhere up but we did go somewhere to the left so that's white so we can at least guess that we're gonna have a white circle going to the left let's see what that looks like well it's not a white circle and that's because in the channels panel we have three different channels red green and blue notice that blue and green have nothing in it and it's 50 gray that means that no changes are gonna happen we can disregard the blue channel we're only looking at the green the first channel has bright pixels so that means that the first channel controls the horizontal values in the second channel controls the vertical values so when we made this adjustment the star got pushed to the left only because we had the instructions for the horizontal axis the x-axis we had nothing for the y-axis therefore no changes were made now i also want to point out that you can make a similar adjustment by opening up the original white circle but just setting the vertical scale to zero so i'm going to press ok and i'm going to open up the white circle displacement map and notice that the adjustment didn't yield any changes that's because we set the vertical scale to zero so now that you have a good understanding of how displacement maps work we can start working on a few examples for example we have this shirt it says ptc photoshop training channel and we want to place this logo on this shirt so how will we go about that well we can simply start by making a selection around everything ctrl a command a on the mac and then we can go into edit copy merge and i'm just going to file new and i'm going to create a new psd file and paste that on there remember displacement maps only work in black and white so i'm going to desaturate this image ctrl shift u command shift u on the mac and with this image we can create our displacement map we don't need the background so i'm going to delete it click on it hit the delete key and it's gone i'm going to save it ctrl s command s to save and i'm just going to call this t displacement and save that file and press ok i'm going to close these other files we're not using just so we don't have a lot of clutter in the tabs so we just have these two tabs i'm going to press ctrl d command d to deselect and then this t-shirt file and this should say t-shirts i'm just going to call that t-shirt t shirt okay so we have the t-shirt file and then the ptc text which is a smart object and we're gonna work with that smart object so we can work non-destructively i'm gonna go into filter displays and we'll probably do let's start with 20 on the horizontal and 20 on the vertical and see how that works then press ok and we're just going to use that t displacement file we created just a second ago and press open and notice that some changes weren't made onto the text and let's blend the logo a little bit better so i'm going to double click on the ptc text and i can use the underlying sliders under the blend if options to blend that in a little bit better now it's looking a little bit too harsh there of course so i'm going to hold alt option on the mac click split those in half and then just adjust the sliders to better transition between visible and invisible pixels and now i can zoom in by tapping the z key and zooming in and you'll see how the text was adjusted now one thing that i did not mention is that if you don't smooth your image you're going to get these jacket edges so i'm going to go back into the t displacement and we have a lot of noise so you have to smooth that out so i'm going to go into filter blur gaussian blur and we can just blur it until we have a smoother texture on the t-shirt and then save this file ctrl s command s to save go back onto the file that we're working with double click on the displace label on the smart filter and try again same t displacement file press ok and notice the difference much much smoother and it's still adjusting to the contours of the shirt i can double click on the display icon and try a higher value so we'll try 30 just to see how that looks we might have to end up splitting the difference at 25 but let's go 30 and see what difference that makes t displacement okay and that might be a little too much so yeah 25 is probably where we want to be so let's try that 25 25 okay t displacement and press open and yeah that looks much better i think i'm going to zoom out just so we can see what we got and that's our t-shirt now another thing that we can do with this effect is apply texture to faces so there's a picture of me that i took in tuscany italy and we have this rock texture so i'm going to go ahead and quickly create a mask using the quick selection tool around the skin on my head and neck i don't really want to select my hair so i'm going to hold alt option on the mac click and drag to deselect the hair and the selection doesn't need to be perfect you can always come back and refine that later but i just want to get a rough selection going so this is going to be good for now then i'm going to click on the rock texture enable it and add a layer mask to it i'm going to disable the layer mask for now and we're going to work on creating the displacement map so i'm going to click on the face layer press ctrl j command j to duplicate then i'm going to press ctrl shift u command shift u on the mac to desaturate you can also go into image adjustments and desaturate if you want to then i'm going to blur this image but i want to use a different blur this time i'm going to use a blur called surface blur so i'm going to make sure i have the right layer selected the face copy go into filter blur surface blur and you'll see what this blur does it blurs the image but it sort of leaves the edges intact so i can do an extreme so you can see what that looks like so i blur most of the large patches but it left the edges so let's just do something that'll work for this image so i'm trying to get rid of the skin texture there so maybe something like four pixels will work or maybe three we'll leave it at three and press okay and just do a regular blur filter blur gaussian blur and this time it's just gonna be a lot less than what i had before maybe 0.5 or so and press ok i'm going to zoom out and what i'm going to do this time is i'm just simply going to right click on the layer and select duplicate layer and then select new under destination document and just press ok and that's going to take that layer put it a new document i can press ctrl s command s to save and i'm just going to call it jr for my initials and then displace and press ok then i can come back into the displacement file that we're working on disable this copy layer enable the rock texture it's a smart object so we're going to apply that smart filter filter distort displace we'll leave it at 25 for now and press ok and select jr displays and press open and some changes have been made what i'm going to do now is set the blend mode to multiply and the skin color obviously is not working for this rock texture so what i'm going to do is using the face copy i'm going to enable that just to give it color but i'm also going to copy the layer mask and actually i'll copy the layer mask onto this face copy and that'll be the base layer so hold ctrl and click and drag that layer mask onto the other layer notice how the layer mask is now on this layer and by holding ctrl which is command you don't duplicate it you just take it from one layer and put it in another and then on this rock texture layer i can hold ctrl alt g command option g on the mac to turn it into a clipping mask so that it only affects the layer below it which is the face copy layer so notice that that looks much better in terms of colors what i'm going to do now is enhance the texture the first thing that i need to do is create a new layer and fill that layer with 50 gray shift backspace and select 50 gray press ok and that's gonna fill that layer with 50 gray of course then turn that into a clipping mask ctrl alt g command option g on the mac change the blend mode to soft light and now we can use the dodge and burn tools to add some shape onto that rock face so first we're going to use the burn tool and we're just going to add some darker areas and the exposure is a bit high so you may want to bring it down and keep it in the 50s and just add some shadows in the areas that need shadows like maybe under here around the neck just sort of shaping the head shaping the nostrils bridge of the nose maybe under the lips and then use the dodge tool to shape the rest of the head here and obviously you may want to take a little more time on your image right above the lip that thin line above the lip catches light so i'm gonna try to mimic that maybe some light here on the cheeks nose the brow anyway this will be good for now so this is before and that's after now if you feel like this is still a little flat and needs some stronger highlights what you can do is duplicate the face copy so ctrl j command j on the mac click and drag that on the very to the very top if you lose all the clips like i just did there just select them all again and press ctrl alt g command option g on the mac there you go on this top layer set the blend mode to screen and then use the image adjustment levels to darken up the image except for the brightest tones that we have those highlights there so something like that press ok and just bring the opacity way down to zero and increase it up accordingly just so we can get those extra highlights there like so at this point we're only gonna make a few more adjustments we're gonna click on the rock texture and we're gonna enhance it a little bit so i'm gonna go into filter sharpen unsharp mask and just add a whole bunch of sharpening to that layer so that's before and that's after so as you can see it really helps it pop then i can make any final adjustments to my layer mask so obviously i'm missing parts of the ear parts of the head so i'm just going to quickly paint with white on those areas just so that we can have a better effect and actually let me just delete this layer mask here i don't think we need that layer mask so then just paint with white on those areas like i said i'm doing a fairly quick job here on the mask but it's looking pretty good and for this areas it's going to help us out a lot that i have black hair because i don't have to be too precise with the mask the edges are going to get lost between the dark hairline and the dark rock texture so at this point you can make other aesthetic choices so for example if you want the actual teeth to show just paint with black and the layer mask and again paint as quickly as you can you don't have to be too precise once you're done you can always go back zoom in and make any final adjustments which is usually what i do i don't like to make masks that are too precise right off the bat just because you never know if they're going to work or not and it's not worth spending that time masking things unless you know for sure you're gonna keep so in this case a quick masking job like this will work okay there you go we're going to finish this video by me showing you another cool thing that you can do with a displacement map and that is add water to images so in this image we obviously don't have any water so i'm going to zoom out and this is a composite that i did and this training course does include a bonus on how i created this image so just look for the bonus folder and you'll see the video there anyway so this is obviously a flattened version of that image and it's just there there's nothing else and we're gonna add some water here so the first thing that i'm going to do is i'm going to click on the crop tool and make a larger canvas a taller canvas then i'm going to press ctrl j command j on the mac to duplicate that layer ctrl t to transform right click on the image and choose flip vertical i'm going to click and drag this down and i'm actually going to go right about here but i'm going to place this layer that's on currently on top the one that's flipped backwards i'm going to put that at the bottom like so then ctrl click on the layer on the layer thumbnail to load a selection around this layer and go into filter distort displace and choose 50 for horizontal scale of 50 for vertical scale stretch to fit and repeat edge pixels and press ok and in the folder for this chapter you will see the water.psd file which is a displacement map that will allow you to create water so select that and press open notice that photoshop will make this adjustment here now before we continue with this example i'm going to go ahead and open up that file so you can see what's going on file open open up that water.psd and if you look into the channels panel you'll see that the red and green channels are not the same they're different they're creating that effect of water and that's what the water displacement map looks like if we go into the rgb channels it looks all funky like this so then what you want to do at this point is just make a copy of this so ctrl a command and the mac to do a select all then you can go into edit copy go back into that file and paste it there ctrl v command v on the mac to paste then you can press ctrl t to transform and stretch this out to the edges so this is sort of like what we told photoshop to do in that in that option stretch image to fit and then hit enter then press ctrl shift u command shift v on the mac to desaturate and now we can use this layer to give a little more depth to the water so we're going to duplicate this actually ctrl j command j on the mac the bottom layer we'll call this shadows in the top layer we'll call highlights so let's work with the shadows first we're going to change the blend mode to multiply and then go into image adjustment levels and just darken it up dark up the dark luminance values and brighten up the bright luminance value so we only have the shadows and then you can play around with the mid tone and see how much of those shadows you want visible so maybe something like this enable the highlights layer and switch the blend mode to screen and do the same thing but this time we're going to work at the brightness so about this much and then hide all the other values by making them darker so maybe something like this and press ok and you can of course adjust the opacity to make the highlights look good on your image so maybe something like that you can then add a new gradient adjustment layer and set the color to maybe we'll try blue and see what blue looks like maybe a dark blue something like that should work for this to be realistic this will be okay but i kind of like the brightness of the image so maybe so maybe it wouldn't work so great in this case i'm going to keep it for now usually i like to add this layer to sort of bring out the water a little bit and give it a little color but in this case it's not working so actually what i'll do is i'll make it a little bit brighter and then duplicate the color on this side as well by clicking on it and clicking here dragging this one out and maybe bring down the opacity and then drag it up accordingly so maybe something like this so it's before and that's after one more thing i will do to adjust this layer is i'm going to apply a blur on it the colors are not working very well so i'm just going to filter blur gaussian blur and just blur it just enough so that we don't get all that all this crazy noise in this area so i'm just going to press ok there i'm going to zoom out and i'm actually going to fit it to screen so we can see the entire image the final thing that i'm going to do is i'm going to select the top layer here and i'm going to create a new layer mask and i'm just going to paint with black so that it seems as if the water is going around maybe the tree and certain edges so i'm going to paint with black here and again i'm going to do a fairly quick job here but you'll see how great this is going to look it looks like water is just going around those sleeves and into that log there around the tree there i guess the important thing is not to have a straight edge just because this probably wouldn't be too realistic and there you go that's so you would create water using a displacement map and that's it for this free sample if you want to learn more about compositing and advanced techniques in photoshop then check out my website there's a link on the description where you can learn more about my photoshop training course if you enjoy this video don't forget to click the like button leave a comment and share it with a friend thank you so much for watching and i'll talk to you again soon you
Info
Channel: Photoshop Training Channel
Views: 61,961
Rating: undefined out of 5
Keywords: Photoshop, Tutorial, Training, Adobe, how to, CC, CS6, photography, graphic, design, Jesus Ramirez, PTC, PTCvids, Help, Tips, displace, filter, Displacement Maps, Distort, tee shirt, water, rock texture
Id: OlQj-EyyDhg
Channel Id: undefined
Length: 27min 49sec (1669 seconds)
Published: Sat Jul 09 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.