- [Voiceover] To finish our chapter
on materials, let's add a mixed material
to the rocks so that they will be a different material
above the water line than they are below.
We got that for free in our pebbles material
that we loaded in from the stock presets,
now we're going to create one from scratch.
Select the rock island object,
right-click to edit its material,
and convert it from a simple material,
up here with a pull-down list,
choose mixed material,
and now the top level is a mixed material
and below that we have two simple materials.
Let's rename this top level one,
I'll call it rock displace altitude mix.
And then just duplicate one of these onto the other.
We'll select the rock displace,
right-click and copy the layer,
then select the new blank material,
right-click and paste.
I know, actually, in advance,
that the top level, here,
is the one that's going to be below the water line,
so I can go ahead and rename that now,
to rock displace dark.
And call this one, just rock displace.
Selecting rock displace dark,
I can now edit the color map.
Right-click and choose Edit Color Map.
We can delete some of these key colors,
especially the ones that are bright green.
And the ones that remain, we can change their colors
to be much darker and more saturated.
Bring that luminance down, and also
bring the saturation down quite a lot.
I've edited that color map,
click OK to close that material color window,
and the rock displace dark is quite a lot darker now.
If we go up to the top level of the altitude mix,
we don't really see a good blend yet.
All we're seeing is a 50/50 mix between these.
We want a blend based upon some spatial parameter,
in this case, altitude.
To do that, we want to put a function
into the distribution of materials one and two.
Right-click and choose Edit Function.
The simplest thing we can do is just
connect the altitude to the distribution.
Click on Distribution and drag over to altitude,
then select the altitude node,
and change the altitude type to
Relative to C.
And once that's been done,
if we go back over to our advanced material editor,
we can see that we've got a very dark material
below the water line.
Cool.
So we've got something.
Let's click OK to exit the function editor.
Let's soften that up bit.
Increase the smooth blending strip up to 100%,
and with a simple blend mode,
that's a pretty good result.
We can probably brighten this material up a bit,
and it's kind of too dark there,
but we're getting the result that we want.
However, if we render this now,
what will happen is the bottom half of this gradient
will be below the water line,
and we're losing that full transition.
I want to shift this up by one meter.
To do that, I'll go back into the function graph,
right-click on the distribution of materials one and two,
and choose edit function.
We'll just add a constant value to the altitude.
Right-click and create a constant,
Constant number.
And also a simple add node,
left-click to deselect that node,
and then right-click to create a new node,
and this is going to be a simple adder,
under Combiner, Add.
And just connect these up.
Open up the add node,
connect the constant to one of the inputs,
and the altitude to the other input,
and then the output of that add
will feed the distribution node,
so click on distribution and drag over
to the output of the add node.
And now we've got a constant number
connected to the altitude,
and we'll preview that.
You can see the results here with a constant value of zero.
If I set it to a value of two,
and then wait for a moment for it to refresh,
you see that it's moved down a bit,
a value of positive two moved down by two meters.
To move it up above the water line,
I'll give it a value of negative one.
Okay, so that is our function for distribution.
The last thing we would want to do
is go back to our dark material
and make it not quite so dark.
Right-click and edit that color map,
and maybe brighten up some of these a bit.
Having increased that brightness,
close the material color window,
and back up at the top level of our mixed material,
we've got pretty much the result that we want now,
a nice blend that shifted up by one meter.
Click OK to close the material editor,
and we'll render another camera view.
Make that nice and big, and then
make sure that we are rendering in Ultra-quality,
so right-click and choose Ultra if you need to,
and sit back and wait for the final render
of our material chapter.
Okay, and we can clearly see now
that we're mixing material on the rock face.
Everything below that line is a dark brown color,
just like the soil of the procedural terrain.
Cool.
So that's how it's done.
We create materials in the function graph.
We could use bitmap materials as well,
but I've chosen to take a fully procedural approach here,
and VUE certainly excels in that domain.