Art & Design > Photoshop > Create 3d Objects From Scratch Using Photoshop® > Creating A 3d Brick Wall In Photoshop With Depth Maps

Creating a 3D Brick Wall in Photoshop with Depth Maps


Create 3D Objects From Scratch Using Photoshop®


Lesson Info

Creating a 3D Brick Wall in Photoshop with Depth Maps

- [Jesus] The first thing that I want to talk about before we even do anything is the requirements for running Photoshop's 3D features. So if you're on a 32 bit platform or your computer has less than 512 megabytes of video memory you will not be able to run the 3D features of Photoshop. And if you don't know how much video RAM you have you can press CMD+K, that's CTRL+K on a PC, to bring up the Preferences panel under the 3D tab. You can check the available vRAM. The computer that I'm currently working with has one gigabyte. The minimum is 512 so I'm definitely above that. So if you're below 512 you won't even be able to click on the 3D menu. So you will need a computer with more video memory. And actually before I keep going. One thing that I do want to change is on the interface. I'm going to change my highlight color from default to Blue. Notice the Layers panel, it turns blue. That way you guys can see what I'm doing a little bit easier when I'm clicking on the different layers. I...

t will highlight what I selected and it will be more noticeable. I'm going to press OK on that. So now that we got the requirements out of the way let's talk about actually creating 3D objects in Photoshop. Most of that 3D objects that you create in Photoshop are 3D extrusions. That means that you have a two dimensional outline of the object that you're going to create and you're going to push it back on the Z-axis, you're going to push back its depth and create a 3D element. That 3D element will be able to catch and cast shadows and reflections. So you can incorporate it into the background that you're working with. Now I said that this is the main way of creating 3D elements. There's another way which uses luminance values of an image and that is called a Depth Map and we're going to work with that first. So let's work with depth maps first. I'm going to go into this starter file that I have here and it's simply a brick layer. We're going to use blacks, whites and grays to actually create 3D geometry. Now some people may confuse this with a bump map. So I'm going to show you what a bump map is first and then I'm going to show you what a depth map is. And then how we can create 3D geometry from it. So what I'm going to do first is I'm going to create a new blank layer by clicking on a new layer icon, going into the 3D menu and selecting New Mesh from Layer and select Mesh, sorry about that, and select Mesh Presets and you're going to have all these different presets that Photoshop has for you. These are 3D models and we're just going to select the sphere. It's a very simple one and you'll see the sphere. When you're in Photoshop and you're working with 3D and you have the Move tool selected, you will see the ground plane which is a 3D element that catches shadows and reflections. You will see these tools here that allow you to orbit the camera and you will see these 3D tools up here in the Options bar. If I click and drag on the Orbit tool, I rotate...and actually you know what, to make things a little bit easier to see, I'm going to disable the original background of the brick layer just so it's not in the way and things are easier to see. And to make it even easier to see, I'm going to create a solid color and I'm going to make it white. So now, I'm in the 3D layer with the Move tool selected. I can orbit around my 3D object. I can hover over to the next one and actually, I'll zoom in so you can see what those look like. Orbit, pan and dolly. Pan works a lot like the Hand tool in Photoshop. Dolly works a lot like the Zoom tool in Photoshop. I mean we're still in Photoshop, traditional tools that is. I'm going to zoom out and you can also do the same thing with these tools on the top. I can click on them and then move the camera around. The reason that I don't like using these tools is when you're working with a lot of elements you might accidentally click on the 3D model and then if you click on the canvas, now you're moving the 3D model itself and not the camera and sometimes you don't want to do that. So for me I find it easier to use these tools to control the camera and if I do want to move the 3D model I can click on it and use any one of these 3D widgets to manipulate it. So you'll notice that each handle controls a different axes, the red one controls the X-axis, the green one controls the Y-axis, and the blue one controls the Z-axis. The tip icon moves the object in that axis. The little arc rotates it in that axis. And the cube scales it in that axis. The center cube scales it uniformly. That is very similar to holding the SHIFT key on the keyboard when you're transforming something. When you press CTRL+T to transform and you hold SHIFT and click on the corner handle, you're constraining that transformation. This is the same thing, clicking on that cube. If you hold the SHIFT key though and click on that cube, it makes the icon larger or smaller by dragging it up or down. Okay so now that we know how to navigate through our 3D scene we can work with this sphere. If I click on this sphere and click on Sphere Material you'll see all the different settings that we have that control how this sphere looks. The one that we are most interested in at the moment is the bump. This is going to help us create the effect of detail in the surface. It's not really going to change the geometry, we're just going to add fake detail. So I'm going to go into New Texture, press OK. Now we have a texture. And what you're seeing there are all the polygons. If I zoom in you'll see that they're just a bunch of triangles and they're in my way so I'm just going to click on this. In the Properties panel, there's this UV Overlays checkbox, it goes away. Double click on the Hand tool, and now I Fit to Screen, they're no longer there. Excuse me. What I'm going to do now is open up a image in my Libraries panel and I'm just going to drag onto the canvas here. And it's this circuit board and I'm just going to scale it so it matches the canvas. Then I'm going to go into black and white adjustment layer, it turns to black and white. Then I'm going to press CMD+S, that's CTRL+S on the PC, to save. I'm going to go back into my...Let me just close these tabs here so I don't get confused. Go back into my 3D model and notice how now the 3D model has that texture wrapped around it and it actually looks as if we distorted the 3D model, we distorted the geometry but we didn't. It's just an illusion. It's just light creating the effect of a bump, it's a bump map. And we can adjust the intensity of that effect by adjusting the bump slider, as you can see here. But in reality we're not really making any changes to the geometry, it's just an illusion. Now another way of creating a bump map is by going into the texture once again. Click on the bump map and then Edit Texture. And I'm going to delete the black and white adjustment layer. And this is a real way of creating a bump map which is selecting that layer, going on to Filter, 3D, Generate Bump Map, and we're going to have this filter that is going to generate this bump map. And what Photoshop is really doing is creating that black and white image for us and we can adjust the blur. The reason you want to adjust the blur is to decrease the detail on the bump map. Notice that if I have no blur, it has way too much detail and that may not be what you want. Or I can blur it just a little bit and I think that looks better. You can adjust the detail of the different highlights, mediums and lows and when you're ready you can just press OK, and Photoshop generates a black and white image and this will be a better bump map. What we're going to do now is we're going to use a black and white image. It looks a lot like this but we're going to use it to actually generate 3D geometry. It's not going to be an illusion. So I'm going to close this for now, I'm not going to save it because we don't need it. I'm going to go into the Layers panel and I can just get rid of this layer. The only point of this layer was for me to show you what a bump map is and how we're going to use that bump map texture to create a 3D image. I'm also going to bring that color fill down to the bottom here and enable this brick wall layer. We're going to duplicate it by pressing CTRL+J, CMD+J on the Mac. And now we have two layers of this brick wall. So what we're going to do is we're going to make a 3D wall. So with that brick wall selected, I can go into the 3D panel. This is another way of creating 3D objects by going into the 3D panel. You don't have to go into the 3D menu. You can go into the 3D panel and click on...actually right before we do that we need to create the bump map texture. So with that layer selected, go into Filter, 3D, Bump Map. So we just want to make sure that this preview looks like a wall really so we just have to adjust the blur. We don't want too much detail and keep adjusting the settings until it looks like a brick wall. This seems like it's good enough for this example and I'm going to press OK. In the Layers panel you'll see the result. I'm actually going to rasterize the layer, so I can right click on it and select Rasterize Layer. It's no longer a Smart Object. It's now a pixel layer and the reason I'm doing that is so that I could use the...excuse me... let me reset my tools. I'm going to go into Edit, Toolbar, Restore Default, click on Done, and I'm going to use the Dodge and Burn tools. And anything that is dark will be pushing in so I want the areas in between the bricks to push in and I'm not going to take the time to do all these areas. But what you want to do at home is make sure that all the areas in between the bricks are dark and the bricks themselves are bright, like so, using the Dodge and Burn tools. Once you're ready you can go into the 3D panel and you're going to create a mesh, a 3D mesh from a depth map. So it's going to use the luminance values on this image to push geometry out or pull geometry in. If you click on Create, you're going to see what this bump map create, or excuse me, oh, yeah it's a bump map really but we used it as a depth map, it created that right there. That is a 3D object. And we can rotate it in 3D space but you might be thinking that doesn't look much like a wall. Well we can click on it and we can scale it in the Z-axis, so we can squish it in. So click on the Z-axis handle there on that cube and push it in. Notice how now it's looking more like a real wall and I can zoom in by using the Dolly tool and maybe rotate it a little bit and you can see now that this is a wall. We created a 3D object, this geometry. This is not not an illusion like the bump map that we saw earlier. But we used the bump map to create the 3D geometry. Now you might be thinking well that's cool but how can we color this? If we open up a 3D object by double clicking on the 3D layer, you can click on the depth map here and then right below that there is the Material. If I click on the Material you can see the Diffuse. The diffuse is the color of your 3D model. So if I change the color to red it's not going to turn to red because I've got to remove the texture that's currently there so I can remove that texture and now it's red. Now the reason that it looks weird is for...I'm not really sure why Photoshop does this but when Photoshop creates a depth map it adds an opacity texture. I don't know why but it just does. So I always remove it so I'm just going to remove it. And when you remove it then you can see the color that you applied. So we have the diffuse but we don't really want a red wall. We actually want the real wall that we used to create the depth map as our diffuse texture. So what we could do is press CMD+A, CTRL+A on a PC, to select all. Then we can go into Edit, Copy, we're copying the pixels of this layer so we're copying the wall. Go back into the 3D model. And let me just disable the brick wall so we don't see it and doesn't confuse us. And inside the 3D model with the material selected, under Diffuse. The color won't matter because the texture is going to cover the color. So think of it this way, we have a red surface but we're going to apply wallpaper onto it is essentially what we're doing. So we're going to go into new texture, press OK. And I'm just going to paste, CMD+V, that's CTRL+V on a PC, and I'm just going to scale it into place. So it fits right within this texture, like so. And I can hit ENTER. If I press CMD+S to save, you'll see that that texture has been applied to the wall and now this is a more realistic wall than just having a flat, 2D image. I'm also going to show you how you could just take a layer and put it into 3D space so you can rotate the layer and you'll see the difference. So we have this wall and it's obviously in 3D space, it's catching the lights. If I click on the Infinite Light which is our light source, you can think of this as the sun, it's just a light somewhere off to the distance and we can tell Photoshop where that light is coming from, from what angle. So if we click and drag the Infinite Light, you'll notice that it's casting shadows. So let me quickly open up a new file and show you sort of like the quick way to do this but it won't have the results that you saw here. I'm going to go into layers and I'm going to find that same wall texture in my Libraries panel for my CreativeLive 3D class here. And I'm just going to scale this out, like so. And I can go into 3D and I can select a 3D postcard, click on Create and this essentially creates the same thing but it's just flat. So notice how although it is a wall sort of speak, it doesn't have any of that geometry or any of that detail so you can maybe get away with using a postcard at a certain angle but the downside is that you won't be able to adjust the Infinite Light. And by the way, notice that when I created a postcard by default there was no Infinite Light. I can add one in there so I can go into a New Infinite Light and there it is. But notice that the light doesn't really interact with the bricks or the rest of the wall. This is just essentially a piece of...Imagine printing out a photo of a brick wall and then just pasting it onto another wall. The light won't interact with the details of the actual print out because it's not really there, it's just an image. But if we take the steps to create it using a depth map we can definitely adjust it with the image based light...I'm sorry, with the Infinite Light and the light itself interacts with each of those breaks and you can of course adjust the size of the bricks if you wanted to by clicking on the scale along the Z-axis, cube here so push him in, push him out further. So once you have your 3D model created...Actually by the way before I move to the next thing, does anyone have any questions or any questions online, Jim? - [Jim] Jesus, how would you make the bricks smaller on the sphere so that there are more of them? - Yeah. Okay. So I would have to start out with the original depth map because that's what's creating the effect. So I probably would have to use either a different texture or just scale this down and maybe duplicate it a couple more times. So then something like that and by the way I'm duplicating by holding OPTN on the Mac and clicking and dragging. Obviously you have to remove the seam but just create a texture that has smaller bricks essentially. If you're using this example though, one advantage would be that you can adjust the UV properties so if I click on the example that's just flat, that has no 3D geometry I can adjust how this is tiled onto that layer by going into the diffuse, clicking on this icon and instead of choosing Edit Texture, I can select Edit UV Properties and I can just adjust the scale see how I'm scaling those bricks. Now you can see it here on the left hand side. See how I'm adding more bricks now because I'm adjusting the scale now, it's at 50%, the X at 50% or whatever percentage I'm at now, 28%. The Y at 27%. So I can adjust the bricks through the UV Properties for the texture but I wouldn't be able to do it like this on the depth map unless I of course created the depth map originally with more bricks. - Perfect. Thank you. - Awesome. So now that we have our 3D wall I'm going to show you how we can actually add more graphics onto the wall so it looks a little more realistic, maybe you want to add a company logo, maybe you want to add, I don't know, even some graffiti. So I can click on the bricks here, on the brick material, go into Edit Texture and that's our texture. I can create a new layer and I can put in a company logo, just to save some time I'm just going to go into the Custom Shape tool and just select, I don't know, this shape here. And instead of black we'll make it, I don't know we'll make it maybe blue. And then I can create a new layer and just paint with a Brush tool. And I can just put, I don't know CL for CreativeLive. So maybe add some graffiti or a company logo, it could be either/or. If I press CMD+S to save and go back to the element, you'll see how that graphic was applied to that wall and it matches the contour of the wall because it is in fact the 3D element. And to make it even more realistic, we can use Photoshop compositing tricks and tools to make it even more realistic. So if I go back onto the brick wall copy, this is not looking very realistic because we can't really see the contours of the actual bricks on the texture. But if we double click on the side of the layer to bring up the layer style window we have the Blend If sliders. If we adjust the underlying Blend If slider, you'll see how the pixels that are dark are going to start to come through. So essentially what this is saying is any pixels that are this shade of gray or darker are going to become transparent or going to come through, rather. So notice that if I drag further to the right, more pixels start coming through until they disappear. So you just got to find that fine balance and if you get to an area that kind of works but the transitions are too harsh, you can hold OPTN, that's ALT on the PC, and click and it splits that point in half and now you can create a more gradual transition until it looks a little more realistic on this to the image. And you can also do the same thing for the highlights if you like. I don't think this image needs it too much but I'll add it just to show you. And I'll do the same thing here for the CL graffiti there that we did with the Brush tool, split it in half by holding OPTN, it's ALT on the PC. Something like that. Then if I hit CMD+S to save, go back into my 3D model, notice how those changes appear and it now looks just a little bit more realistic. Once you decide where you want your final image to be so maybe you can rotate it any which way you want, you will need to render the image and you can render an image by clicking on the render button which is found here and rendering simply means that Photoshop is going to take all the settings that we apply, calculate them and make sure that the shadows, if reflections, if there were any, it just calculates them and puts them all together into a final 2D image. The render time depends on the speed of your computer and the complexity of your scene so it can be minutes or it can be hours.

Class Description

In this class, Adobe Certified Expert Jesús Ramirez, founder of one of the most popular Photoshop YouTube channels in the world, shows you how to make your very own 3D elements – no experience required. You’ll learn to use the 3D features in Photoshop, in addition to using text, images, and paths to create 3D geometry from scratch.

Through a series of 3D projects, Jesús covers: 
  • Creating 3D text, adding texture and lighting 
  •  Using 2D images to create 3D Objects 
  • Working with Image Based Lights to generate reflections 
  • Applying Textures to 3D objects 
  • Using the pen tool to create 3D objects 
  • 3D Depth Maps with geometry to create effects such as a waving flag 
This class is filled with techniques, tips, and workflows that allow you to immediately begin using 3D features in Photoshop for your projects and will teach you to create 3D objects from start to finish.

Software Used: Adobe Photoshop CC 2017.0.1