Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Creating Textures and Shaders in Maya with Eric Keller shows how to create textures and materials, and then apply them to models to render realistic surfaces. The course covers working with the mental ray shading nodes, including the mental images architectural node, subsurface scattering nodes, occlusion, and car paint shaders, as well as how to incorporate these nodes into shading networks using the Hypershade editor. It also explores using textures, Maya software nodes, normal maps, and displacement maps for adding detail to models. Exercise files accompany the course.
In this movie, I am going to talk about how to create UV texture coordinates for polygon surfaces. What I have here is a single tire from my car scene. I've hidden the car, but if I select the car group in the outliner and choose Display > Show Selection, you can see here is my car. My goal is to improve the shading of the tire so I can add details using texture maps. I'd like to add a tread, maybe some decals on the side of the tire, and so on and so forth using texture maps just to make it look a bit more interesting.
But in order to apply texture maps correctly to the surface, I need to make sure that my UV texture coordinates are set up properly. So, let me select the car in the outliner and press Ctrl+H to hide it and I just moved the tire here to the center of the grid because this will make it easier to start projecting UV texture coordinates. So I have the tire selected here. I'll choose Window > UV Texture Editor and you can see that at the moment, there are no UV texture coordinates. It's just completely blank. So the process of creating UV texture coordinates generally involves projecting the UV coordinates from various angles, shapes that closely match as much as possible the shape of the surface.
So what I want to do is start by creating a planar projector, in other words like imagine projecting UV coordinates from a flat plane to get coordinates for the side of the tire, so I can map a decal right here. So that's where I am going to start. Now I'm going to switch to the Front View, press the 4 key to show the wireframe, and I want to select the faces just on the side of the tire. So I'll right-click over the surface, choose Face, and drag a selection over these faces. It's a little bit too much. I am going to hold the Ctrl key, drag another selection, so now I just have these selected and that works for me.
So in the Create UVs menu, this is located in the Polygon menu set, Create UVs > Planar Mapping, open up the options, I want to set this to bounding box. I'm going to project from the X axis. So you can see that this is the X axis that's moving along this way, so I want to project this way on the X axis, so I'll choose that, and I'll choose Project. I'll switch to the Perspective window and you can see here is the projection plan, so this is the planar projector.
And if I open up the UV projection window, you can see here are my UV texture coordinates for the side of the tire. So, I am going to keep projecting on parts of the surface, so for the moment, I like to move these out of the way. So I'll just click on that manipulator and drag it away. And now I'll just click in the scene just to deselect the surface. I want to do the other side of the tire, so I'll switch to the Front View again, right-click over the surface, choose Face and then just drag a selection over these faces and it's a little bit too much again, so I'll hold the Ctrl key, deselect those, so that's what I have selected now.
That's what it looks like. So again, I am going to choose Create UVs > Planar Mapping, again choose Bounding box of the object to determine the size and X axis and I'll choose Project. Once again my manipulator shows up and here are my UV coordinates. I'll right-click over the object and choose Select. Now you can see so far these are the parts of the surface that have been mapped. So I am going to move these coordinates out of the way again.
So what I'll do is you'll notice under the Inputs selection for the surface, I have polyPlanarProj3 and Proj4. These are the projection nodes. So if I select polyPlanarProj3, I get this surface. If I select this one, I get these parts of the surface. What I can do is with that selected I'll just move this out of the way again. So I am going to select the object again, I'll choose Face, and I am going to select all the faces of the object.
So now I have the entire thing selected and now I want to quickly deselect the parts that have already been mapped. So in order to do that, I'll right- click in the UV Texture Editor, choose Face and Ctrl+Drag over the surface. Now you can see that it deselected all the parts that have already been mapped. That's just quick way to deselect parts of the object because you can select components within the UV Texture Editor. But the next thing I want to do is I am going to switch to a Side view, press the 4 key to switch to wireframe, I am going to deselect these interior parts of the surface.
So, I'll just hold the Ctrl key and drag out and that deselects the interior parts of the surface. So now I just have the outer part of the surface selected. So these are just sort of selection strategies and of course depending on the surface that you're working with, they're going to be a little bit different but you can sort of use these hints to speed up your workflow. At this point I want to map these UV texture coordinates around the edges and I think the best way to do that is to create a cylindrical mapping. So I'll choose Cylindrical Mapping from the Create UVs menu, open up the Options, there is not a whole lot of options here, so I'll just leave those the way they are and choose Project.
So you are going to see what's happened is I have a cylindrical projection but it's not combined with the surface, as it completely wrong orientation, but that's really easy to fix. You could go in here and do it numerically but another way to do it is to click on the manipulator. Down here at this little edge of the projection icon you see this little T button. If I click on that, that brings up a manipulator and now I can start manipulating the projection surface. What I want to do is I want to rotate it. So, if you take a look here at the manipulator, I'll zoom out so it's easier to see, see this circle right here at this part of the handle.
if I click on this, this will bring up the rotation manipulator and now I can start to rotate this way and then on the Z-axis until it starts to match up and you can see how the UV coordinates are updating while I rotate it here. Eventually I want a straight line. I get a close what I can do is just go in here and for the most part it's pretty straightforward. I'll set rotate X to zero and rotate Y and Z both to 90. And now I have a nice projection that's cylindrical and it ends up looking like a flat stretched out plane in the UV Texture Editor but that's great because this could be very easy to paint a texture in Photoshop.
So we are doing pretty good so far. We only get one part of the surface left to do. I need to drop the manipulator so I'll just click on the blank part of the scene, you can see those are coordinates so far. I am going to right-click over the surface, choose Face, select the entire surface once again. I can quickly deselect the parts that have already been mapped just by going to the UV Texture Editor, right-click, choose Face, and then Ctrl+Shift+Drag over all these parts and you can see I am just left with this in the center.
Once again, I am just going to use a Planar Mapping method, so there we go, and I have the manipulator and of course we know from experience that if I turn Rotate Y and Z to 90, I end up with the correct type of surfacing. Now, if I select the object here, you can see the UV coordinates so far. At the moment they are kind of overlapping. So let's take a look at some of the ways that we can make our lives easier in the UV Texture Editor. There is a button up here that when I turn this on, this is the Toggle Shaded UV Display, this shades the different UV shells and UV shells are just parts of the layout that contain connected UVs and it shades it so it tells me how the UVs are facing.
So, what I want is I want consistent colors. I want all these surfaces to be blue so that they are all consistent. So right now I have a blue surface, a red one, a red one and a purple. The purple is indicating overlapping UVs because I have the inner part of the tire underneath the outer part of the tire. So how do I fix this? Well, one thing I can do is I'll right- click over this part of the UV layout, I'll choose UV, I'll just drag and select a bunch of these, right-click again and choose Select Shell. I want to press the W key. I have Grid Snapping turn on, so I'm going to turn off Grid Snapping.
I'm just going to middle mouse button+ drag this out of the way and there we go. So how do I make these all consistently the same color? Well, now that I have this shell selected, I can go to Polygons > Flip. This reverses the UVs, so now this is blue so I know that this is consistent. Right-click over this UV shell right here, I am going to select the surface, Right-click, choose UV. Now I have them all selected and I'll just choose Flip and now they're consistent.
Sometimes if you're having trouble selecting a component in here in the UV Texture Editor it's easy to just go out here and right-click over the surface and choose Select and then you have the whole surface selected. The last thing I need to do is make sure that these are all laid out at this texture coordinate space right here. The other thing I like to do is make sure that their size is consistent. So right now this is the UV texture coordinates. All right if I select this, that corresponds with this part of the surface, but these are really large and this is very small. So how do I get these consistent? I can go back to the Projection nodes that I've set up here and take a look at the Projection Width and Height, and once again, I just want to make these guys consistent.
So if I set this to 1, I'll select polyPlanarProj4, set this to 1, select polyCylProj1 node right here, set the Projection Height to 1, and then do the same thing with polyCylProj2. Set this to 1. Now they're all consistently the same size. And the last thing I want to do is just select all the UVs in here and choose Polygons > Layout and that leaves them out in the grid so that they're optimized in size.
Now, I can select the surface and here are my UV coordinates. There are a couple of things that I would like to do just as a personal preference in order to optimize the space. For example, these UVs right here correspond to the inside of the tire and this is an area that I am not going to have a whole lot of texture map. In fact we're not going to see it because it's covered by the hubcap. So what I want to do is I want to scale this down so that I maximize my texture space for the other parts of the surface that will have detail.
So I have these UVs selected. I am going to right-click and choose Select Shell, press the R key to pull up the Scale Manipulator, and just scale these down, and I'll just move them out of the way and now I have more texture space that I can devote to the other parts of the surface that will have more texture coordinates applied to them. I am going to select all of these UVs, move them over, and maybe scale them up a little bit, and I'll just select some of these UVs, choose Select Shell, move these out of the way, and just maybe come up with an arrangement that seems to make sense to me.
Move these over here. I can get these to quickly fit within the UV range just by selecting all the UVs and choose Normalize,and by doing that Normalize fits them within the zero to one range here in the UV Texture Coordinate Editor. So now I have UVs for my surface and I am ready to use these as a guide to create my texture map. And so what I can do is I can actually create an image based on these UVs and open that up in Photoshop. To do that, I am just going to choose Polygons > UV Snapshot and this brings up this window and this is going to create an image based on my UVs, which I can then open up in Photoshop.
So, I am going to set the size of my texture to be 2048. I would like a large enough size to create some fairly detailed treads here, and I will keep the other settings at their defaults. I want to make sure the Image format is set to TIFF. Sometimes it's set to IFF by default. I can't really open that up in Photoshop, so I use something like the TIFF format or something I know that'll easily open in Photoshop, and I want to keep the other settings at their defaults, and this is where it's going to create the image, usually in the Images directory of the current project.
If I press OK, it'll create the image. You can see down here in the Script Editor that it saved the image. Then the last thing I am going to do is save the file. So I'll save this scene as map_UV and now I am ready to go paint my texture map.
There are currently no FAQs about Creating Textures and Shaders in Maya.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.