Understanding node based materials for Blender Cycles


Are you comfortable with setting up materials in Blender's internal renderer but just can't quite figure out nodes for Cycles? I just had an epiphany that I think may help you too.

The realization I had was that the nodes used for Cycles are set up in much the same way that the material and texture panels are set up in Blender Internal! Nodes give you access to (almost) all the same material features youve been setting up all along, they're just displayed in a different visual layout. With nodes, you have the choice of whether to connect the pieces correctly or not, and you get to choose which panels are shown, rather than having them all exposed by default. It's just not obvious how.

Heres the trick: Remember all the panels under Texture in Blender Internal, like mapping and influence? The panels that you tend to collapse and ignore unless you need to change the defaults for things like transparency and bump? Well the node editor is just like that but it’s a blank slate. Using material nodes is like having an empty table, and a bunch of electronic parts stowed away in drawers. They don't do anything unless you know how to wire them up. Theres a drawer for batteries, fans, wires, light bulbs, switches, etc. You could potentially build whatever you want.

When you construct a material using nodes, you have to move all the parts you need to the table, and then link them up in order. In the Materials and Texture panels in Blender Internal, the pieces have always just been there for you, connected correctly by default. Even if you don't tweak a setting, the pieces stay visible, they stay connected, and they stay in proper sequence.

I don't know about you, but I have been struggling to understand the flow of nodes for over a year and resisted diving in because I feel competent using the Blender Internal materials. I've tinkered with nodes, but I wanted them to just instantly work together like puzzle pieces. Like, I wanted to take a color node and plug it into the material node and have color, then add a specular node and get shiny.

I was forgetting everything I had learned about material setup in Blender internal! That's because I assumed that nodes and the materials I'm used to were two completely different things, but they're not. The thing is, putting together a node material IS just as simple as putting together puzzle pieces, but to see the results, you have to make sure all the parts you are used to ignoring are in place, and you have to plug the pieces in in order. What order you ask? The same order they appear in the materials panel in Blender internal! Think about it.

In Blender Internal you add a material to your mesh. You set a diffuse color, adjust specular (glossiness) , and if you have a complicated material, you enable and adjust additional options such as transparency or reflections. Then you add one or more textures if you need them, and you go through the texture panels to adjust how you want each texture to impact the material. You choose how you want the texture mapped, you choose the textures scale, and you choose whether and how much it influences everything else, from color to bump.

Think of setting up a node material as going through the same steps, but without ignoring the parts that you just want to leave default. Generally speaking, even if you want default settings in nodes, you still have to wire up the default bits. It's like deciding to build something with that pile of electronic parts. A working light just needs a battery, a wire, and a bulb. A very basic color node just needs a Diffuse node wired up to the Material Output node. If you want to get fancy and say, add a switch to your light, then you need to imagine the flow of electricity and figure out the proper sequence: battery, switch, bulb. If you want to make adjustments to your materials Specular settings, you have to find the "switch" for that and make sure to add it in the right spot.

So the trick is understanding what the different parts can do and the order you put them together. From there you can construct any kind of material you can imagine. If you know how to render in Cycles and just want to learn how to set up your own materials, you can do this. I recommend referring to guides that have been written to help you understand the capabilities of each of the "parts." (I recommend experimenting too, but that can only get you so far.)

Blender Guru has posted a fantastic pair of resources for just this purpose: the Cycles Shader Encyclopedia http://www.blenderguru.com/articles/cycles-shader-encyclopedia/, and the Cycles Input Encyclopedia http://www.blenderguru.com/articles/cycles-input-encyclopedia/They aren't exhaustive guides on rendering in Cycles, but they explain what you need to know about the parts, so that you can start hooking them up to get the results you want.

Next, I'll explain the construction of my very first node based material, since having this epiphany.

Where the rubber hits the road

Heres the setup:

And the result:

So the first thing I did, of course, was select my mesh. This happened to be an unwrapped UV sphere with some displacement applied, but the UVs didn't really matter since I wound up using generated texture coordinates.

Then I opened a new viewport and changed it to a Node Editor view. I selected Use Nodes at the bottom of the viewport toolbar, and added a new material there. The new material supplied a Material Output node connected to a Diffuse BSDF by default. From here construction felt a little backwards to me, with dependencies flowing from left to right (which makes sense, but not if you're used to the old side panels), and I didn't know how much space I would need for each new node. The nodes are easy to rearrange though, so just put things in the middle to start with.

Tip: If you ever lose sight of your nodes, tap "A" just as you would in the 3D viewport, then press the Numpad period key, and your view will move back to center again.

Keep in mind that the material I am demonstrating is meant to simulate a completely matte rock texture like slate, with no gloss at all, so I decided not to use a shader with effects like gloss, reflections or transparency. Very few real world textures have no light reflection at all though, so that omission is unique to this particular effect.

In the same way that you would add a new texture in Blender Internal -- after you added a new material in the Materials panel and adjusted the material settings to your liking -- I then added a Texture Coordinate node. This is the part that felt backward to me, because I didn't have a texture yet for the coordinate node to control. You don't have to lay out the nodes in any particular order if you prefer spaghetti, but there is a correct order that you must connect nodes in, for the information to flow from left to right, so you'll find that the connections line up more logically this way.

In the Texture Coordinate node, I chose Generated coordinates, and connected that output to the Vector input of a Mapping node, and then I connected the Vector output from Mapping to the Vector inputs on three Texture nodes. It is possible to connect your Texture Coordinate output directly to the Texture nodes with no Mapping if you're happy with the default mapping, and in fact It's superfluous in this demonstration, but I wanted to show how Mapping nodes are connected because they give you control over the way the texture is applied the same way that you're used to in Blender Internal, such as the texture scale adjustment. You may need a unique Mapping node for each Texture node if you want independent control.

Tip: Selecting both Min and Max values in the Mapping node allows you to restrict (or "clamp") repeating of the texture.

In this case I have chosen three procedural textures: Voronoi for a faceted cell pattern, Musgrave for large, blobby hints of color variation, and Noise for a fine grainy pattern. The specific settings I used can be copied verbatim if you like them, but the important part is to understand their influence on the final product.

If you want to see the effect that a particular chain of nodes is having directly on your model, try plugging the right-most output directly into the Color input of the Diffuse BSDF node and change your 3D viewport shading to Rendered. Here is my Voronoi Texture affecting the diffuse color by itself:

For my diffuse color, I've added Color Ramp nodes to each Texture, connecting the Texture Fac output to the Color Ramp Fac input, then outputting the Color from the ramp into the next node which is a Mix RGB node. Note that when viewing someone elses node setup, the name of the node shown in the editor may have been changed based on the mode selected in the nodes mode panel. (Say that ten times fast!) For example, if I selected Difference in the menu as below, the node name would change to Difference rather than Mix. This can make it tricky to find a node that someone else is demonstrating, since the menu options are not discovered in the Search. Just try out different nodes if you're trying to match someone else's setup, and scroll through the available modes, keeping in mind that some nodes have the same modes but perform different functions (like a math Multiply is not the same as a color blending Multiply).

For my purposes however, Mix was the mode that I needed to blend the textures together as intended. I adjusted the Fac slider in the Mix node far to the left in this case, to add just a subtle hint of the Musgrave texture. A Fac of 0. 500 would produce a 50/50 blend. The MixRGB node only has two color inputs, so I chained two Mix nodes in a row, to combine the third texture with the first two. Again, to see the isolated results of any part of this combination, temporarily plug the last output of a sequence of nodes into the Color input of the Diffuse and view your model in Rendered mode.

Note: Ctrl + V, Ctrl + C to copy and paste selected nodes works as expected, so go ahead and reuse your nodes!

Last, I connected the Fac output of the textures directly into the Height input of two Bump nodes and blended the three together as before, with another Mix node. I connected the resulting Color output of the Mix node to the Normal input of the Diffuse, and voila! A bumpy, faceted, matte stone material for Cycles.

Omega replica watches has a lot of particularly antique renditions just for exactly what is literally the country's most advanced rolex replica sale device to this point, so driving a vintage oh no- today's their age within the keep an eye on which usually stuff animals all the "Green Close up. " Exactly what is all the Alternative Close up, you will demand? It's always fake omega is unofficial accepted distinction now for the cutting edge in-house official document that the majority most people only will look at like "rolex replica. "