- [Instructor] The ApplyMaterial node
allows you to add the same material
to all the pieces of geometry
that share the same material property.
While the Phong node was inserted above the geometry,
the ApplyMaterial node is inserted below the geometry.
Then a shader is connected to its input
to provide all the material
that's to be applied to the geometry.
Now we saw our Phong shader in the previous video
hooked up like this to separate inputs,
but we can take the training wheels off.
'Cause in the real world,
you would put all three inputs into the Read node like this.
Of course that was a little confusing,
so I set up the little dots for you
to make it easier to follow the first time around.
The first thing we need to do
is to collect all of our geometry
into one single, logical entity.
Merge them into a group, if you will.
And the way we do that,
we come over to our 3D,
modify, and select MergeGeo.
The MergeGeo node allows you to merge all the geometry
into one single group.
And it'll take any number of inputs.
You can keep pulling out a new one here
or stick the arrow in there.
There, now all of this geometry
is merged into one single geometric object.
Next, with the MergeGeo node selected,
we'll add the ApplyMaterial node.
Come over to our 3D popup, Shader, ApplyMaterial.
Now we're not seeing any render yet over here
because we don't have any materiel hooked up yet.
So we have to hook up the material input to a material.
In this case, we use our Phong shader
to generate the material and voila.
Now we can open up the Phong shader and dial it in,
knowing that whatever we dial in is going to be given
to all the different pieces of geometry.
So we have a single control for everything.
Also note that if there were any shaders upstream
attached to any of these pieces of geometry,
the ApplyMaterial will override them.
The Phong shader and the ApplyMaterial nodes
allow you to quickly assign materials to your 3D geometry
and dial them in for photorealistic results.
In the next video, we'll see another shader
that you will definitely want to know about
because it's the shader that does camera projection.