Node-Based Materials for Cinema 4D’s Physical Render [New in C4D R20]

Cinema 4D Release 20 includes an all-new
node-based material system and nodal editor which you can use to build
complex shaders for the standard and physical render engine. Now there’s over
150 different basic nodes here and you can combine them in
almost an endless number of ways, so rather than show you all of the
different possibilities i’m going to show you a basic setup to give you an
idea of how the system works. And what we’re going to do is build out a texture
for these lollipops. I wanted to generate random colors for these lollipops using
the new MoGraph Field Color system but I needed to generate complementary
colors for the various stripes on the lollipops. So for that we can use the
nodal system. I’m going to start by creating a new node material and we’ll
apply it to our object in the same way as always, and the big difference here is
that once you double click on a node material you’re going to get the node
editor rather than a material editor. And by default here you have the end
material node as well as a diffuse color node. Now this material node works almost
identically with the Reflectance channel of Cinema 4D so we can add a number of
additional layers on top of this diffuse layer or replace the diffuse layer in
order to get a glossy appearance. So for instance I’m going to add an additional
BSDF layer and we’ll go into the node here and change the BSDF type to
Beckmann, set the fresnel to dielectric and increase the fresnel in order to
make this a glossier material. Now here on the diffuse channel we can go in and
adjust the color if we’d like. We can also feed this color with a node, and
there’s this new node attribute dot next to all of these parameters. If you click
on this you can see different options for connecting textures or various nodes
to this particular input and in this case I’m just going to feed in a direct
color. So now we have a unique node here that we can use to
control the color of this material. Now what I want to do is build out the
gradient for our lollipop stripes. So in order to quickly find nodes that you’re
looking for the easiest thing to do is click the assets title bar here and it
opens up a search box. And you can just begin typing and you can see here that
we have two nodes or assets that are related to a gradient. We have a basic
gradient and then a little bit more complex one so I’m just going to drag
the basic gradient here into the scene. And you can see that the gradient itself
has gotten a lot of nice improvements in Release 20. You can multiple select knots
and change those as a group. You can shift-select in order to select multiple
knots and then double the selected knots for instance. We can easily change the
interpolation of all the knots say to a stepped pattern and we can distribute
those knots. So lots of really nice possibilities here with the gradient, and
of course you still have access to the full preset system that Cinema 4D has
always had to access our built-in gradients as well as your own. So I’m
just going to grab one of these six striped gradients in order to get started, and
I’m just going to delete this last knot because we’re not going to need it. And
what I’m going to do is feed this color into the first knot of the gradient – and
this should be a blue color here. And what I want to do now is feed the result
of the gradient into my diffuse. Now in order to see the gradient a little bit
better let’s go ahead and right click here and change the preview to a double
torus. And we can change that on the diffuse layer as well here. So what I
want to do now is generate complementary colors to this one color that I have
already created. So the way I can generate analogous colors is simply by
adding 30 degrees of hue. So let’s go ahead and type hue into the
the asset list here. And you can see that we don’t have any nodes called Hue, but
a number of nodes have popped up that have Hue parameters or some relation to
Hue. So it becomes much easier to find the node that you’re looking for. And in
this case we need the Color Correction node. I’m just going to drag that out here
and we’ll wire a connection from the color into the color input and from this
color output into our second knot. And now over here in the attributes I’m just
going to set the hue to 30 degrees. Now another way we can do the same thing is
wire from the color port into the knot, and then we can drag the color
correction port over that wire. And you see that the wire is going to be
highlighted here. When we release the mouse it’s automatically going to insert
that new node in that existing connection. So now we can easily set this
to a hue of 60 degrees. Another way that we can add a new node is again using
these node dots. So if I select this third knot here I can go to the node dot
here ,and go down to connect node, and color>color correction. And you can see
that now we have a new color correction node. And I’m going to set this to 90
degrees and feed its color input to our source color. Now things are starting to
get a little bit busy here in our node editor, but I can simplify this by
selecting all of these and hiding all of the ports. And now each of these nodes is
going take up much less space. Let’s go ahead and drag out a another wire here,
and this time what I’m going to do is right click and choose insert converter,
and go to color and color correction. And this works just like dragging the node
into the wire so now we’ll increase the hue here by 120 degrees.
And finally we’ll just duplicate this last node and wire the color input, and
if I just drop over the preview area it’s going to give me options for which
input I want to add. So I’ll choose color and then I will drag from color here
over the preview area and I can choose between the output ports and here we’ll
set this to 150. So now you can see that we’ve got all of the analogous colors
for this one blue color, and we can easily change the source color in order
to get different combinations. And that’s exactly what we’re going to do with the
MoGraph color field. What I can do to simplify this setup here is go ahead and
group it. So I’m just gonna select all five of these nodes, all six of these
nodes, right click and choose group nodes. And now I have a single color harmonies
node that takes an input color and outputs a gradient result with the six
stripes. What we need now is the grid or the white stripes that fit in between
each of these colors. So for that I’m going to use a grid node. Another easy way
you can create a node is by simply hitting C here in the node editor and
that’s going to pull up a commander-type window. And we can type grid and simply
add that to the node system. And we’ll go ahead and set the grid to a thickness of
0 and 0 on the y and the z axes, so we’re just creating some vertical lines here.
And we want to go ahead and use six lines total and you can see that we can
adjust the thickness and softness of those lines. We’ll go ahead and leave
those as they are for now but what I want to do is go ahead and add
these two together – basically doing an add blend mode. So I’m going to type add over
here in the assets list, and you can see that we don’t have a direct add node but
we have blending or layering nodes. I just need to add these two together so I
don’t need a full layer node. I’m going to drag a blend node in instead. And you can
see that because I had typed add, it automatically chose the add blend mode
for me. If I type screen you’ll see that we also get a blend node, and if I add it
there I get a blend note that’s already set up for the screen mode. So this is
just one of those handy things that makes it fast to work with the new node
editor. I’m going to drag the color here into the foreground, and I’m going to drag
my gradient into the background. And now we get our white stripes on top of the
node. I just need to output this into my diffuse color. So that’s my basic
lollipop stripes material and the next thing I want to do is actually add some
displacement. So I can drag this same grid and put it into the displacement
channel, although I do need to adapt this black and white image into a vector that
the displacement channel is going to use. So I can right click on this wire, insert
a converter, and we want to add a displacement map converter. You can see
that that turns this into an RGB image and our displacement is currently
going in the wrong direction, so we’ll go into the material and I’m going to go
ahead and first set the displacement height to something like 0.25 and then
in the displacement map node I’m going to set this to maybe negative 30%. Now what
I want to do is add a little bit more variation onto the surface – some dents
and whatnot because it’s not a perfect lollipop. And so for that I’m going to
add in some noise, and you can see again we’ve got a number of different noise
nodes to work with. We’ve got a basic noise and then a little bit more complex
noise that has some of the parameters that you’re used to having in the noise
shader. So I’m going to use this more complex noise this time and I’m just
going to layer that with my grid. So in this case we do want to create a layer
node and that will allow us to add a lot of additional noises if we want for more
variation. So we’ll go ahead and drop the result of this into the displacement map
and I’m going drag my grid into the first layer. I’ll take my noise and add
it as the second layer and here in the layers I’m just going to add these two
together. Now the noise itself I’m going to go ahead and change to a dense noise
pattern. I want to reduce the size of this quite a bit and I’m also going to
drop down the octaves in order to simplify the noise. I can of course pull
up the preview window to see what things are looking like. I want to bring this
edge one up, basically to increase the lower clipping and eliminate some of my
dents. And that looks like a pretty good start. I’m just going drop the overall amount / opacity of this layer a little bit
so that the dents are a little less prominent. Now one other nice feature of
this nodal system is this context, which allows you to adjust the texture at
different points within the nodal system. So for instance you can use this
to reproject the UVs or transform the UVs. We can go in here and feed this in
in order to rotate for instance the entire setup. But what I’m going to do here
instead is simply distort the UVs in order to add a little bit more of
imperfection. So I’m gonna feed the result of the distorter into the context
field and then I want to feed a noise into the direction field. So I’m going to
type in noise and we’ll drag the noise in and feed its result
into the direction. Now you can see that it’s super randomized, but what I’m going to
do here is simply go in and change this to a displaced turbulence and increase
the length here of the noise so that it’s a little bit less so. Let’s also
increase the edge parameter here in order to simplify the noise a bit more
and we’ll reduce the overall strength of this distortion. And you can see if you
look at the preview closely we’re getting just a little bit of variation
here in the width of each of the lollipop stripes. Now finally we haven’t
actually fed the MoGraph Color in so this is currently rendering with all of
the lollipops looking exactly the same. So all we need to do now is type in
MoGraph into our asset list and drag that node out, and we’re going to feed
the color from MoGraph here into the Color Harmony instead of our base color.
And now you can see that we get all of our various MoGraph colors creating
harmonious lollipop stripes. That’s just a taste of all the sweet possibilities
in store with Cinema 4D Release 20. Make sure to watch our complete Cineversity
playlist to find out more, and if you’re excited about node-based materials
please like and share this video.


Add a Comment

Your email address will not be published. Required fields are marked *