So in this tutorial we're going to be going over how to add PBR textures to absolutely
any model in blender.
And of course before we do this we need to make sure that we have some of these textures
downloaded.
So in my case I'm going to get them from my own website which is cgmatter.com.
You can get textures from absolutely anywhere, in this case I'm just going to be using my
own.
I'm going to use this right here.
And then we get the seamless textures for free, at least on this website.
And I'm going to download 2k version and then once you do this it's going to eventually
start downloading.
Of course mine is already downloaded here.
You're going to get an ambient occlusion basecolor height metallic normal and roughness maps.
And we want to know how to add these into a material in blender.
So we can actually close this right here.So how do we add this to our cube?
So we're going to start off my going to shading and we want to have a HDRI so we have some
lighting going on.
So I'm going to change this to world.
And I already made a tutorial on how to add a HDRI, so I'm going to do it quickly.
But I'll try to explain it.
We're going to close this.
We're going to click shift a which is going to let us add a texture.
Environment texture.
We're going to connect this to the surface of the world.
And then we're going to open any HDRI you already have downloaded.
In this case I'll be using this one and then here we go.
Now we actually want to work on the material of the cube.
So how do we do that?
So what you want to do is go over to object.
And by default you should already have a principled bsdf with an output setup.
If you don't you can close whatever material you have.
Click new and it will show up.
If for some reason you don't like that you can just hit shift a.
Go to shader and then add a principle bsdf shader right here.
And then you have the same thing.
Connect those and we're back to square one.
Ok so how do we connect all these maps?
So we're going to go in some kind of order.
So first of all ambient occlusion, this one is special because we actually do not need
it in blender.
This is pretty much calculated on render in cycles and in eevee.
This is more for game engines so we don't actually use this.
So we're going to start with basecolor.
We're just going to drag this in.
And of course basecolor is going to be the color of the cube.
So we're going to take this color and connect it to basecolor.
And there we go, it's showing up.
Next what we want to do is we're going to go to metallic.
We're going to drag this in.
And then one special thing about metallic is you don't want to necessarily take this
and just connect it to metallic because you need to make sure his right here, this color,
is set to non-color data.
And that's because a metallic map is basically supposed to be values between 0 and 1.
Not necessarily the color data.
Ok so we have that.
Next we're going to go over to roughness which same business.
We're going to take it.
We're going to connect it to roughness.
But we want to set this color to non-color data because we want values between 0 and
1.
Next we have, let's see, we can do normal and height.
And for these we kind of combine them in a special way.
I'll show you how.
So we're going to take our normal map.
Bring it in here.
We're going to take our height map, some people call it a displacement map.
These things are generally the same.
And then we put this right here.
So we have these two maps and what I'm going to do is I'm going to set both of these to
non-color data.
This is very important, if you don't do this it's going to look very bizarre.
Ok, now what we need is a bump node.
So just click shift a and in here you can type bump or you can try to find it.
I think it's in vector, bump.
And then in this bump we see we have a normal input and a height input.
So it's pretty obvious what you do.
Take this height, no this one is the height.
Take the height and put it in height.
And note that this normal input is purple while this one is yellow.
This is indicating that this is just an image.
It's a texture, it's not a normal map.
So what we have to do is convert it.
So shift a and here you can either type normal map or go to vector and add a normal map node.
We're going to take this, connect it.
So now we have a normal map.
And then we're going to connect this in here.
And then finally we take this bump node, connect it into our normal socket.
Ok, it's going to take a second.
And already it's looking much more 3D.
Now lets say that these brick are too big.
You want them to tile smaller.
So you want more tiles.
So the question is how do you do this?
What we're going to do is take each of our image inputs and we're going to line them
up.
Take these three, shift them over.
Woops I accidentally shifted over this one too.
And what we want to do is basically change the mapping so that we add twice as much or
three times as many bricks here.
So what we want to do, shift a.
And then you want to add a couple things.
You're going to start off with a mapping node.
So go to vector, mapping.
And then you're going to connect this vector to each of these.
So that's going to be a couple of connections.
Let me close that.
Connect this here.
A bit of work but overall less work then making a shader from scratch.
So we're going to connect all of these.
Ok so now we have this mapping node and we're going to want to change the size.
But before we do that we need to add a coordinate input.
So you're going to click shift a.
And then I believe it's in input, texture coordinates.
And then it depends on what coordinates you're using.
Most of the time you use UV maps.
So we're going to be using a UV map.
There are cases where you use other things but in this case, our cube if you go to UV
editing.
You see that it's already UV mapped so that's why we're using that.
So now we have this coordinate going into this mapping which is going into all our textures
which are doing their respective things.
So how do we actually affect this?
Well you just drag the scale and you see what it's doing already.
So lets double it in both directions.
There we go.
And I don't actually know what the z does.
I think it's irrelevant to this case.
Ya it doesn't do anything, at least I don't think it does anything.
Let's see.
Ya, doesn't do anything.
If we want even more tiles again this is seamless so it's going to work out.
We can have triple as many.
So three times and then this is how you do it.
And of course we have a seam along here because there is a seam in our UV map here.
But generally this is how you do it.
And just to see the full effects, by the way we've been using eevee this whole time.
But again the setup for eevee is identical to that of cycles.
We just switch this over to cycles and you see that everything is working.
Change this to GPU compute.
Goes a bit faster on my computer.
And you see it's already working here.
And if you want to see this lighting change around so you can really see the depth in
the bricks and all this.
Go back to world and we're going to do a similar setup here.
So with our HDRI we're going to add a mapping.
This time I'm just going to type it in.
Add our mapping.
And then we're going to add some coordinates.
So input, texture coordinates.
And in this case I'm pretty sure we use generated not UV.
So that's an instance where you use generated.
And this is actually a case where we use our z input.
I can like rotate this like that and then you see the lighting is changing.
Takes a bit because it's cycles.
We can actually just go back to eevee like that.
And then we can a more fluid motion.
And by the way as I said we don't need ambient occlusion maps.
Cycles obviously does it but eevee you just click ambient occlusion.
And you see these gaps in-between the bricks automatically get their ambient occlusion.
This is how you do PBR in blender.
So again we do not, we do not use ambient occlusion unless you want to do some like
very weird stylistic thing.
It's not physically accurate you don't want to use it.
Basecolor goes in basecolor.
Let's see.
Metallic goes in metallic but set this to non-color.
Roughness and roughness set it to non-color.
You take your normal and height and change your normal to a normal map and then feed
them both into a bump.
And then put this in our normal socket and then we can always change our tiling using
these.
And then one final note is with this bump map.
You can actually control how much this thing is at least looks like it's extruding.
So we can change the strength here and you can see how that works.
Generally you want to keep this at one unless your textures aren't pre-calibrated to already
be exactly what you want.
So again, I used textures from cgmatter.com textures for free if you want them there.
I mean it's an advertisement for my own site but it's free so consider it maybe.
So hopefully this helped.
Thank you for watching.
And hope you learned something.