- [Voiceover] We'll now build a simple shading network
in the function graph.
We've got a material assigned to the rock island already.
Let's select it, and in the object properties,
right-click and edit material.
First let's rename it.
This is going to be a displacement material.
I'm gonna call it rock displace,
and set the scale to one.
In the highlights tab, I don't actually want any
shiny specular highlights.
I'll set the highlight color to black.
Click on this color sample,
and then choose black from one of these palette items.
Click okay, and now we'll have no highlights.
Go over to color and alpha and we've already got
a graph producing the diffused color.
We're going to completely replace that with our own graph.
Right-click on the color production sample
and choose edit function,
and in the function editor we're going to keep
all of these input and output nodes
but we want to erase what's here.
Drag a selection rectangle around those three nodes
and press the delete key.
We'll create our function from scratch.
Right-click to create a new node.
Choose fractal, variable roughness fractal
and it's automatically connected to position.
We want to modulate the color of this
and the node for that is a color map.
Click to deselect, right-click to create another node
and under color, choose color map.
And we want to connect this as well.
Press the plus signs to open up these nodes.
Connect the altitude of the variable roughness fractal
to the input of the color.
And on the right we have the color output that is
feeding the material and we want to connect that to
this color output on our map node.
Click and drag from the output node to the color map node.
And now that's connected.
And we can now do a test render just
to see what this looks like.
Click okay and test render in the main camera view.
Once that render finishes we can see that the color map
is clearly a green tint.
Let's go back into our function,
right-click and choose edit function.
And now let's change the fractal parameters,
select the variable roughness node
and the noise type we're going to change to
other patterns, granite.
And now we have a granite pattern there.
To break up the pattern a bit we can enable width rotation.
Turn on the check box,
and we want it to be stretched vertically too.
Set the wave length in Z to five.
And now it's stretched vertically.
We've got the largest and smallest feature
and this is an easy way for us to determine the
size of the noise based upon the object
and this is in meters.
I want the largest feature to be 30 meters in size.
And the smallest feature to be one meter.
The roughness is the overall chaos or detail.
Gonna bring that up to a value of point seven.
And the gain is the strength of that texture,
I'll reduce that down to about point five or so.
So that we can see the effects of these
other controls over here.
Variable roughness allows certain parts of the material
to be flat or smooth.
And we'll set the smooth level to a positive point five.
The influence is the strength of that effect.
I'm gonna reduce that to positive point five.
And then local influence and creep in cause the flat
area to be flatter and I want to limit that
so I'll set both local influence and creep in to zero.
And that's a pretty good granite texture but it's got
too much contrast so let's now reduce the gain a bit more.
Set that down to a value of zero point one.
And it's a pretty subtle effect there.
I've done some test renders with these settings already
so I know that I want to adjust the filter
to increase the contrast.
Right-click that filter icon and choose edit filter
and as we saw in previous movies,
we can zoom in and out with control and right mouse
and pan around with right mouse.
And create some points on here.
Select and click new key point
and you'll also probably want to enable smooth curve
and start editing that and observing how that
effects the contrast down here.
I've adjusted that granite filter curve a bit
and we can click okay, and now observe
the results in our rendering.
Click okay to exit the function editor
and do another test render.
And if we look closely at our rendering
we can see that the texture is stretched vertically.
That's a good start to a granite texture.
In the next movie we will look at combining that
with other effects such as cracks,
and defining the color based upon the slope of the object.