Join Deke McClelland for an in-depth discussion in this video Introducing 3D depth maps, part of Photoshop CS5 Extended One-on-One: 3D Objects.
Here is the first project that we will be creating and while the background and this little guy in the foreground of photographic, this central object is created using a depth map and the depth map as you'll see is a series of gradients. But before we start assembling this project, I want to give you a sense for how depth maps work. So, go up to the File menu, choose a New command or press Ctrl+N, Command+N on the Mac, and I am just going to call this document Playing around, because that's all we're doing up front here. I am going to change the Width to 1400 pixels, which happens to fit well on the screen, Height 900 pixels.
Background Contents really don't matter, we will start with Transparent, click OK. And then, go ahead and tap the D Key to make sure that your foreground and background colors are black and white respectively. And go up to the Filter menu, choose Render and choose Clouds. The Clouds filter being a great way to throw in some random fractal noise. We will have some blacks and whites and we will have some smooth soft transitions, which are very friendly where Depth Maps are concerned. So, go ahead and choose Clouds, you will end up with something like this. Now, I am going to go ahead and rename this layer clouds just so we are clear on what it is.
But we don't necessarily want this much contrast because white is going to create incredibly tall spires and then black is going to create these very deep valleys, which isn't going to work well for some of the mapping techniques that are available to us. So, what I would like you to do is go up to the Image menu, choose Adjustments and then choose the Levels command or press Ctrl+L, Command+L on the Mac and go ahead and select the first Output Levels value, because we are not correcting the image here, instead what we are trying to do is reduce its contrast and I'm going to go ahead and press Shift+Up Arrow seven times in a row to raise that value to 70, and then I'm going to press Shift+Down Arrow seven times in a row 1, 2, 3, 4, 5, 6, 7 to reduce that value to 185.
And the reason I counted that out was because that way I didn't have to do the math. Anyway, go ahead and click OK and then create a copy of this layer by pressing Ctrl+J or Command+J on the Mac, and you can turn off the original for a moment, so we can focus on the 3D object that we are about to create. Couple of different ways to convert a Depth Map into a 3D volumetric object, one way is to go up to the 3D menu and choose New Mesh From Grayscale and then choose the desired mapping technique, or I'll go ahead and escape out of the menu.
Bring up the 3D panel, select 3D Mesh From Grayscale and then select your mapping technique. We will start with Plane, which just maps the image onto a flat plane, so anything that's dark is going to go down, anything that's light is going to go up. I will go ahead and choose this option then click the Create button. And notice that we automatically get this sort of canyon art. I am going to switch to the Object Rotate tool and drag around a little bit here. And we have essentially the bad lands for all intents and purposes and I am going to go ahead and scale that up a little bit so that we can see it in better definition.
Also if you want to, you can increase the depth of the various sort of canyon formations by dragging on this little green block. So, if I drag up, I'm going to reduce the depth and if I drag down, I'm going to increase the depth. So, up to you, how you wan to resolved that out. So, that's your first mapping option is Plane and that's the one that we are going to be using to create both of our projects, because I find it to be the most useful. But Planes got a cousin and that's Two-Sided Plane, and in order to get a sense of what's going on there, let's create a different layer.
I am going to turn off that bad lands clouds layer there and I'm going to create a new layer by pressing ctrl+Shift+N or Command+Shift+N on the Mac and I will call this guy gradient and click OK. Let's go ahead and create a couple of guidelines so we can see where the center of the image is. I will go up to the View menu, choose New Guide, and then we will create a Vertical guide at 700, which is half of 1400, the width of the image. And then go up to the View menu, choose New Guide again and I am going to turn on Horizontal and change the Position value to 450, which is half of the height of this image.
Then I am going to go ahead and grab my Gradient tool and I'm going to switch over to a Radial Gradient and I'm also going to select foreground and background here. And then I'll press the X Key in order to make the foreground color white and the background color black. Now, I am going to drag from the centre up to about here and you can press the Shift Key if you want to, to constrain the angle of your drag, and then go ahead and release, so you're creating a radial gradient. Then just for larfs, I would like you to go up to the Filter menu, choose Pixelate and then choose Crystallize and this is going to allow us to create sort of the stair step formations.
And I came out with a value of about 40, you can go your own way, click OK in order to create that crystallized radial gradient. All right, I am going to press Ctrl+Semicolon or Command+Semicolon on the Mac in order to hide the guides. I am going to press Ctrl+J to make a copy of that gradient, turn off the original just so it's safe and sound. Go over to the 3D panel, make sure 3D Mesh From Grayscale is selected, then switch from Plane to Two-Sided Plane and click on the Create button. And I'm going to switch over to the Object Rotate tool once again and expand the size of this object and then go ahead and rotate it in 3D space and you can see that it goes both up and down.
So, if I had rendered it on the Plane, Photoshop would have extruded this shape upward, but because it's a two-sided plane, it goes up and down. And I just love this effect with this kind of rock like formations here. Now, something you should bear in mind as you're working along. Notice that the top of the shape is the lightest and the bottom of the shape is the darkest. Well, that's because by default, Photoshop not only applies the Depth Map as a Two-Sided Planar Depth Map as you can see in the Layers panel but it also applies it as the diffuse color, which is fairly insane in my opinion, because you don't really want that, but you can always switch it out anytime you like.
All right, so those are your first two options for extruding a Depth Map in the 3D space. In the next exercise, I will show you the other two options Cylinder and Sphere.
- Spinning a 2D layer in 3D space
- Using basic 3D shapes
- Importing a 3D model as an OBJ file
- Exporting a 3D model to the DAE format
- Painting directly on a 3D layer
- Working with UV overlays
- Making a bump map
- Working with 3D depth maps
- The medical applications of Photoshop 3D
- Creating 3D motion effects
- Revolving objects in 3D space
- Adjusting the depth of field