♪♪♪
Zak Parrish: We are back. In the last video,
we got the wood broken up into
a series of panels by combining two (2) Normal maps together.
We adjusted the Base Color a little bit to create some
darkening in the location of the gaps in those panels.
Now I want to get a little bit clever with the Base Color,
so that
we can create the effect of some
of these wooden panels having different colors.
As a recap if we take a look at this ceramic tile Sample Texture, it is broken up
into a series of channels. Here is the Red channel, which just shows the gaps.
Here is the Green channel, which shows some of the tiles selected.
Here is the Blue channel, which shows some other tiles selected.
We are going to make use of that information.
Let's go back over to MyMaterial in the Material Editor. We are
going to do that with a couple different Linear Interpolate nodes,
but we are going to chain them together.
I am trying to think of the best way to do this.
I like this. Let's start off
by just making a Linear Interpolate
that goes between the original color of the wood
and another color we would like to change.
It could be of any value we want. We will make a node that holds a random color,
and we will set it up that way. For starters,
let's move our nodes around a little bit. This wood Texture Sample
defines the actual color of our wood. Now let's make a node
that holds another value. If you remember, we called that
a 3 vector. You can hold down the 3 key, and click
to create a 3 vector. Let's
use a mostly saturated red.
Something about like that. We have a Red value.
Here is where things start to get a little bit fun.
We don't want our red panels to
just be red. We still want them to maintain
at least a little bit of the actual
wood texture. We still want something to make
them feel a little more wooden.
Hang on, I am going to back up. I am going to
over complicate this material way too quickly. We will just go between red and
wood right now. If I just plug red into Base Color,
the Normal map is still going to give us
some nice indentations. It looks kind of like wood. We could get
kind of clever and combine colors in a lot of different ways, but I will avoid
that just to keep this video from going off the deep end. I do really like it
when videos go off the deep end. Let's combine these
together via a Linear Interpolate node. Hold down the L key and left-click.
We will say that the
color for black, which is the value for A,
will be our original wood. Plug in the RGB output of the Texture Sample into A.
Plug the red paint output into B. Now, wires are going to start crossing.
Things are going to start getting a little bit messy. Don't let that alarm you.
That is pretty common. That is going to happen. Now, we need
something to drive Alpha. We are going to use the Green channel,
which just allowed us to select some of the tiles from this result.
Plug in the Green channel to Alpha. Let's take a look at our final result.
You can see, it is mostly wood with some of the panels
selected and turned red. We could plug this straight
into our Base Color. Howver, the problem is we
lost that color we were getting in between each one of the tiles.
Instead of plugging the Lerp output into Base Color, we are going to plug
Base Color into the result of our Multiply node. Plug the output of the Lerp
right into B. It is actually going to replace where that
wood Texture Sample was plugged in. I will try to space things out
so you can at least see where all the wires are going.
Some of these tiles have now been painted red.
I wasn't going to do this, but I am going to
do it now anyway. Drag a wire off our red color.
Type and select, "Multiply". Select the Red channel of the wood Texture Sample.
This is just a grayscale. If you want to preview it real quick,
we can come into the wood texture and just show the Red channel.
There is what the Red channel looks like. It is just a gray that still has a lot of
the detail from the wood grain in it. Plug the Red channel from the wood Texture Sample
into the B of the Multiply node. We will plug the
result into the B of the Linear Interpolate node. Take a look at
what the result does. Now we get some darkening in those red panels.
In effect, it would give them a lot more life.
Again, this is done by multiplying the Red channel from the Texture Sample
by the red color, plugging the result of that into the B
input of our Lerp, and then plugging the Lerp into
the B input of our final Multiply node. If you're not scared yet,
don't worry. The material is still very simple. If you want to pause for just a
second or do a little bit of rewinding and catch up, you can totally do that.
The next thing we are going to do is take a few more of these tiles and make them
an entirely different color. To do this, we are going to chain together
another Linear Interpolate.
I just want to point this out. If you don't like how all of these wires
are starting to go everywhere and cross over, and it if it is becoming
visually confusing, you can take something like
a Texture Sample node and create a duplicate of it.
Since it is just a Texture reference, that doesn't cost you anything.
We could plug the Red channel into the B of the Multiply, and now
we don't have those overlapping wires. That could look a little bit cleaner.
If you like working that way, you are certainly welcome to do so.
For instance, we could take this Texture Sample here. We could use
this wood Texture Sample if we wanted to. Drag off the RGB output and plug it
into the A, so that now we don't have quite so much
overlapping. The only catch is we also need to make sure our
TexCoord drove this wood Texture Sample because now we have
two (2) different copies of that wood. I just want to drive home that you can
reorganize things by reusing references to a single texture,
if you like to work that way. It is entirely up to you.
If it is a little less visually confusing to do that, then you can do that.
Next, we are going to use the Blue channel
of this Texture Sample, which is really just another selection of panels.
We are going to linear interpolate between the result of
this Lerp and another color.
Let's start off by creating our other color. Hold down the 3 key and left-click
once more. Let's make this one some shade of blue.
Make it a little bit desaturated.
Keep it mostly pretty high on the Value, but something about like that.
Here is our blue color. I want to multiply that
by the Red channel, just like we did a second ago. Again if you want to,
you can duplicate your Texture Sample.
There is nothing wrong with this.
Drag off the output of the blue color, type and select, "Multiply".
Plug in the Red channel of the wood Texture Sample to the B of the Multiply.
There you go. Now, we need
to create a new Linear Interpolate node.
Drag a wire off this first Lerp,
type "Lerp", and press Enter.
This will be our value for black. It is already plugged into A,
which is perfect. Drag off the result of the Multiply and plug it into B of the Lerp.
If we want to, we can right-click and select Start Previewing Node.
It looks like that actually painted
most things blue, which is not exactly what I wanted
to be perfectly honest. Oh wait, I am not driving Alpha. Oh well.
You are welcome to laugh at me if you want. Drag off the Blue channel and plug
that into Alpha. Some panels are blue, other panels are red,
and some panels are made of plain old wood.
Now, let's start moving some things around to make space.
I am marquee selecting, and then sliding these around.
Right-click on the Lerp and select Stop Previewing Node.
Drag off the Lerp and plug it into the B input of our Multiply node.
There we go.
Now, we have different colored wood panels scattered across the surface.
Okay. We are at 10 minutes in.
Let's go ahead and take another break. When we come back,
we will comment this node network to make it a little easier
for people to understand what is going on. Then, we will add a little
bit of optional emission to make the grout areas
glow a bit. That is going to wrap things up for this video. Thanks a lot.
♪♪♪