Welcome to texture.
Painting in the viewport in this video.
You create a hand painted texture directly onto your model and will be creating a diffused map from
scratch.
Of course we can create other maps as well but we'll leave that until later Ron.
So let's hop straight on over in a blender.
Okay so we're back over in blender on the default blend file.
I'm going to go ahead and we're going to play with this painting on something a bit more exciting than
the cube so someone go get rid of that cube and in a mesh that is Suzanne the monkey.
Now I'm going to add a bit more detail on Suzanne so I'm going to go to the modifiers tab open the properties
window add a subdivision surface modifier at level 2 and then click apply.
So we've got some extra geometry now to work with and turn on smooth shading So it is nice and smooth.
And I want to paint it.
Now usually what we would do is we'd create an unwrap of our model and then create an image to paint
on.
But there is an alternative way to do that and we'll go ahead and do that now.
So what we can do is we can go into paint mode on 3D Ed So here we go.
We've got textured panes at the very top.
But go ahead and click on that.
It won't do anything for the moment I'll just go there's bright white colour on the tool shelf itself
we can see that we can add simple uv's so got to go ahead and click that and then we can add a paint
slot.
Wow okay that's incredibly powerful.
So I'm going to go down here and pick diffuse colour and this will add a texture slot straightaway I'm
going to call this monkey bass because it's going to be the bass killer for our monkey.
Now that we've done that we can literally grab our brush and start painting straightaway on Suzanne
the monkey.
And that is as you can see incredibly powerful allows us to paint over our entire model regardless of
where the U.S. unwrap has decided to play scenes.
So that has it's a huge amount of benefits.
Now of course if we decide that we want to paint on the image itself we can do that.
I'm just going to open up a another window here of a frame and go into the u.b. image editor.
Now it doesn't seem like there's anything there at the moment we do need to select the image itself
and there we go we've got monkey base to see that's where we've drawn over.
Now of course if I wanted to paint the whole thing a base colour I would say we actually do over in
the UV image rather than on the monkey because as you can probably see already as we're painting it
it literally just is the bit that's facing us.
Anything that's not facing us stays unpainted whereas in the U.S. image ever we can pay everything very
quickly so I can change TV image editor to paint mode.
And I think I can just start painting Yes I'm just going to turn my brush strength up and unlit shirt
and go over the entire thing very quickly or indeed I can apply the entire colour to be image of I want
to.
But there we go back no time at all.
We've managed to paint the whole of Suzanne white lunch to minimize that's backed down so I just got
an idea of.
Incidentally have a look at the movie unwrap there that's a relatively clean unwrap in terms of I can
see all of the details.
What I can't see of course is how they all joined together I think that's probably the top of the head.
That's the bit around me.
Eyes may be I don't know.
There's there's lots of distortion happening here where I can't follow v.v. Map.
Now following the V map is only really important if you're going to be painting onto it rather than
painting on the model itself.
So there's pros and cons to working both ways.
Incidentally if we wanted to paint a pupil in here there's a couple of ways that we could do that so
we use a pupil as an example swap it around to a black colour come to here.
I've got to make sure my brushes right roughly the right size and click a couple of times.
And there we go we've generated a pupil.
Now another way we could do that with a bit more control is to turn on in the textured paint mode.
We can turn on face selection masking when we click that we can actually go in and right click and we
see that the display is changed ever so slightly we can right click a certain amount of faces.
We can also select the faces whilst we're in edit mode as well.
So I'm going to expand my selection here by going to select and select more or less and we can see the
short cut there is control a number pad plus or control number pad minus to actually select more and
we can see that expands the selection.
So let's try that again controller a plus.
And that's that's it.
That's all I'm going to do now then hop back in to texture paint.
And I can literally now whiz over it and it's masked off from the rest of our image.
So two different effects there see one soft and one's got this sharp edge around where the faces are.
But you can see how incredibly powerful that is.
Now of course we can use this to not only paint the diffuse smap so but to also paint a black and white
image as to where things are specular and where things are not.
Now of course you'll have to play with the images and set up a node system to do that.
But I think that's a good challenge for you.
Nice.
Okay so I'd like you to go ahead and paint on Suzanne.
So you will need to create a new image and apply that image to the model and various ways of doing that.
Do whichever way is easiest for yourself and remember you're probably going to be painting a value if
you're controlling something like a Closs shader.
So ultimately what I'd like you to do here is paint on Suzanne to define another shader So perhaps make
her eyes glossy or perhaps make another part of her glossy or even made of glass.
You know there's lots of options that you could do you can pick a shader of your choice.
I'm going to probably use the gloss shader.
So go ahead a video now and give it a go.
Okay guys.
Welcome back.
Let's go paint a controlled texture so we control another shader forces out.
Okay so I have saved my file there now I'm going to add a bit more detail to this before I rush ahead
and do anything else simply because it's not going to show up too well if I don't there's going to be
really rough and ready and we're going to need at an a Brownie colour for Suzanne it doesn't have to
be quite that.
There we go.
I like that one.
Winner wrap up the brush size here and quickly go over.
Make it all one colour.
Looking good.
Okay.
Now we just need to do the eyes.
So I'm going to go in to edit mode here.
And I'm gone just select everything that's to do with the now because the eye is actually a separate
mesh.
I can hit the L key and it selects everything that's linked and I'm going to hold down Shift and hover
the cursor over the next.
And also press l is that kind of work for me.
No just press L again.
Okay.
So now that we've got these two areas selected are going to hop back in so textured paint switch around
to the white and just colour in those eyes.
Now of course over on this side I can just have a very quick look.
Oh wow look it's actually separated out the eyes in two.
Wow.
Several areas you can see here how this isn't perhaps the best way of making sure you've got colour
all over the place because you do have to move around a model lots and there may be times when that's
not.
I'm not actually doing that entire model that you want.
Now I have done that.
I'm going to change that colour to black.
Let's make this window a bit larger and make this a tiny bit smaller so we can go in and add a rough
pupil obviously that's not the best people in the world but there we go.
In fact I could have added an iris in there as well but I'm not going to leave it kind of cartoony like
that.
So the next thing that I'm going to do is go ahead and make a nother image.
Well first of all let's see and make sure this one saved some monkey base we got a star next image so
it's not safe.
Let's go to savours image.
And I've already obviously been through here and I've called it monkey base.
I need another image called Monkey gloss something to go ahead and create that new image.
Call it monkey gloss and then you can use a shader of your own whatever you want.
And of course now we need to make sure that that is what we're painting on.
So I'm going to go into oh go see rendered mode.
What's that looking like.
And I don't think that's applied there so we're going to have to go over to the Textus tab.
I'm going to switch to textured mode here so we can see what's going on.
We're going to text the tab here and swap over monkey base or image texture here.
And that's what this over to monkey gloss.
And then we're painting on the gloss now because this is a Blackey calls no gloss and a white equals
full gloss.
The eyes are still selected So this is a great time where I can paint white.
Now this is a good question here whether I go fully white which you say 100 percent gloss when we use
the shaver or at 50 percent.
Now I want a bit more control so I'm going to use a maths node in a moment to control how much is applied.
But I'm just going to say where it's white.
I just wanted glossy and I'll control the amount of CLOs later on.
So just go around here.
There we go.
So the eyes now have 100 percent on them so we just need to make sure that we've saved that image as
well.
That is important.
If I close down a blender or it crashes at this point and those aren't saved that will cause me some
issues.
So now that I have these areas defined it's time to open up a node editor.
And I'm going to hop over into rended mode here so I can see what's going on underneath.
As always.
I'm going to make my scene a little brighter with a lamp in the scene at the moment.
And they use a sun lamp here.
I'm just going to rotate it round so the face is illuminated so you can see what's going on.
That's pretty good.
And I'm just going to move round here so I can see our model as well.
Okay.
That is good enough.
Enough of me faffing about here.
So I need to go into the node edit now and just control how that's looking.
So this is what the material looks like at the moment.
Have we got our material applied yessing on to make this a monkey material and we can see that that's
what we're working on.
So the first thing we need to do is make sure we've got the two textures loaded in someone to duplicate
the image texture node.
So we're going to have the monkey gloss and the monkey base of the top one I'm going to have the gloss
and the bottom one.
I'm going to have as the base the top one being a control texture.
It's not a colour it's not colour data.
Now those at the moment do not have any coordinates.
We've not told blender how to apply those.
We've got a U V map unwrap and that's what we've been painting with.
So I suggest we use that's going to go ahead and add an input of texture coordinate and I'm going to
go ahead here and take the U V output into the vector input so that defines how the image is mapped.
Now we're going to need to shaders here at these few shader.
And a gloss shade some going to go ahead and add in a gloss shader so shader loss.
There we go.
Glossy and I'm going to have to mix these two together so shader mix mix mix mix we go.
It's going to add those in.
Now I'm not sure which order I'm going to put them in at the moment but let use the colour to define
the factor of the kloss shader bass.
So in a plug the colour in.
Let's see how that comes out.
Okay that's actually the right way round.
In this particular case because we can see that the eye has gone glossy.
So let's change the colour output of the image itself the brown and the black.
There we go there.
So that's all very well and good but what is not happening here is this is just gone 100 percent glossy
which isn't necessarily what I want to do I want to control the amount of gloss.
So what we can do here is a mathematical operation and I'm going to multiply the colour out by a value
less than 1 so if I multiplied it by half it probably.
This allows us to control how much of a grey scale we're using there.
There are several other ways we could do that as well.
I'm going to try putting in a maths maths maths that will be under converter maths soon a pop that in
and we're not adding things together.
We are let's go down here multiplying we could divide I suppose a well.
Now if we changed this value here we can see that it's going between 100 percent obviously one a half
will make it's actually shine through.
The other thing we can do here of course is plug in the colour into the colour of wood gloss as well
to help it come across.
Now I've got control over how shiny The eye is.
The base colours obviously controlling the rest of it.
Now what else can we do here where we can change that to glass on it's going to change that now and
see what that looks like and with a move that out add a new shader in here in glass because and behind
I is kind of like a glass isn't it.
So let's pop that in and see how that comes across.
And what that doesn't come across quite as well as I was expecting someone to remove that again and
go back in and add in another shader that's go in and put the gorcey one back.
Pluck the colorin.
So there we go.
So now we can control the amount of glossiness is applied to the.
Itself with the base colour coming across there and that is looking pretty good.
Now imagine the applications for all of this and there's no structure of course can get as complicated
or as simple as you'd like it to.
I think that looks pretty good and we've been able to control this gloss with some degree of accuracy.
How do you guys get on.
Did you decide to paint some other bits on Suzanne and change how they look as well.
Did you choose some different materials and different shade types.
Please share in the discussions and I'll see you guys in the next lecture.