thumbnail_shading

Beginner’s Introduction to Blender Shaders (Blender Cycles Tutorial)

Danan Blender Beginner Tutorial Series Leave a Comment

In this post, I will give a brief introduction to the Blender Shaders system! This is mainly a Blender Cycles Tutorial and by the end of this post, you will know how to create shaders for your 3D objects in Blender.

 

Quick links: Introduction | InterfacePropertiesNavigation | ModelingShading | Lighting | Sculpting | Animation | Particles | Physics | Rendering | Compositing

First thing first, I need to let you know this will be a Blender Cycles tutorial. Blender Internal rendering seems to be phasing out so it seems fitting to learn about Cycles.

The main advantage of Cycles is that it can give you photo-realistic results compared to BI and setting up complex shaders is far more simpler. The disadvantage however, is slower render times (but I learn that it is getting better).

These examples show just how powerful Cycles really is:

“Emily” – By Ismael Fuentes

“Green Woods” by major4z (BlenderArtists)

 

With Blender Cycles, you have the ability to create complex shaders for your 3D models. With Cycles, you mainly use nodes to define your shader. This is what the nodes of a complex shader looks like:

SSS Marble Shader Node Setup – By 4Vector (DeviantArt)

 

It looks so complex but once you get the hang of it, you will realize how dead easy it really is. Blender could have made the nodes look cleaner and more intuitive (like BI) but personally, I like it the way it is. Mainly because when people pass me by, they think I’m working on something important. Like I’m an important researcher working on an important science or even a rocket application.

Let’s learn by example!

Open up Blender and make sure your default cube is selected.

Now let’s add a shader to our cube. To do this, go to the Property Panel, and select the Material tab. If there is no material there, just press the + sign to create a new one.

Materials panel

Materials panel

 

Here we can start to create our shader. Press “Use Nodes”. And also, make sure you can see a Preview of your material which is probably above the “Use Nodes” button.

Cool! We can now work with creating a shader using nodes for our cube model.

Change your 3D viewport editor to the Node Editor. You should see the default node setup for the cube. It is a diffuse shader node connected to the Material output node. The Material Output node is pretty obvious in what it does. It takes whatever shader that’s connected to the Surface input and displays it on your 3D object. If you use Volumetric shaders, you use the Volume input and if you want to add things like bumps to your models, you use Displacement. That’s pretty much how the node system works. It takes inputs from other nodes, processes them somehow and outputs the result to another node until it eventually reaches the output node.

default_nodes

Blender Shaders

There are so many different shaders in Blender and you can add them by Shift+A -> Shader and select the shader you want. Here is a summary of the main shaders in Blender Cycles.

Diffuse Shader – The default shader in Blender Cycles. It takes a color input and just displays it as it is. You can select any color you want or you could input an actual image texture.

Glossy Shader – Makes your objects shiny and reflective. A roughness of 0 will give you a mirror and higher than that will give you blurry reflections.

Glass Shader – Makes your 3D object see-throughable (if that’s a word) like glass. Higher roughness values will give you blurrier glass.

Transparent Shader – Makes your object invisible. You can control the opacity using image textures.

Translucency Shader – The lights will penetrate through your 3D object and the back of your 3D object where there is no light will be partially lit up. Great for leaves, grass and ears!

Subsurface Scattering – Makes your 3D object look like skin. Great for human skin, jelly, milk, and other gooey kind of stuff!

Velvet Shader – Gives you a cloth like shader.

Mix Shader – Mixes 2 different shaders together.

Add Shader – Adds both shaders together.

Let’s make paint!

So with this knowlege let’s make a simple shiny paint like shader.

Add a glossy shader by Shift+A -> Shaders -> Glossy BSDF. Alternatively, you can do Add -> Shaders -> Glossy BSDF.

Add Glossy Node

Add Glossy Node

 

Now do the same thing above but this time, make sure it’s the Mix Shader.

Add Mix Shader Node

Add Mix Shader Node

 

Connect the Diffuse and Glossy shader outputs to one of the input shader dots on the Mix Shader. To connect nodes, you just left-click and drag from one of the little circles to another little circle. You can also connect by selecting 2 nodes (e.g, right-clicking Diffuse and then shift+right-clicking Mix Shader), and then pressing F.

Finally, connect the Mix Shader output to the Material Output Surface. In the preview window you should see your new material output.

The Basic Node Setup

The Basic Node Setup

 

To make it look like paint a bit more, turn the roughness value of the Glossy down to 0.05 or so.

We need more Diffuse and less Glossy to make it look like paint. You do this by changing the Fac (or Factor) value in the Mix Shader. This controls the proportion of the shaders effect. Change the Fac value in the Mix Shader depending on where you placed the Diffuse. In other words if you placed the Diffuse above the Glossy, move the Fac value down to 0.1 or so. If you placed the Diffuse below the Glossy, move the Fac value up to 0.9 or so. Either way, what we’re trying to do is get 10% Glossy and 90% diffuse.

full_setup

The full node setup

 

Look at your preview shader, it should look something like shiny paint now.

result

The result

 

You can go a step further and play around with the colors. You can also add image textures if you want. To add images, just do Shift+A -> Texture -> Image Texture. Fire up your image and then connect the output to any shader input.

The end!

Hope this introductory Blender Cycles tutorial was helpful to you. You now have some idea of how shaders work in Blender Cycles. Play around with these shaders, go crazy, render them out and see how it looks. Try out some tutorials on YouTube to learn how to do some really advanced stuff. I can’t guarantee you will be able to create shaders like the examples I showed in the intro at this stage. That just comes with more experience and more knowledge of shaders.

Quick links: Introduction | InterfacePropertiesNavigation | ModelingShading | Lighting | Sculpting | Animation | Particles | Physics | Rendering | Compositing