Intro
Node Basics
Sockets
Node Controls

Output Menu

Output

Input Menu

Material
Camera Data
Value
RGB
Texture
Geometry

Color Menu

Mix
RGB Curves

Vector Menu

Normal
Mapping
Vector Curves

Converters Menu

ColorRamp
RGB to BW
Math
Vector Math
Squeeze Value

Groups Menu

Of Note

 

(Material Nodes)

Intro

I tried to make a video tutorial of this topic... oh did I try. But this subject could be talked about for hours, literally. So I decided instead to give a run down of the material nodes available to use and how they can be used. By no means have I covered the extent to which material nodes can be utilized, see the Blender release notes for some general discussion and some amazing material work. Take my advice, go and read this and download the .blend files there right now and study them... it's okay, I'll wait. Okay, your back, onto the discussion.

In order to "get" this tutorial you should already be familiar with general material concepts and how to create materials/textures using the material panel. You should also have a general understanding of the texture coordinate systems available in Blender (e.g. Orco, UV, etc.). Also, when reading this I intend to purposely skip aspects of a node because in later sections you will see the function expanded upon. Each section builds off the previous.

I will begin by saying that the node system does not render the material pane obsolete. Many features and material settings are still only accessible through the material panel (e.g. raymirror). However with the advent of nodes, more complex and fantastic materials can be created since we now have greater control. So lets begin with a normal material (fig 1). Here we have the standard material we have added to a cube mesh. I could, as I have in the past, add color and other settings to this material and it would certainly look nice. But lets say I am just not getting what I am looking for? What if I what to control the creation more tightly or add more complexity? Here is where nodes comes in.

First lets enter the node editor (fig 2) and make sure that the node editor has the material node button (the sphere icon) pressed (fig 3), not the composite node button. Lets take the base material (fig 1) and hit the node button next to the material name in the material panel or the node editor. You will see a change in the material panel (fig 4). What you have just done is told Blender to make the material you were on (in this case "Final Material") to become the node tree (hence the new name - "NT:" versus "MA:"). Under the node tree you can see that it is asking you to add a new material (fig 4). Once you do (fig 5) you will create a material ("MA:") that is under node tree. It is important to note that you can add a new material (which you can edit and change like any other material in the material panel), add an already created material or append a material from another blender file, and also use the material that you used to create the node tree

 

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Node Basics
Nodes are added in two ways to the node editor window. By clicking the Add menu in the node editors toolbar and picking which node you want to add, or by having your cursor in the node editor window and clicking the Spacebar and picking your from the Add menu.

Sockets
Each Node in your node window will have "sockets" which are colored dots to which input data and output data will be linked (fig 6). There are three colors: Yellow, Grey, and Blue/Purple. Yellow indicates that color information needs to be input or color information will be out put from the node. Grey indicates values (numeric)/alpha information. Blue/Purple indicates vector/coordinate/vector information. Between nodes, yellow must be linked to yellow, gray to gray, blue to blue, unless you use a converter which we'll cover later on. Next to the color in the node you will see the name of that socket. Though not always the case, I see these as what the information is *intended* to be, not necessarily what it *has* to be - for example, I can add a link from an gray socket titled "Alpha" to the material node's gray "Reflection" socket and still get a result, they key thing being that it's a gray to gray connection. You link between sockets by clicking the socket and left click and hold to drag the thread to another socket, you then let go once you reach the corresponding socket. To break a link between sockets left click and hold and drag a box around any part (it can be really small) to break the link. From output sockets, multiple threads can extracted and attached to many nodes (fig 7). However only a single thread can be link to an input socket.

Figure 6

Figure 7

Node Controls
At the top of most of the nodes, there are 4 visual controls for the node (fig 8).
The arrow on the left collapses the node entirely (fig 9).
The plus sign collapses all sockets that do not have a thread connected to it (fig 10).
The two squares collapses all the items in a node that have boxes with information in them (fig 11).
The red sphere collapses the viewing window (if the node has one) (fig12).
The latter three can be used in varying combinations with each other. The arrow that collapses the entire node can only be used in combination with the plus sign (fig 13).

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

After adding a material to the node tree, two nodes will appear in the node editor - a material node, and an output node. Let's start with the output node (fig 14) which is in the Output group of the Add menu.

Output Menu
Output
The output node is the output of any color or alpha based information. It has two input sockets, and no output sockets. This node is used to view the result of a node branch at any point with a color or alpha output (fig 15). The first added Output is the Output used for rendering, with a red sphere icon on the Node to indicate this. Notice in the figure that the purple sphere has the red colored sphere which indicates that this is what material you will see when you render the image. This is often used to see the result of various node combinations as well as viewing the final material result.

Attached to the output node that was generated when you hit the nodes button in the material panel is a material node which I think is one of the two key foundations of material nodes (the other being Mix below).

 

Figure 14

Figure 15

Input Menu
Material
The material node (fig 15a) consists of 4 input sockets (2 color, 1 value, and one normal) and three output sockets (1 color, 1 alpha, and one normal). You have the option to input or choose from a color picker the diffuse color and specular color. These color types can be turned off (i.e. not resolved in the material) by the buttons Diff and Spec in this node. As I mentioned before, to access more material options the material panel should be used (like the use of different diffuse and specular shader or raymirror options). You can add new materials to a material node using the selection box (fig 15b) The reflection input can be linked or you can set the reflectivity manually by using the arrows or entering a value manually. The normal input can be linked or you can edit the XYZ settings by clicking the Normal box. There is also the Neg N button which inverts the normals (I've used this when I add a texture to create bump and it's bumping the wrong way and I show it being used below).

Figure 15a

Figure 15b

Camera Data
Coming Soon!
 
Value
The Value node has a single value output socket. The value can be adjusted typing in a value or using the arrows to adjust it. In the image (fig 16) you can see the Value input in action driving the alpha channel of an Output node.

 

 

Figure 16

RGB
The RGB node has a single color output socket and is basically a color picker. In the image (fig 17) I am using the RGB node to drive both the diffuse and specular color of the material. In this case it's useful because if I want both colors the same I don't have to go into each color picker of the input socket, change both, and fiddle with the controls to ensure I get the exact same color. I can just use the RGB node quickly and easily.

 

 

Figure 17

Texture
The Texture node is similar to the material node in that you pick a resource, from the Blender panel, in this case, a texture created in the texture panel. The texture node is used to apply textures to materials. It has a single vector input socket to attach the coordinate system you would like the texture to use. It also has three output sockets, so the texture can drive a value, color, or normal. In the example (fig 18), I am using the "stripes" texture to control the alpha of the output node. I use two texture to drive two different channels below (figure 21a) .

 

 

Figure 18

Geometry
The Geometry node is equivalent to the Map Input (fig 19) of the material panel. It has six vector/coordinate/normal output sockets allowing you to utilize various coordinate systems for applying textures. In the example I use for the Texture node (fig 18) I use the object's (the object to which the material is being applied) Orco coordinate as the map input. Most of the time, a Texture node will need a Geometry node.

 

 

Figure 19

Color Menu
Mix
The Mix node is where the real magic of nodes starts to be realized. This node mixes to colors based on the factor (Fac). Color 1 uses the factor value to determine the level that Color 2 affects the result. So with Fac at 0.00 makes Color 2 have no effect on the result, whereas a Fac of 1.00 make Color 1 have no effect on the result. Mix has numerous blend modes (fig 20) to change to output of mix. It's also important to note that the Fac value can be driven by a link to a value output socket from another node. I show here (fig 21) how I use a texture map to dictate how the two colors should be mixed. Pure white is equivalent to the Fac value of 0.00 and black is equivalent to 1.00, and gray colors are every value in between. You can see another example where I am using two textures, one to drive the mixing, the other to frive the normals of a material (fig 21a). Notice that I'm using the node controls to minimize what I see of them since I don't need to see the sockets I am not using nor do I need to see the texture/material picker menu since I already have what I want.

Figure 20

Figure 21

Figure 21a

RGB Curves
The RGB Curves node is fairly self explanatory. You can input color information (or use a color from the picker) and manipulate the color channels to modify a color linked to the output channel. I have an example of how you can use this (fig 22). In this example I use the RGB curves to modify the textures color to make it have a little more contrast. You might be thinking I could have down that to the texture in the material pane, but with this method I can use the original texture for other things and just use the contrasted one for a single purpose.

Figure 22

Vector Menu
Normal
The Normal node is used to get a fixed normal or to output a dot product with this normal. And a dot product is? "In mathematics, the dot product, also known as the scalar product, is a binary operation which takes two vectors over the real numbers R and returns a real-valued scalar quantity. Thus it is the standard inner product of the Euclidean space." Which makes zero sense to me. The way I see it is as a fancy way of saying that the dot product will output a value that has to do with a normal of the object and the normal coming directly out of the camera. I have an example that will make it quite clear (fig23). Here we have two colors being mixed, with the top color being red and the bottom being blue (I know, they're compressed but trust me that that's what's in there). I am using a ColorRamp (which I discuss below) to control the dot product and make the result stronger. What will happen when we animate this object and the camera spins around it, is that object normals not facing the camera directly or close to directly will have a red color, and normals of the object pointing towards the camera will be blue. All those normals facing at angles in between will cause a mixing of the two. You can also change the Dot product by clicking on the sphere in the Normal node and moving it (fig23a). And the Dot doesn't have to be plugged into the Fac of a mix node either, try hooking it into the reflectivity of a material, an alpha channel, or even the color and specular sockets of a material (with the ColorRamp to change the intensity of the effect).

Figure 23

Figure 23a

Mapping
The Mapping node can be used to clamp/translate/rotate/scale Vectors or Colors. In the example (fig 24) you can see that I have taken a texture and modified it using the Mapping node compared to the same texture without mapping. You can use the to tweak the mapping to get it just the way you like it.

Figure 24

Vector Curves
Similar in principle to RGB Curves, vector curves modify the X, Y, and Z rather than the R, G, and B. You can see in the example (fig 25) that I used the same texture from the mapping example and hooked a Vector Mapping node to one and manipulated the curves a little to get a very different result. I'll stress that I'm using textures here as an example, you can use this on materials too.

Figure 25

Converters Menu
ColorRamp
Here is the first of two "true" converters. I say "true" because every node is a converter of some kind, but the the ColorRamp will automatically appear anytime you link a value (gray) socket to a color (yellow) socket. The ColorRamp has a single value input and a color and alpha (value) output. The outputs from this node is controlled by the color ramp which we demonstrated for the Normal node (above) as controlling the intensity of the dot product. I also have an example of the color ramp being used to control the alpha channel (fig 26). Of course the texture could do this on it's own, but the ColorRamp give us control over how the Alpha channel is driven by the texture. Of course we can't forget that it's called the color channel and it's capable of being used to generate color in the ramp itself using the node's color picker. Like the color ramp in the material panel you can add more key positions by using Ctrl+ left click and you can delete them by using the Del button in the ramp.

Figure 26

RGB to BW
The second converter is the RGB to BW node which coverts color information to a value (fig 27). This is also a node that will automatically appear if you attempt to link a color output to a value input. In the example, I am using the color result of material node to drive the alpha (value) channel.

Figure 27

Math
Coming Soon!
Vector Math
Coming Soon!
Squeeze Value
Coming Soon!
Groups Menu
Groups are fairly straight forward. You select a number of nodes using the box select (B Key) or by Shift + left clicking the nodes you want included. After you have selected the ones you want grouped you hit Ctrl + G Key and make group. Automatically they will be compressed into a single node (fig 28) - your results will vary from the example depending on what you choose to group. It can look crazy, I know. But you can collapse the group using the controls at the top of the node just like other nodes to shrink it to something manageable (fig 29). To view what's inside the group you can expand the group by clicking the small node icon in the node (where the red sphere is on other nodes) (fig 30) and close the group back up by clicking outside the group window. If you accidentally delete this group or wish to make a copy of it (without using Shift + D Key) by using the Spacebar>Add >Group>GroupName. Even if the group gets deleted it still can be added back with this method, though if you delete it, then close Blender, and re-open it, the group will no longer be accessible. You can't add a group to a group, but you can add another node to a group by using Spacebar > Add when you're cursor is in the group.

Figure 29

 

Figure 28

Figure 30

Of Note
1) If you have a node that has a selector menu (e.g. the Mix node), you can access this menu from the Node Panel in the material panel (fig 31).
2) If you link an output of a node to any socket that drives that output, the thread responsible will turn red (fig 32). This is not advisable to do.
3) You can change the node's viewer object type in the material panel, for instance, in most of my examples I use the standard sphere object, but I also use Suzanne.

Figure 31

Figure 32