So, UVs are basically all the faces of the mesh laid out flat, and that way we can use
a texture to colour our mesh, and wherever the faces are that we've laid out flat, we'll
use that bit of the texture.
This will hopefully become clear as we work through creating the UVs and texturing the
mesh.
And before diving into unwrapping our mesh, I'd just like to go through some fundamentals
of working with UVs in Blender.
So let's just create a basic cylinder to experiment on, and I'm going to use the third layer now.
I'm going to just click on the third layer at the bottom, just because it's a nice clean
scene, and then I'm going to go Shift S, and then cursor to the centre, just to reset the
position there.
And then I'm going to go Shift A and add in a mesh cylinder, and that should be fine.
And this, let's just call this UV tests.
Okay, so I'm going to close out the tool shelves there with the T key and the N key, just to
give us a little bit more space.
And then I'm going to tab into edit mode, and then I'll just add an extra edge loop
just towards the bottom there with Ctrl R.
We don't need our reference image in the background here, so I'm just going to press X just to
remove that.
And all of our UVs will show up in here, and in fact, if I select everything with the A
key, you can see none of the standard objects come with UVs, so we're going to actually
need to build all of our UVs from scratch.
It's not too tricky to do, all we need to do is just press the U key, and then that
will bring up our UV mapping menu, and then at the top here we can see we've got unwrap,
so let's just give that a try.
And it kind of looks like Blender has completely ignored us, but if we just press T to bring
up our tool shelf, you can see that we've got at the bottom here this unwrap.
In fact, we can also do that with F6, and you can see that we've definitely performed
some kind of unwrap method.
So not a lot has happened, and the reason for this is because Blender requires some
seams because otherwise it doesn't know exactly what you mean.
So if we actually just come into edge select mode with Ctrl Tab, and then Alt Right-click
on this edge here, we can say Ctrl E and then Mark a seam.
Imagine this is using some scissors to try and lay this out as flat.
It can now calculate how it might like to try and lay the whole mesh down flat, knowing
that it can actually cut down this line now.
So if we select everything with the A key again, and then try that again with the U
key, and then unwrap, we get a total mess.
Because although it has some information that it can cut down this line, it's clearly not
enough.
And in fact, it's not too difficult.
We can just select this face at the top, and then go Ctrl E, and then Mark that as a seam.
And now let's give that a try with the A key, and then press U, and then unwrap now.
And now things are starting to look a little bit cleaner.
If we just take a look at the bottom and repeat that kind of procedure, so select the bottom
face, Ctrl E, and then Mark seam, and then try that again with selecting everything with
the A key, and then U, and then unwrap, we can see we now get something looking a lot
more reasonable.
So if we press F6, we can come and take a look at the margin, and we can still tweak
this, if we want to kind of give a little bit more distance between the UV islands there.
So that's the first major thing to think about when unwrapping, is where you want UV seams.
And if that sounds daunting, because you're not sure where you might want your seams at
this stage, there is another way we can begin to lay out our UVs.
And that's by using a smart UV project.
So first of all, we can clear our seams by going Ctrl E, and then clear seams.
And then if we bring up our UV mapping menu again with the U key, we can see we have this
option smart UV project.
And when we initiate that, we've got some options to be able to pad the islands a little
bit, which I always like to give a little bit more padding there.
And then we've got this angle limit, which is what will change the result of this tool
the most.
Basically, this is going to control the amount of UV islands that we get.
A lower figure in here will give us a lot more islands, but less distortion.
And a higher figure will give us fewer UV islands, but more distortion, meaning the
UVs won't quite match up in size with the actual dimensions of those faces in the 3D
view.
So we'll then need to go in and fix that stretching, which we'll see in a moment.
So I'm actually just going to set this down to something like 45, and then click OK.
And then you can see we have these islands that have been grouped for us now.
In fact, let's just do that again by pressing U and then smart UV project, and then taking
that right down to something like 20, just to see the effect of this.
And then you can see we're getting a lot more different islands there.
So let's try that again.
And then, in fact, let's take that up to something like 90, or 89 is the maximum.
And then click that again.
And then you can see we're getting only a three islands here, but a much more distortion
at the edges.
But that's okay.
So what I'm going to do is just try and correct this now.
So what we can do is we can come in to edge select mode with control tab, and then I'm
going to just shift select these two edges and then press V. And then that's going to
initiate a stitching command.
So at the bottom of the image editor, we can see in the header, we've got some helpful
information here.
Now the main thing that I'm going to concentrate on is which island I want to switch.
It's the I key, which is going to allow us to do that.
So if I pressed I, we can invert which island is getting moved basically.
But I'm going to leave that at default and just press enter to confirm.
And then I'm going to just shift select these two here and press V, and then press enter
again.
And then we can see we now have these three major UV islands.
Next I can come down to the UVs menu and then say seams from islands.
And now it's going to create sort of roughly what we had before.
So we have seam going around the top, two edges down the side, and then on the bottom
face as well.
So if we select everything now and press U and then unwrap again, you can basically
get something very similar to what we had before.
The next thing I'd like to talk about is a couple of helpful things we can use to assist
in our UV mapping to reduce things like stretching.
And to do that, one thing that's going to help us is if we create a new image.
And this is our new image dialogue that we get.
For this, I'm just going to call this color grid for now.
I'm going to alter the color to be something like, in fact, let's just set this to be something
like 0.5, just something in the middle.
And for the size, I'm going to set this to 512 by 512.
And then the generated type is blank currently.
And I'm going to set this to be a color grid.
Once I do that, I can click on OK.
And then you can see we get this color grid in the background.
That's not looking particularly helpful over here, though, because we can't see anything.
If we was to go into textured mode with Alt-Z, which is just switching this viewport shading
mode to texture down here, you can see everything goes black because we don't actually have
a lamp in our visible layer right now.
This is why I'd like to show another option that we've got in the property sidebar with
the N key.
And then down in the shading area, we can switch to textured solid mode with the Z key
first.
And then that will give us this extra option here, the textured solid.
When we do that, we can see whatever texture happens to be associated with its UVs in the
viewport.
And that means we can sort of bypass any harsh shadows and general viewport effects that
we might have happening, which is obscuring a good look at our UVs, basically.
So we can see in here that everything is looking fairly undistorted and isn't flipped or anything,
which is the benefit of being able to visualize this color grid on our object.
If we just select everything with the A key, we can see the actual UVs showing up.
And then we can press A to select everything in here.
And then we can sort of scale them up and you can kind of see the effect that that's
having in the viewport.
Something else that we've got is another sidebar in the image editor that can be quite helpful.
If we press N in here, we've got a UVs area and that's going to allow us to visualize
any stretching in here.
So if I just enable that, that's currently set to angle.
So if we were to just grab one of these and start to move out, you can see if that happened
to be our UVs, we would very easily be able to catch there was some sort of error there
based on the color feedback that we're getting.
Blue is perfectly fine.
And the more that that's getting pushed into red, the more that that is going to become
a problem.
We've all got the angle method of visualizing there.
And we've also got the area method.
Now basically all this is referring to is if we grab this face here and start to scale
it down, it's basically telling us that the difference between area between these islands
is an issue based on the actual size of the geometry in the 3D world.
So the more we scale that back up to be an accurate size, the more that it should all
settle back in a calming blue.
So I'm just going to switch off the stretching information for now and let's take a look
at a couple more things to do with UVs before we begin to unwrap our models.
There's two main ways to visualize and work with our UVs in Blender and each behave and
display slightly differently.
And this is the keep UVs and mesh selection in sync option, which is this little button
that you can see down in the header here of the image editor.
So this option is disabled by default, and I encourage you to get used to the differences.
This option is actually very helpful because as the name of it suggests, it allows us to
visualize which faces on the model belong to which faces in the UV map.
And currently we don't have this enabled.
And you can see that while we have this face selected in the UV map, it's not really giving
us any clue as to what face that might be over in the 3D view.
So if we just enable that now, you can see that we've got all of our faces selected as
we needed when we didn't have that option enabled to be able to see our UVs.
And now what we can do is we can switch to face select mode and then say select this
top face.
And now we can see that this is the face that this corresponds to in the UV map.
And similarly, if we're trying to track down something particular on the sides, this face
here turns out that it's this face over here in this UV island.
So let's just give ourselves a tiny bit more space just to expand out the image editor's
header bar here.
And with this option enabled, it might be a little bit more intuitive as to the way that
this is working.
When we disable it, you'll notice that we have actually got this option here, which
is to do with the sticky selection mode.
So now you'll see that we've disabled it.
The only bit of UVs that are showing up happen to be the face that we have selected in the
view.
So this is kind of a way in which we can kind of isolate UVs and just work on particular
areas.
But there's still another way in which we can do that with the mesh selection in sync.
So if we enable that and then press shift H, we can hide everything in our 3D view.
And that's going to correspond to everything in the image editor as well in our UV editor.
And then we can go alt H just to bring everything back.
So let's press A to deselect everything.
And let's take a look at one more thing.
So if I go control tab and switch to vertex select mode and just select that vertex here,
currently our mesh selection is in sync.
And if I try to start moving this particular selected vertex now, you'll notice that the
corresponding vertex up on that top shell is actually moving as well.
So this is an instance where we might actually like to disable the mesh selection being in
sync with what we're looking at there and then come over to here, select everything
with the A key.
And then if we select this vertex here and start to move it around, you can see we can
just isolate essentially that one particular UV, if you like, rather than moving its corresponding
point on that shell.
If we wanted to change that behavior, by the way, we can actually come down to the sticky
selection mode and just swap it from being shared location to shared vertex.
And now when we select that vertex again, you can see that it's kind of behaving like
it did when the UV selection was in sync.
Also, another thing is you'll notice that we have vertices, edges, faces and islands
to be able to select in this mode.
But if we enable our mesh selection to be in sync, you'll notice that we don't actually
have the island selection anymore here, we've just got the vertex edge and face.
So I think that should give us enough information to start unwrapping our model and then we'll
cover some more topics as we go in a more practical setting.