Vous êtes sur la page 1sur 31

Making advance node connections The node book

Making a realistic looking material with nodes can be a struggle if you start from scratch. With
all the connections, a node tree can look overwhelming and confusing. As long you know what
you do and how it works, nodes are one of the greatest things in Blender to make every
material you can imagine.

Why this extra document

As many students experience, a video with explanation can still be confusing, it feels like the
teacher connects and you just follows what he is doing without having any idea what you do. If
you experience this during the node setup, this document will help you understanding nodes in
Blender. Its a guide that helps you with understanding the system.

1. What is a node

When cycles* was launched in 2011, Blender introduced the material node* system. Before you
only used nodes in the compositor* and tweaked the materials in the right material tab. With
the introduction of nodes for the materials, you had more visual control on the way you
tweaked a material.

Image shows a basic node setup when adding a new material.

When you add an object and select a new material, a basic node tree will pop-up in your node
editor. It starts with a Diffuse* and a Material Output* node. When you are new with Blender or
3D, terms like node and diffuse sounds like empty words. Lets start with an explanation what
these things are.

A node is nothing more than a connection. Something goos in, and something gets out. Some
nodes only have an output, some only have an input, its really that simple. Some nodes have a
collection of serval inputs or outputs, all have a short description and colors.

1|Page
Making advance node connections The node book

When you look at the node connection points, some have different colors. These colors are not
random, they all have a function.

Yellow: Color data maps

Grey: Used for numeric data like values from 0 to 1

Blue: Mapping data like texture coordinates or normal information.

Green: Shader* data

When you start building a node tree, this is key information to get an understanding how to
start and how to use nodes to make a material setup.

2. What is a Shader

The best explanation of a shader is the way light and shadow react on the material. Its a
computer term, but we can recognize nodes on how they react on light.

The most common used shaders in this course are Diffuse, Glossy, Translucent, Emission, mix
shader & add shader.

To get an overview how shaders look in Cycles I show some samples with explanation on
behavior.

Diffuse Shader

2|Page
Making advance node connections The node book

This shader has no reflections, its the standard shader you start with. You can add roughness
for a more rough look.

By default the roughness has a value of 0, you get a soft/bright diffused look

Turning the roughness to 1 makes the object darker, less soft

Why using the diffuse shader: It works good for materials like news paper, plaster and other
rough walls. The diffuse shader is also used for mixing with other shaders. Why adding
roughness? Think about cloths, or sand. These materials needs more roughness.

Glossy Shader

The glossy shader is used for reflecting the light in the scene.

3|Page
Making advance node connections The node book

Standard value of glossy is 0.2 you get a soft reflection of the environment

A value of 0 is fully reflective with the environment

A value of 1.0 looks like a diffuse shader with no reflections

4|Page
Making advance node connections The node book

These two shaders are the core of making materials in this environment course. By mixing
these shaders you can make a lot of material variation. In chapter three we focus on the wood
material and we make an advance node tree.

Before we focus more on the complex node tree, I like to show some simple setups that shows
some basic mixing. We start with the diffuse/glossy mix. For this we use the Mix shader.

Mix Shader

You can add a mix shader by: Add add shader mix shader

The function of the mix shader is exactly what it says, we mix multiple shaders to get one final
output. The diffuse and glossy both have an green output. Just drag these in the mix shader
output and you are ready to do some mixing.

Looks the same as a standard glossy shader, but now with lots of extra functions

5|Page
Making advance node connections The node book

Now we have a diffuse and a glossy mix, we also have 3 different sliders to play with the looks.
Dont get to confused on this, just play with some values to see what is happening. It is very
important you get an idea what is happening.

As you can see the mix shader has a slider as well. When you drag this slider to the left it is
100% diffuse, drag this to the right and you get a 100% glossy effect.

A mix shader value of 1 shows a full glossy effect. Of course with the value of the glossy
roughness what is 0.2

Now we have a very powerful tool to make some nice variations. Before I start with adding
textures, we make some other combinations. As you can see, the Diffuse and Glossy shader
both have a color input. Without a texture, you can change the look of color by changing it
from with to a color of your choise. Lets start with a red Diffuse and put the mix shader back to
0.5

6|Page
Making advance node connections The node book

You get a nice blending effect between red diffuse and the with specular on the front.

Now we do the opposite and make the diffuse shader white and change the glossy to red.

Changing the glossy to a red color shows red reflections and a white diffuse color on the
sphere.

This is a simple way of playing with diffuse and glossy by blending some colors. No we know the
basics of this mixing, we do another experiment.

7|Page
Making advance node connections The node book

Sometimes you want some more controll on how your material looks like. For example, I like
to have some rondom red spots on the sphere without reflection. For this we need two new
nodes. The first one I use is the noise texture: Add texture noise Texture. I also want a
color ramp node: Add Converter ColorRamp

Two new nodes without connection

Noise Node

The noise nodes add random color patterns on your object. There are three sliders named

- Scale
- Detail
- Distortion

In this course we only use the scale and detail to play with the patterns.

Color Ramp

The color ramp is a converter. Color date comes in, and you get some control on how you want
to use it. We use the yellow color output to make a connection with a shader. In the following
setup I use the Diffuse shader.

When we ignore the color ramp, you can see random colors on the sphere.

8|Page
Making advance node connections The node book

When you ignore the color ramp its not possible to have color control. You can change the size
and details, but if you want red and green, there is no way you can change that. This is when a
ColorRamp us usefull. We put it between the noise texture and the diffuse shader.

No more rainbow colors, only black and white.

Now we want a green and a red color to make a nice mix. When you take a closer look at the
color ramp, you can see two sliders. When you click on one of them, you can change the color.
We make the left one green and the right one red.

We now have a nice blending color of red and green.

9|Page
Making advance node connections The node book

I like to see some hard blending, for this we need to slide the sliders to the middle. You can
also use other variations, but this is the most common one to explain this way of blending.

The red and green are now hard blended and some nice shapes are visible.

You maybe ask yourself, that looks cool, but what is the function of all this. They key thing
behind this method is making mask maps. The green and red are just simple samples to make
color variations, but there is way more possible with this method. In the following samples I
will demonstrate this.

First we focus on something else. When we take a closer look at the Mix Shader, you can see a
grey data input. Right now we use a 50/50 mix. With this fac input we can tell the sahder
what kind of data information it needs to use to make an output. The 50/50 mix just makes a
random blend, but what if we only want the red area to be reflected and the green to be
diffuse.

For this we need to work with a mask map. A mask is a black and with map with a pattern. You
can use it for a lot of things, we will use it as a specular map.

Before we start with the mask, I like to show what happens when we put the data from the red
and green color ramp into the fac from the mix shader.

10 | P a g e
Making advance node connections The node book

This is the wrong way of making a mask. The red is still a bit reflective

The problem in the setup above is that red and green are not the right colors for a mask. Black
and white is like 1 and 0. Red and green is like .2 and .8

What we need to do next is disconnection the connection between the ColorRamp and the
Diffuse shader. Now pick a red color for the glossy and the green color for the Diffuse. Click the
with color and pick the green and red color from the ramp to get exact the same color data.

Now we change the color from the ramp to black and white. Do not move the sliders, only a
color change. When this is done, you connect the color data from the ramp with the fac of the
Mix Shader.

This is how the setup looks like when you have a working mask

11 | P a g e
Making advance node connections The node book

Texture maps

Now we know the basics of nodes and shaders, we take a closer look how to combine textures
to get a nice looking material. Before we make a new node setup, I like to introduce some type
of textures.

Diffuse texture

Diffuse texture, flat without shading

The diffuse texture is by far the most important one. You can build scenes with this base
texture and it will look nice.

The cool thing about high resolution textures is the data they have hidden datainside. When
you look at a 1024 by 1024 texture, the data is poor and I do not recommend to use it for high
quality scenes. When you have a texture that has a size of 2048 by 2048, it gets interesting.
4096 by 4096 is the most used format in my scenes nowadays, but 2048 is good as well.

You maybe think, hidden data ? yes, by this I mean specular maps, bump maps and normal
maps. All terms you maybe never heard of it, but this document will explain all the details so
you know how this works. I cant show you how I make these maps, but when using Google you
will find out quickly. Downloading crazy bump is usefull as well, but it has its downsides.

Specular texture

12 | P a g e
Making advance node connections The node book

Specular map, works as a mask map

When tweaking the difuse map in a paint software program, you can get these small details out
of it. The image is very dark with a little bit of white details. When you combine this in the
node editor you will get small reflections on the white area. I will demonstrate this later

Bump texture

Bump texture, adding rough details on the material

The bump texture can be used to add rough details. When looking at wood, it can look like a
rough surface. This map helps you to get a rough look. I will demonstrate this in a sample later.

Normal texture

13 | P a g e
Making advance node connections The node book

Normal map, it is hard to see, but this ads 3D data on the material

The normal map is a smart way of faking a 3D look. When making scene you always need to
optimize your objects and save some vertices. The use of a normal map helps you a lot. In the
following sample I will demonstrate how a normal map works.

Take a look at the following sample, you can see a plane with a cone object.

A plane and a cone, together they count 63 vertices

When you have a close up of this scene, a normal map will not be very usefull. However, when
you see it from a distance, a normal map works perfect.

14 | P a g e
Making advance node connections The node book

Converting the scene to a normal map looks like this.

Now we remove the cone from the scene and only keep the plane . when combining the normal
map you get the following result:

On the left the scene without cone, on the right a top view render that shows a 3d effect.

How the normal maps needs to be applied will be shown in the following node setup. We try to
make a wood material including the Diffuse, Specular, Bump and Normal map.

Creating a Wood material

15 | P a g e
Making advance node connections The node book

We start with adding the sphere and make a UV sphere unwrap. We need the UV coordinates to
work with texture maps. If you dont know how this works, watch Chapter two to follow the
explanation.

New setup, unwrapped sphere with a clean material setup.

We start with adding the image texture: add texture Image Texture. We select the
diffuse wood texture and combine this with the yellow Diffuse shader input.

The sphere including a wood diffuse texture.

Now its time to combine a normal and a bump map. I will show step by step what kind of
effect the maps have on the output. By this way you get a better understanding why you use
some maps and not simple connect without the background knowledge.

16 | P a g e
Making advance node connections The node book

We start with the Bump map. You can duplicate the image texture, or add a new one. Now you
select the wood bump texture and change the color to non color data. This is because we do
not use the color data information, but only the black and white info to make a rough look.

To get an idea what kind of effect the bump map has on the sphere, we disconnect the image
texture from the diffuse shader and we make a node setup for the bump to see the raw output.
Later we combine everything together.

The bump texture works the best with a bump node. This means we need to add a new node in
our tree. Go to add vector Bump to add the bump node.

We need the following setup to experiment with bump and normal textures.

As you can see, the bump node has a couple of inputs and one output.

- Strength: the intensity of the rough look


- Distance: displays the tallest point of the bump map.
- Height: here is where you input your texture
- Normal: when you have a normal map, you can connect it to this input.

We start with connecting the bump texture with the height of the bump map. Now you can
see a rough wood bump structure on the sphere. I use a strength value of .2/.3 to get a
nice rough look. I leave the Distance on 0.1, simply because increasing it will have no
effect on the looks. Making this 0 will remove the bump effect.

17 | P a g e
Making advance node connections The node book

A nice bump effect is visible on the sphere. The squares are result of the low poly mesh,
nothing to worry about.

To continue we focus on the normal map. Duplicate the texture again, leave it on Non
Colordata and load the normal texture.

We need to add a new node, this one is called Normal Map Add Vector Normal Map.
This normal node comes with two inputs. A strength and a normal map input. You can also
switch between spaces, I use the default one, simply because this is the most
recommended one. You can play with the strength, but leaving it to 1 will be fine in this
setup. Sometimes a normal map can be really strong, in these scenarios I lower the
strength.

To find out what kind of effect the normal map has on the sphere, disconnect the bump
node from the diffuse input and connect the normal node with the Diffuse node to see the
raw output.

A preview how the raw output of the normal maps looks like on the sphere

Now we can put everything together and focus on the specular map. As you can see the
bump and the normal both have a mapping output. The bump map includes also a mapping
input, we use this input to combine it with the normal node. We connect the bump

18 | P a g e
Making advance node connections The node book

mapping with the diffuse mapping input ( blue dot) most important of all is combining the
diffuse texture with the diffuse shader.

The basic node setup of a normal and bump texture map.

There are many types of wood, and every wood material needs his own style and setup. For
this sample I like to add a little bit of reflection with the specular map.

Right now we use the Diffuse Shader, I like to add the Glossy Shader to add some reflective
wood on the material. We also need to add a mix shader to combine them.

How you mix a glossy and a diffuse shader. The fac makes a 50/50 mix

19 | P a g e
Making advance node connections The node book

To continue this process I like to copy one of the texture images and select the spec
texture. Drag the color output in the fac of the mix shader to get a reflective look. Dont
forget to switch from color to non color data

The reflection works better with the specular map

One problem with the setup we made is the way of controlling the intensity of the
reflection. In some scenes you want a little bit of reflection on the wood, not what we just
created. Fr this we need a sort of slider to have full control. You can archive this by adding
a mix color node*: Add Color Mix RGB

The mix RGB has 3 inputs, 2 color and 1 fac. This allow you to make nice color variations,
or to mix textures. I like to use this mix node to have control on the specular and make a
sort of mask.

Place the mix node between the output of the specular map and the mix shader. As you can
see you now have a slider and a white color. This mix only works when you change the
white color to a black color. Now it has a mask function. You maybe ask yourself, why black
and not white? When we use the white color it mix the spec map with a white color. This
way the function of the spec map is gone. We want full black and only some little white
data to get the effect we want. This is why black keeps the spec map in a original state.

Having a slider between the spec map and the fac input allows more control in secularity

20 | P a g e
Making advance node connections The node book

We now created the basic setup of a wood material. From a flat look we transformed it to a
rough reflecting material without adding extra vertices. This shows the power of working
with nodes including some texture layers. This only works with high quality textures from
2048 and above. Always avoid 1024 and lower.

Creating an advance wood Material

When you are looking for more detail on your material, Blender can provide lots of options
to improve the looks. Your object contains a lot of data, with the node system you can
make use some of these data to add extra details.

In the following sample we will focus on side scratches and mixing textures to create a
mossy look. I replace the sphere with a cube object. I add extra vertices to get more data
information on the corners. Without these vertices its not possible to work with the
pointiness. I also made a cubemap projection to get all the UV coordinates.

By adding extra vertices it allows you to receive data information from the cube

The next thing we need to do is add the pointiness node: Add Input Geometry This
Geometry node allows you to receive data from your object to transform this into a visual
output. There are a lot of output and no input in this node. In this environment node book
we will cover the Pointiness and the Backfacing output.

So what is pointiness? A simple explanation is an export of pointy information. Looking at


the cube, the pointiness has information we can use to add dirt on the corners, a sort of a
dirt map. To get a nice result with some control, I also use a color ramp, noise texture and
two mix RGB nodes.

21 | P a g e
Making advance node connections The node book

All the nodes we need to make a node combination for the pointiness dirt

To make the setup we start with placing the pointiness in the left bottom of the node tree,
create some space to make the connections. Now you connect the pointiness output with
the fac of the color ramp.

This is how the node setup looks like when we start.

Right now, nothing will happen. We have a color ramp color output and we need to put this
somewhere to connect. This is a point where you can get confused when working with
nodes, but everything has logic and I will show you how to combine this new tree in our
existing setup.

As you can see we have some new color information. When looking at our base node setup,
there is no input where we can combine this color data. Maybe some of you think, the
glossy has an empty input, why not use this one.

That will never work, we work with color data that has no link with glossy, so we need to
take a look at the diffuse node. This one is already taken by the image texture. This is a
perfect situation to use the color mix. Drag the mix node between the diffuse shader and
the image texture.

22 | P a g e
Making advance node connections The node book

The cube turns white, but we now have a new color input

Now we can connect the color ramp with this color mix. As you can see, nothing really
changes when combining the color ramp. A simple explanation is that the color ramp
replaces the mix, we need to make some additions to receive data from the pointiness. We
can do that by bringing the sliders of the color ramp together. I have to admit that this is a
process that takes a bit of time to get it right. I like a sharp line, but some people like a
more thick line. Play with it to get the result you want.

Bringing the sliders together will show the pointiness information

As you can see the cube turns a bit dark. This is because we use the standard mix node.
When clicking on mix you can change the way you blend the colors. In my opinion screen
works the best. Feel free to use some other combinations, this is a personal choise.

23 | P a g e
Making advance node connections The node book

Changing the mix to screen makes the cube more bright.

We can change the white color by selecting the color ramp and change the white to a color
you prefer. By clicking the plus icon we add an extra slider. This allows you to make some
color variation. I like to have a green and yellow color.

We now have a mossy dirt layer on the corners.

24 | P a g e
Making advance node connections The node book

To get a more random pattern in the moss, we need to use the noise node and another
color ramp to archive this. The idea behind the noise texture is making a noise mask by
combining this with a color ramp and use this color data for the Fac input of the
screen/mix node. Right now the screen/mix fac is 50/50, we can use this input to change
to look to a more realistic pattern.

The color ramp we use for the noise node needs to have both sliders in the middle. Also
this depends on taste and looks, so play with it for a result that fits.

Change the noise texture values for different types of patterns

The only thing thats left is adding a mix node between the pointiness color ramp and the
screen/mix shader. Use it as a mask by changing the white color to black and now you can
use the slider to fade the moss to a level that you prefer.

The final look of the pointiness setup.

25 | P a g e
Making advance node connections The node book

I like to make another step by mixing a moss texture on the cube material. Right now we
have some moss dirt on the corners, but moss on the sides will look nice as well.

The way we do that is adding a new image texture node, a noise texture node, Mix RGB and
a color ramp. If you like you can copy and paste some existing nodes, but adding new ones
is good as well. Make some space to add the new nodes, I like to put them on top of the
node tree.

Preparing the new nodes for a moss mix

We continue by selecting the image texture node and add a moss texture. We need to mix
this with the wood texture, for this we use the Mix RGB node. Make some space in your
node tree so you combine these two textures with the mix node.

Mixing two textures with a mix node

26 | P a g e
Making advance node connections The node book

Again we have the option to add variation on the moss mix. We now have a standard 50/50
blending, we can change this by combining the noise texture and color ramp in the Fac of
the mix node. Keep in mind that the color ramp has a black and white mix.

The noise texture adds a nice pattern of moss on the cube.

Try out some values on the noise texture. I use a scale of 2 and a detail of 6. Feel free to
use other values.

When you look at the pointiness, the green color is to bright and looks not in contrast with
the moss texture. Now we can use the slider from the pointiness tree for blending it
together.

You can also change some colors from the pointiness ramp to blend the moss and the dirt
layer, feel free to try some variations.

The moss and pointiness dirt blending together

27 | P a g e
Making advance node connections The node book

To finish the wood material, we can make some additions on the bump. Right now the moss
looks a bit flat, we can change that by dragging the color data from the moss mask in the
strength of the bump node. The bump will be visible on the moss, but fade away from the
wood texture. To keep the bump effect on the wood you have to move the sliders from the
moss color ramp. Also lower the bump distance to a value of .01 to avoid a rough look.

The moss is more saturated and has more bump

The final wood material

28 | P a g e
Making advance node connections The node book

Making node groups

The wood material node setup shows how we can edit the looks by combining nodes with each
other. As you probably have seen, the tree can looks complex the more nodes you combine.
Blender has a tool to make groups and simplify the looks. This is key when building a large tree
with multiple mix layers. Keeping in track with your work is very important, in the following
sample I show how to make a small tree, including all the options for tweaking the wood
material.

To make a group you first need to make a selection of nodes you want to combine. I like to
make the following selection:

- Specular group Spec map image, mix node, Glossy Shader


- Moss group Color ramp, noise texture, moss texture
- Bump group Bump node, Normal Map, Bump texture, normal texture
- Pointiness group Geometry, Color ramp, Mix node, noise texture, colorramp.

To make the first group we need to hold the Shift key and press the right mouse button to
make a selection.

The nodes appear to be orange when making a selection

The next thig we do is group the selection in a node group. Go to the bottom tab and select
node Node Group

How you make the group

29 | P a g e
Making advance node connections The node book

The next thing we see is a new screen with two extra nodes. Group Input and Group Output.
This screen shows the selection in a new node tree without all the other nodes connected. The
node input shows unseen input connections, the output shows unseen output selections. The
output shows that the glossy is connected with a Shader node and the mix with a color data
input. The input is empty, this is because we had no input in the image texture and glossy
node.

New tab with the selected nodes

To close this window we press Tab. As you can see we now have one node, exactly what we
want. It is important to name your node group, you can do this by selecting the tekst
NodeGroup and typ Speculuarity

A single node what has a group function for specularity

To make tweaks, select the node and press Tab. You will open the settings to make changes.
You can recognize node groups by the right icon on top of the node.

Repeat this process for the other groups. In the end you will have some mix and screen nodes
left, this is no problem.

30 | P a g e
Making advance node connections The node book

If everything works out, you have a simple tree that is easy to adjust.

The final node tree in a group system.

The node combination we created for the wood Material is one of the most used in this course.
The way you mix and blend textures is a powerful tool and allows you to make amazing
materials.

Although its a complex system thats not only about making connections. You need to play
with the settings to get a result that you like. Everyone has a different taste, so using the same
values is not the way of making original materials. I recommend to play with it and feel free to
make some weird combinations. This way you get used with the logic and looks of materials.

31 | P a g e

Vous aimerez peut-être aussi