|
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 3 |
Figure 4 |
Figure 5 |
| 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 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 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). |
||
|
| 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.
|
|
| 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.
|
|
| 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) .
|
|
| 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.
|
|
Color Menu |
|
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. |
|
|
| 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). |
||
|
| 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. |
|
|
| 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. |
|
|
| 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. |
|
|
| 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. |
|
|
| Math Coming Soon! |
| Vector Math Coming Soon! |
| Squeeze Value Coming Soon! |
|
|
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. |
||
|