Welcome to texture's without transparency in this video you will import an image with out a transparent
layer which means no alpha Channel.
We're going to understand that this is useful if you have no image editing software to hand no time
to process a load of images or just trying out images for your textures.
So what is our offer.
Well basically an image contains an alpha Channel.
Each pixel is represented Additionally by a numerical value which specifies the opacity of that pixel
in how four channels 100 percent or a value of one specifies it's being opaque and zero or zero percent
or zero specifies a transparent pixel i.e. it emits nothing is completely transparent.
Now we must understand that this is not the best way is I ideal to have a solid coloured background
with these images.
It is 100 percent black or 100 percent white to help separate the image from the background.
White is better because your image itself may contain black and we don't want to make anything that's
dark in the limited transparence.
Now it would be best if your images are processed to include an alpha or a transparency channel.
So then we have the red green blue and alpha.
So RG be a.
That's what that little acronym you'll see dotted about the place means.
Okay so now we've discussed those bits.
Let's hop over and see this in blender.
Okay so back over in blender.
Let's go ahead and import the image that does have a background image.
So let's move these to grass.
Plant out the way and centre the 3D cursor and go ahead and add a mesh as an image as planes go into
the next nature's pack and the grass blade would background.
Gee peg and if we go to the thumb now you can see it's quite clearly here now.
This one here.
And if a grass blade 01 or grass blazer a three are actually the same image I have gone in with an image
editing software and created the PRNG for it.
But we go into play now with the background and essentially use Blender itself to create a mask to basically
do the job of Alpher ring.
To make that white background transparent.
So let's open up the image and see what we've got now.
I think at this point in time we can bring in our our nodes that we know he works.
Some of the deletes the diffuse shader.
And I'm going to add in the one we've already built the transparence be STF.
Oh no not that one.
I do apologize.
I can't remember what I've called it is a very good idea to remember what you've call things.
How embarrassing.
In fact the easiest way of quickly checking it is called Make.
Okay so let's go in and search for make.
Perhaps I should have put transparent at the front.
Important when your naming files that you obviously remember what you name their name I forgot what
I've named in five minutes ago.
Oh my word.
So let's link these things together.
So the colorin and the shader out and we should get the image appearing.
And what we're going to do is break out this group here.
We've got a a factor here going up and down because there's nothing actually plugged in at the moment
and this factor was going to control the transparency so because it set at zero It means that it's completely
transparent.
If you remember a value of zero means that the alpha channel lets everything through it's completely
transparent.
And if we set that's whole one then we see the image in its full glory.
Now we can't use the alpha channel of the image text because it doesn't have one it's as simple as that's
a J plague.
It's outputting R G B red green and blue pixels and that's it.
So we're going to have to create our own.
Alpher chenowith sensually how we can use the colour coming out of here to do that.
First of all let's expand our group here.
So once the group is selected we're going to have to edit it slightly so let's go into node and ungroup
and you can see the shortcut key there is often G and that will break it apart again into its various
parts.
So before when we had the colour coming through into the diffuse shader here and coming out into our
surface material that's flowing through here now the transparence one isn't doing anything at the moment
because it doesn't know what to mix in fact it's just is it's transparent and if we move this up and
down it just makes our image our whole image transparent or not.
So I'm going to have to add something using the colour channel itself into this chain to control this
factor.
We're going to have to essentially make our own mask.
So let's see what happens when we move the colour into the factor.
Let's just try that so makes it go black.
That's good because that means that we will if we play around with these we can see that the colour
itself has some influence over what's shown and what's not what becomes black and white so there is
some information there that we can use.
So with that in mind what we've got to consider here is how what do we need to link in from the colour.
And what do we need to come out in order to make our mask.
Well if the image is white here we need any think that's probably less than white.
And remember a white on the value of nought to 1 is 1 on red green and blue.
It's 100 percent red 100 percent green 100 percent blue.
Anything that's less than 100 percent.
We can leave on an anything that's higher than that can be transparent.
So I've got a challenge for you with that in mind.
I would like you to make the white background transparent.
Now you will need a maths node for this change the Node 2 an appropriate type.
Think about what needs to be done to that white background what does it need and make the white background
transparency you may have to change the value in order to make nice neat or even zoom into the image
to make sure that you've not gone over the top.
So pause video now and give this ago.
Okay guys.
Welcome back.
Before we hop over into blender you did give this a go right.
I know it's quite tricky.
The maths now looks complicated if you haven't paused video again and do give it a go for the rest of
you.
Let's hop straight on over into blender and link all of these things up.
So we're going to use the colour channel coming out of here to control this factor at the moment just
to bring the whole image and I know we need a maths node and I've told you that as well because otherwise
finding it is a difficult.
So searching for maths for that's what I've done before so let's bring up the maths node where the reason
why it's a bit of a pain to search for is simply because it's not called what you need it to be called.
So I'm just going to plumb in the colour to the value and this value here coming out.
In fact I'm going to look at straight what I'm generating first of all so I'm going to see the mask
I'm creating because I've cut off the output is now showing me exactly what's going on with this at
the moment.
And now I want this white surface anything that's this white surface and it is less than white or greater
than black or something to be right so let's try less than whites to begin with.
So let's go down to less than.
Excellent.
So let's play with this value here and see what it does.
So obviously a value of minus 18 is not going to be great.
Let's start at zero and just click this one.
Times are images appearing when we're doing that.
That's looking great.
So let's just keep upping it.
And when it our There we go when it reaches one.
It's not complete.
I bet every ticket one further the whole thing goes white.
Okay.
So I think this is the setting we need which is looking really good and obviously at some point we're
going to lose the image itself.
So by plugging the value and back into the factor and then the shader output to the surface are that's
looking really good.
Let's zoom into the surface and see how it's looking now I've got a value here of points 6.
And if I turn up eventually the edges get really fuzzy.
Now obviously if there's anything that is pure white on our image it can start to eat away so this edge
here is actually quite light.
So if we go too low on this value it starts to put gaps in our image and that is no good.
We see there that part of our image is now missing and up here in fact there's a whole section missing.
So let's go up and that's about 50 percent at the moments that's increased a little more.
I think that area at the top there's thin anyway so by the looks of things about a value a point six
seems to look quite good.
Excellent.
Do try this with other images you've got to go out and grab something take a photo of it against a white
background and see how it comes across in blender.
Do share your blade of grass in the discussions and I will see you in the next lecture.