From the course: Maya 2018 Essential Training

UV map polygonal objects - Maya Tutorial

From the course: Maya 2018 Essential Training

Start my 1-month free trial

UV map polygonal objects

- [Instructor] When we apply textures to an object, we may need to map those textures. And by mapping, we place the texture very precisely on the surface so it lines up the way that we want. So here I have a simple stereo receiver and let's go ahead and apply some texture maps and I'll show you how to align those. So the first thing I want to do is just take a look at the texture map that we're going to work with. If we want to, we can go into View Image and under our sourceimages folder, we should have Stereo_Front and that should be the front of the stereo. We also have a file called Wood_Cherry and that's going to be for the wood sides. And then we have another one for the knobs on the stereo. So let's go ahead and start off with the front of the stereo. Now, when we map textures, we can map to the entire object or we can map to just individual faces. In this case, we're going to work with faces. So the first thing I want to do is go into Face mode and I'm going to select this big face here that represents the front panel and then I'm going to use shift + > to expand that twice. And this should be just the area that will contain that front texture. Now, in order to apply texture, I first need a material into which to apply it, so we're going to go ahead and create a Blinn material for this. So if I go in here, we can see that yes, we do have a Blinn material on here. And then I'm going to add in a file. So I'm going to click on this little checker here and under File, I'm going to select that one that we looked at which was Stereo_Front.jpg. There it is. Then we go head and open this and as you can see, it's not mapping all that well at all. So in order to map this, we need to do what's called UV mapping. Now we have an entire UV menu. We have UV Editors, which we'll get to in just a little bit. And then we have all these standard mapping types. So we have Automatic, what's called Best Plane, Cylindrical, Planar, Spherical, and so on. So we have a whole bunch of ways to apply and manipulate textures in the way that they map to a surface. So the first thing I want to do is make sure that I have what I need selected. So again, I'm going to select the face of the stereo and then just expand it twice using greater than. And now we're going to apply mapping to these faces. So I'm going to go into UV and because this is pretty much a plane, I'm going to go into Planar mapping. And when I select this, it brings up a gizmo here that we can use to control how this is placed. Now if I go to my Attribute Editor, I have a whole lot of controls for this. One is rotate, and in this case, I don't want to rotate this 90 degrees along Y. I want it to be flat along Y. And then I want to expand this in terms of Projection Width. In fact, we can type in a number here. I'm going to type in the number two here and that should expand it a little bit. Sometimes these come in a little bit small and you may have to type in a number to align them. And as you can see that once we get that, we're starting to get what we need here. And so all I need to do is adjust this Projection Width to match the front of the stereo. Now I can grab these handles. I have a center handle for moving the whole thing. I have green handles on the top and bottom for expanding it in the up and down direction. Red for the back and forth direction. And then we also have corners for scale. And so what I'm looking at here is I want to make sure this black part of the face just lines up with those edges exactly the way that we want. And once we have it, we can click off of it and now, I have that material mapped exactly the way that I want. Now, Planar is just one way of mapping textures. We have a number of other ones. We have Cylindrical, Spherical. We also have Automatic, which can work very well for box-shaped items such as this. So I want to make the side panels of this kind of a cherry color, so I'm going to go ahead back into Face mode and let's select the left and right sides of this by Shift-selecting these faces. And then I'm going to expand them one face by hitting the greater than sign. So now, I've selected these side panels and let's create another new material for this. So I'm going to create a Blinn. And so now I have blinn3 here and I'm going to go ahead and in the Color channel, I'm going to select the file and the file that I'm selecting is called Wood_Cherry_Original. Going to go ahead and open that up. And there it is. Now, it might not be mapped exactly the way that we want. So again, we can remap it just by applying a new mapping type. So I'm going to select these again by selecting the outer edges of the faces and then growing that selection. And then under UV, I'm just going to use Automatic mapping. Now, when we do Automatic mapping, what it does is it basically projects the textures from this number of planes. And by default, it's six, which means the X, Y, and Z directions. And so that should pretty much line up with what we have in terms of the texture. And for all intents and purposes, that looks pretty good, so I'm going to leave it at that. In addition to mapping flat planes, we can also map cylindrical and spherical. So let's do a cylindrical mapping here on one of these knobs. So I'm going to go ahead and right-click, go into Object Mode here and select one of these knobs. Now, I can apply mapping to the entire object instead of just faces, and we're going to do that on this particular object. So I've selected it and let's go ahead and apply a material. So again, I'm going to select a Blinn. We're going to do blinn4. And in the Color channel, I'm going to again place a file and that file is going to be Knob. Now this is basically just a two-tone texture, and so it has a darker color for the lower part of the knob and a lighter color for the upper part. So we're going to go ahead and open that up. And as you can see, it's not really mapped the way that we want. So we can select this and go UV, Cylindrical. And when we do, it brings up this cylinder, but as you can see, it's oriented wrong, so we may need to go into Rotate. So I'm going to look at my axis indicator here and I can see that red is the axis around which we need to rotate it. So I'm going to rotate it 90 degrees around X, which is the red axis. And then in terms of Horizontal Sweep, I'm going to maximize that. And now, we're starting to get what we need. If I want, I can change the Projection Height or I can grab any one of these to move and scale it. So again, I've got a lot of control here as to how this applies. And once I get it to the point where I like it, I can just click off of it, go back into Object Mode, and now that material is mapped. So as you can see, there's a number of different ways to map and we can map to whole objects or to just selections of faces.

Contents