Principles of UV mapping in Maya 2020

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi this is David from over at simply Maya now I want to take this opportunity to continue our getting started with Maya 2020 series of tutorials by taking you through the principles of UV mapping now we're not going to be UV mapping anything complicated today this is more an introduction to the topic and what you would use it for now UV mapping at its heart is basically taking a three-dimensional object and lying it flat along a two-dimensional plane now the reasons you'd want to do this are quite a few actually but predominantly texturing it's also useful in the area of dynamics but we're going to be concentrating mainly on texturing today so if we take a 3d object like a cube and we wanted to lay this flat to say paint a texture across the top of it it's not possible anyway we stretch or bend this it will never be flat to the point where I can see all of it from a two-dimensional viewport so if I look at it from the top I can only actually see the top and if I look at it from the side obviously I can only see the side now in 3d space that's fine in 2d space that's not going to work I'm going to need an object that has been split apart and laid on the floor so let's flip in to the UV workspace here so the UV editing workspace and we'll take a look at what Maya has done with the UV of this box now you'll notice me moving around the 3d object won't actually affect the UV but let's look at our box in the viewport for a star now I've got the textured display on and what you're looking for a good UV is to have perfectly square boxes one thing to notes however if I select the UV shell here and rotate it it doesn't really matter which direction these boxes are facing you're just looking to make sure that they are perfectly square so how is this done well if we select the face here you can see that each one of these is one face of our box where these white outlines are let me turn off the textured view it's where the seams it's where the Vox has been cut in order to lay it flat now you might be thinking that you could just take a more complicated object and then chop it into tiny pieces and lay it flat on the floor and this would indeed be true but everywhere you have one of these themes can be a problem to texture because although modern painting programs for this kind of thing like Mari and substance can paint across seams you still going to have an issue with things like procedural texturing dirt generation and a lot of cases and things like this so the object of a good UV is to get the object as flat as possible without too many seams now on a cube this is quite easy because each face is just flattened to the floor but if we were to bring in let's say something a little more challenging like a sphere here you can see Maya has done its standard UV map for us it looks alright it's square it's fight however if we put a checker on it you can see that these are not square they're oblong and as we go further up but the situation gets worse and worse and worse so if I were to just take this into a paint program now and paint on it I'd end up with a very distorted texture in fact we can see that if we turn on the distortion view so anything in blue here is going to be squashed as a texture and anything in red it's going to be expanded as a texture now let's say I was painting a lizard's skin or something like this where a little bit of squatchin squash and stretch might look natural then obviously I can get away with less seams because the more seams I cut in the flat of the object is going to be but the more difficult it can end up being to texture so it's always a bit of a struggle depending on what you're you ving as seams versus versus flatness basically so as you can tell when we got this view on all of the top and bottom of our object and here's pinched together and the outside of our object is expanded outwards now we can do a much better job this so I'm gonna go into the UV view Here I am going to select UV I'm gonna select mall and I'm gonna get rid of everything Myers done by just hitting so now you'll see only the problem much worse but that's fine this is a base for us to start with now we would need to decide where to cut this object in order to lay it flat now as I said before we can't just squash it flat we need all of it represented in a 2d flat plane so a traditional way to UV a cube like this would be to select the edges now you can select the edges on the UV map itself or on 3d viewport here whichever you're most comfortable with I'm going to use the 3d viewport for a second because I think it might be easier for you to visualize it so we're going to cut this top of the square of our cube cube cut the top of this sphere off the sorry and I'm gonna hold shift and I'm gonna select this line down here I'm gonna go into the UV toolkit under cut and sew and I'm gonna hit cut now you'll see these lines have thickened up and if we go back to object mode you'll see I've got two white lines there for the cuts now I've also made three UV shells now so I can come along in here and move these apart a minute so you can see they're three separate shells and then I can flatten these out so if you go here and you go to unfold you're gonna unfold this one and unfold this one now this is not going to be perfectly flat because if you envision this shape in your mind if you fight in it it's gonna be stretched a bit you would need to cut it again so let's look at that let's bring out our view here and I'm gonna put this down here and make it a little smaller so we get bigger squares and you can see that we've got pretty square squares here but it's not perfect and what we have to see that even more if we bring on the distortion view you can see around the bottom ignore this bit in the middle because we'll work on that in a minute but around the bottom of our shell it's quite red now this to me be fine but if you needed this thing slightly flat there's a way to do that too and that's by adding extra seams okay so let's just put a couple of extra seams in this now it's worth noting as we zoom in on this map here you can see very little in the way of distortion on it there might be a slight redness here and possibly let me turn you shell off a slight blueness here now this is a more than adequate UV but for demonstration purposes I'm gonna show you how you could maybe get it a little flatter still so I'm going to cut around the circle to cut the middle out and it cut around down here and I'm gonna get a cut and then I'm gonna go to unfold and if we take this UV shell and unfold it and this UV shell and unfold it you'll see now that we almost perfectly bright white okay so this is flat but at the expense of extra seems to make it more difficult for me to paint so again you have to ask yourself the question is that tiny amount of stretching on your UV really worth it for me the answer in this case would be no but I thought I've just demonstrated to you how you would cut it and so it was a little bit flatter now let's do all the rest of our objects so what have we got here we've got the same thing here UV shell make sure we unfold it and that's fine we'll do all the size discrepancy in a moment and then we have this big thing now if we try and unfold that it'll unfold into a circle not very good very very pinched at the edges and very very squashed uh sorry very squashed or pinched at the edges and very expanded up here so we would need to cut another seam in this and I'm going to go to cut and then UV shell and unfold and that will unfold it okay you can see now that it still has some of that blue and red on it but so little it's really not going to make any difference and in fact if I lay this out so let's deal with both the sizing issue and the layout of the UV so I'm going to come in here and I'm just gonna go lay out and that's gonna pop that all together for me all nicely now when it comes to you one of these squares the ones in dark by bold dark black lines is one u di M 1 u V tile if you like so this could be practically any size you want that it could be 1k by 1k for texercise or 8 K by 8 K now there are other you di M's you can also use which are supported by modern texture painters like Mari and substance and whatnot but for right now I don't want to get into that just be aware that when you lay a UV out it's pretty much all gonna fit within one of these boxes or a selection of these boxes but what you don't want pretty much ever is one of these UV shells and to bisect two boxes so you can use multiple boxes but not for the same shell so for instance I could have this in this patch and this in this one in this unit I am and this in this one and that would be fine by having this one straight across the middle or even worse straight across all four pretty much a no no if you select them all and hit layout that will move them all into the zero on one space which is this box here so now we've got this done and it's three separate patches which is kind of fine but can be a bit of a pain when you start you be in a complex scene and you've got bits all over the shop so we can actually join these things back together so let's go to edge here I'm gonna select this edge and hit stitch together which will stitch it up here I'm then gonna select the corresponding edge on the other side and hit stitch together which will stitch that one out there I'm then going to lay it out again just so it fits neatly in the box and there we go now it's worth noting as well but the more you can maximize the space the more texture you're gonna have to paint on so if you imagine this as a image in Photoshop only where this UV is will you be able to paint so you're wasting all of this space now in modern terms that's not such an issue anymore because like I say this could be a 8k texture so you have plenty of space and you can also move other UV paths into another one of these uni iron patches to give yourself two 8k texts so the days of really having to optimize the UV layout inside these boxes while not gone it's certainly a bit more relaxed like I would not try and used to be back in the day that people were actually stretching UV out to try and get it to fit and you'd end up with these weird sort of stretched movies so people could get them to fit a bit more now of course the UV would then be more stretched but you know many many moons ago it was considered a fair price to pay to have a bit of stretching to maximize the space it's not strictly that necessary anymore although you should definitely pay attention to it you do not want to do something like this and then hand it off to the guy whose texture and you work because he'll have you know 20 by 20 pixels to paint on so you definitely want to get that maximized to as much space as you can okay so couple of takeaways here are just basically you vieng is laying something flat that's three-dimensional so from a three-dimensional object to a TV two-dimensional object it's also a trade-off between the number of seams or the number of cuts you put in an object and how flat it can be versus the number of cuts and how easy it is to paint and manage in general like I say we could actually just come in here cut out each face individually and they'd be perfectly flat though it would also be quite a nightmare to paint texture later on so let's just quickly do one more object and as I say this is more of principles of UV mapping than an actual tutorial on yeah exactly what each button does bone kind of hoping you're finding this useful because I know it's an area where quite a few people have for some issues so I'm going to give you a couple more tips if and the way I got that bit left behind so I'm gonna bring in a poly torus here because it's an interesting thing to cut and you can see on the viewport where Maya has cut it so let's get rid of that nonsense although Maya hasn't actually done quite a bad job on this one and I'm just going to sew it together so we don't have any cuts on it just for demonstration purposes really I'm then gonna take the edge here so I'm gonna cut the top off this thing now if I think about the best way to cut this there's actually quite a number of ways to cut a Taurus um I'm gonna do one that's gonna be pretty flat but has a few seams on it now this isn't necessarily the best way to do it or indeed the only way to do it this is just the way I'm going to do it to get it pretty fired so I'm going to cut it across all these and then that will leave me with a number of UV shells here so should be four okay and you can see the viewport update so this big one is actually the inner shell here and then we have one shell here one shell here and one shell here now what we need is to cut all of these because if we try and unfold them at the moment they will unfold as circles which generally is not the best use of space but also it won't be the best for laying texture flat either if I come in and put on the seams we've lost the icon the textured view you'll see that if I make this a little smaller to increase the size of the squares that they're not really square you've got quite a bit of stretching now you're never going to be able to get rid of that that's a curved surface and laying a kurd surface flat would again mean chopping it into much smaller pieces but that's what I would consider an acceptable level of distortion so let's come in here now I haven't unfolded these yet which is why we still have a nasty display let's come in here hit the edge and I would recommend by the way use FA f9 f10 and f11 for edge/vertex face and object I can't use them at the moment because my recording hotkeys for some reason one change off f9 and f10 to pause and stop the video which is why you keep seeing me going to edged object vertex and whatnot but if a f9 f10 f11 excellent short keys to shortcut keys to memorize so I've got this whole edge selected here and you'll see that actually selects the corresponding edges and all these UV shells and I'm gonna go to cut and then I'm gonna select all of the UV shells and unfold them ok and I end up with this now I can grab them all and get a layout that'll put them all to their approximate sizes and because I don't want a situation where I have lots of UV shells hanging around I'm just going to quickly stitch these guys back together so let's select the edge here you can see the corresponding edge selected here and let's stitch together and then I'm gonna select the opposite edge and stitch together now this guy would actually go around the inside of here so this edge actually would line up with these ones now obviously we can't jam this in here it would just be very very distorted now we can't connect the other end to anything because the other end actually connects into itself as you can see on the display here so this one unfortunately would be difficult to join back together with this one so this side would go here this side would go here so in this case there's not really a lot you can do about it you can just get it organized into a decent position like so I'm not gonna take too much time of it because this is not the world's most interesting subject I'm gonna hit the layout button again there we go and that's what Maya thinks its layout should be me I want to keep these together to remind me that they're all one object so we haven't made the best use of the space again that would be something where perhaps she would want another seam so not only with the seams help me to lay it flat they'll also help you to manage your space as I said not such a big deal this not such a big deal at this point but if we wanted to optimize this didn't want the full view there if we wanted to optimize this with space requirements how could we do it well we can cut here and here just I'm going to separate these shells again and then I am going to match this guy up here stitch together and stitch together now this is going to be a more efficient use of our space if we cut this out so I'm actually introducing one more seam here but when I select all of these guys and hit layout you'll see it's a much more efficient use of our space now I can actually do a better job than Maya of the layout of this thing manual layout is a thing and even though as I said you do have more options available to you bigger textures and whatnot that's no need to be extremely sloppy now we don't want it outside the bounds of this so there we go that's maximized my texture space a little and let's see what that looks like when it's got a checker box on it okay our squares are pretty square but we do have those extra seams so again the eternal struggle of the UV map of whether to have more seams and less stretching or more stretching and less seams now that's a question you're gonna have to answer for yourself depending on the model and your circumstances and this is only touched upon the very basics of moving some of the first principles of taking three-dimensional objects and trying to lay them flat on a two-dimensional plane so I hope this has been some use to you I hope it's helped you get your head around exactly what you being is if you're after more complicated you being tutorials I'm going to do a shameless plug right now we have some subscriber content on cinta Maya calm that you can go along and look at those some sort of faster UV mapping techniques for more complicated objects but I hope this is at least enough to get you started with and I hope you're all doing okay as the world's a little nuts right now as we all know so stay safe stay inside and I'll see you in another video tomorrow probably thanks for watching
Info
Channel: SimplyMaya
Views: 27,159
Rating: undefined out of 5
Keywords:
Id: 3vUaYKbnSgs
Channel Id: undefined
Length: 19min 32sec (1172 seconds)
Published: Tue Apr 07 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.