Welcome to the third tutorial of the Blender Basics tutorial series. In this tutorial we will be looking at materials in Blender.
Blender Reference Manual – https://docs.blender.org/manual/ja/dev/index.html
Blender Hotkeys Reference – https://wiki.blender.org/index.php/Doc:2.4/Reference/Hotkeys/All
Once we’ve modeled an object we need to add some color and shading to it which we can do using Blender’s materials.
Let’s delete the Cube by using the shortcut X and Delete. Next, let’s add a UV Sphere to the scene (SHIFT A > Mesh > UV Sphere). Now let’s add a Cylinder to the scene (SHIFT A > Mesh > Cylinder). Move the Cylinder so we can see both meshes.
Right-Click on the UV Sphere to select it and then go to the Properties Panel and choose the Materials tab (sphere). (We can expand the Preview by dragging down on the bottom of the panel.) In order to add a material, click on the “New” button. Right now our material is named Material.001. It is always good practice to rename the materials using descriptive names. Double-click on the material name and change it to “Red” and hit the ENTER key.
We have four options for the material. Surface is what we will use ninety-five percent of the time. We can also apply the material as a wireframe, volume, or halo.
Below these options we have a Preview section. We can preview our material on a flat surface, a sphere, a cube, the monkey, or as strands or volume.
Below the Preview section we have multiple other options. Diffuse is the main color of the object. Specular refers to the highlights and we also have Shading and Transparency options. Mirror refers to reflecting. Subsurface Scattering is a translucent effect. Strands are for hairs and similar objects. We also have a number of other options such as mist.
In order to change the color to red click on the Color Picker under the Diffuse section. This will open up a color picker where we can pick a red color. Notice that we also have RGB, HSV, and Hex options. We also have an eye dropper so we can use it to choose a color that we already have as a material. Let’s just choose a red color for now.
*Note, your Color Picker may be circular. If you want to change your color picker to the square one like mine go to User Preferences > System > Color Picker Type (Square (HS + V)). Remember to save your settings.
Once we choose the red color we see that our UV Sphere turns red. As we tumble around inside the 3D Viewport notice that light is now reflecting off the UV Sphere.
Right now only the UV Sphere has a material applied to it. Let’s Right-Click on the Cylinder to select it and click the “New” button under the Materials tab. If you click on the drop-down menu beside “Material.001” you will notice that we can choose that same red color that we assigned to the UV Sphere. In this case however we are simply going to choose a new color.
Change the name of the material to “Blue” and then choose a blue color to be applied to the Cylinder.
Right now we only have one color assigned to each Mesh. It is possible however to add a secondary color to a Mesh. Let’s add a second color to the UV Sphere.
Right-Click on the UV Sphere to choose it. In order to add a second color to the stack, click on the plus to make another color slot. Then we need to click “New” and choose another color from the Color Picker. Let’s change the name of this material to “Yellow.”
In order to add this second color to the UV Sphere we need to tab into Edit mode. Using the shortcut A deselect everything. To make it easier to select faces make sure you are in Orthographic mode (5 on the Numpad) and in the Front view (1 on the Numpad). Use the MMB to zoom into the UV Sphere.
Using the shortcut CTRL TAB, go into Face mode and then use the Z key to enter Wireframe mode. Use the Box (or Border) select (B key) and select the bottom faces of the UV Sphere. Go back to Solid mode (Z). Choose the Yellow material in the Materials tab and then click on “Assign.” Notice that those faces that we had selected are now yellow.
We have two options that affect the material of the object. The Diffuse Shader provides the color and Specularity provides the highlights
By default we are using the Lambert Shader which gives us a basic diffuse color with darker color depending upon the lighting (which can be seen on the lower part of the UV Sphere).
If we change to the OrenNayar Shader we get an additional option – Roughness. If we have the Roughness set to 0.000 this shader acts just like the Lambert Shader. If we add a bit of Roughness – let’s say 0.500 – we notice in the Preview that the light is scattered a bit more over the UV Sphere. The higher the Roughness, the darker the Mesh will appear.
If we change to the Toon shader we basically get a two-tone shader. We get light areas and dark areas. Intensity affects the lighter parts of the Shader. Size changes the size covered by the lighter and darker areas. Smoothness changes the falloff of the lighter areas.
The Minnaert Shader gives us a kind of rim light affect. If we change the Darkness to 0.000 we really notice the rim light affect. This shader is quite handy if we are trying to get a rim light affect without adding multiple lights to the scene.
The Fresnel Shader bends the shading toward the edges. If we change the Fresnel effect to 1 and the Factor (which is a type of multiplication factor) to 2 notice that we now have a darker area where a lighter area use to be. It acts almost like an inverse shader.
The Intensity option – which is available across all of the shaders – affects the color. It acts similar to a color fader. The lower the Intensity, the darker the color will become on the Mesh.
Working with Specularity
Specularity shows the highlights or shininess of a surface.
Notice that there is a Color Picker under the Specular section. This means that we can change the color of the Specularity. Let’s click on the Color Picker and change the color to a bright red. Notice the highlight in the Preview is now a red color.
We also have a number of Specularity options and, just like the Diffuse option, we have an Intensity option available across all the Specular options.
Cook Torrance (CookTorr) is the default shader. This shader is useful for producing a plastic or shiny-type surface. The Hardness control essentially controls the soft edge between the center of the highlight and its falloff. The higher the Hardness, the harder the highlight becomes. If we change the Hardness to 300 we notice that the highlight becomes very hard – with very little falloff. Whereas if we change it to 10 we notice that the highlight is very soft with a lot of falloff.
Phong is very similar to Cook Torrance and it is used for glass. It is a bit softer than Cook Torrance. If we look at the Preview we can see that the highlight is softer with a Hardness of 10 than it was with the Cook Torrance and it is the same if we change the Hardness back to 300.
Blinn gives us an additional option – IOR (Index of Refraction) – which is another way of doing Hardness. Let’s change the Hardness to 100 and the IOR to 10 you notice that we now get a tight highlight with a glassy type of surface. If we now change the Hardness to 30 and the IOR to 5 we get a dull shine on the surface.
Toon is very similar to Toon under the Diffuse option. The Size option controls the size of the highlight. For example, if we change the Size to 1, notice that the highlight now covers a larger area. If we change the Smooth option we can control the hardness or softness of the highlight. If we change the Smooth option to 0.5 we see that the highlight edge becomes softer.
The last option is Wardlso. We have a Slope control which is a cross between the Hardness control and the Index of Refraction. If we change the Slope to 0.400 we get a nice soft highlight but if we change it to 0.100 we get a hard highlight.
Additional Shading Options
Now let’s look at some shading parameters for our materials. Let’s collapse the Diffuse and Specular sections so we can focus on the Shading section.
The first option – Shadeless – takes off all the shading and makes the Mesh a solid-color object. If we check the box next to Shadless we see that the sphere in the Preview window is now a solid color and the highlight disappears. This is very useful if we want to make a light emitter and we need it to be a solid color.
Tangent Shading changes the way that the specular highlight works. Notice that with this option checked the highlight is stretched across the sphere. Cubic Interpolation changes the way the shading is interpreted depending upon how the light hits the object.
The Emit slider changes the amount of light that is emitted. If we set it to 0.5 we get a specular highlight which affects the Diffuse channel. If we change it to 0.1 we get something similar to ambient (or bounced) lighting.
The Ambient slider changes the ambient light that the object receives. This option depends upon the amount of ambient light in the scene. Translucency makes the object look more solid or more translucent.
Tab back into Object Mode and add a Plane to the scene (SHIFT A) to act as a floor and then assign it a Diffuse color of purple. Make sure to move it below the UV Sphere and resize it (S 4). Let’s also select the Lamp in the Outliner and change it to a Hemi lamp. If we go into Material view we see that there are no reflections in the scene.
Let’s add reflections to the scene. Make sure that the Plane is selected and go to the Mirror section and check the box next to “Mirror.”
Change the Reflectivity to 0.500 and then go into Rendered Mode, we can now see a reflection of the UV Sphere onto the Plane. If we use the Color Picker and change the color to green we notice that the reflection is now tinted green.
The Fresnel Shader bends the shading toward the edges. If we change the Fresnel effect to 3.000 we see that the reflection is weaker in the center but still fairly crisp along the edges. The Blend option controls how the Fresnel effect blends into the object. If we change the Blend to 3.000 the reflection disappears and if we change it back to 1.000 the reflection can be seen again.
Depth controls how many times an object or material reflects because you’re bouncing more light waves around. Max Distance controls how far the reflection will reach.
Gloss sets the glossiness of the object. If we change the Amount to 0.700 we notice that the reflection becomes blurred out. Samples changes how the reflection is shown – the lower the number the more round the reflection will look. Threshold changes the “brightness” of the reflection according to the amount of Samples we are using.
We can also use Ramps to add a gradation of both color and transparency to an object. Let’s turn off the Mirror option, change the Intensity under Specular to 0.000, and go back to the Diffuse section. This will give us a flat purple color on the Plane and in the Preview window.
If we check Ramp under the Diffuse section notice that we now have options for a gradient. Currently the gradient goes from black and transparent to white and opaque. The Factor controls how much the Ramp is applied. If we change the Factor to 0.000 we essentially turn the Ramp off but if we change it back to 1.000 we turn the Ramp back on.
We can easily make changes to the Ramp by clicking on either of the Color Stops and changing the color. For example, if we click on the right-hand (White) Color Stop and change the color to red we see in the Preview that what was once white is now red.
We can also add Color Stops by using the plus above the Colorband. We can then change the color of this new Color Stop and add a third color to the object. Click on the plus to add a new color stop. Let’s click on the center Color Stop and change the color to white. Notice that the Position is at 0.5 which makes the white mostly transparent. However, if we change the Position to 0.8 we see that if becomes more opaque and the red color stop has also changed. If we want to delete this Color Stop, click on the white Color Stop and then the minus above the Colorband.
We also have the same options for a Ramp under the Specular section. If we change the Intensity back to 1.000 and then change the color of the white Color Stop to a green color notice that the Specularity now goes from green in the center to transparent on the outer edges.
Transparency and Refractions
Let’s now look at Transparency and Refractions. Let’s start with a fresh scene (File > New > Reload Startup File).
Let’s go into Orthographic Mode (5 on the Numpad) and the Right Side view (3 on the Numpad). Let’s add two more Meshes – a Cylinder (with a red material) and a Cone (with a green material) and place them behind the Cube. Now, select the Cube and add a light blue material to it.
Transparency becomes very important when we want to create materials like glass or translucent plastic. Let’s change our point-of-view to the Front view (1 on the Numpad). We also need to change the Lamp to a Hemi lamp so we have enough light in the scene. If we change to the Material view we can see that there is no transparency which means we cannot see the two objects behind the Cube.
Let’s change the name of the material on the Cube to “Transparent.” Go to the Transparency section and put a checkmark in the box to access the options available under Transparency.
We have three options but the two we will focus on are Z Transparency and Ray Trace. Z Transparency is a simple, basic transparency which doesn’t include refractions or handling of lights. The Alpha option basically turns down the visibility of the object. An Alpha of 1.000 is opaque but if we change it to 0.200 we can now see in the Preview that the object becomes 20% transparent and we can now see the red Cylinder behind the Cube. If we tumble to the side of the Cube we can more clearly see how the Cube is now becoming transparent.
While it is true that we have transparency it obviously doesn’t look like glass. This is where the Fresnel effect comes in. The Fresnel effect pushes the effect toward the edges which keeps the transparency in the middle while fading off at the edges. Let’s go back into Front view and change the Fresnel to 3.000 and now we can clearly see the Cylinder behind the Cube. If we tumble to the side of the Cube we can more clearly see how the Cube has now become even more transparent – more like glass.
This works fine for some cases but if we want a more realistic effect we need to use Ray Trace. Let’s change from Z Transparency to Raytrace. If we use Ray Trace we get even more options made available to us. The most important option is IOR – Index of Refraction – which controls the lens effect.
If we change the IOR to 0.900 you can see in the Preview that the effect tend to push the refraction toward the center of the Sphere. The lower the IOR the more focused the refraction is in the center. Let’s change the IOR to 0.500 and now we notice a distinct difference between an IOR of 0.900 and 0.500.
Depth controls how many times an object or material reflects because you’re bouncing more light waves around. Gloss sets the glossiness of the object. If we change the Amount to 0.700 and look at the Rendered view we notice that the reflection becomes blurred out. Samples changes how the reflection is shown – the lower the number the more round the reflection will look. Threshold changes the “brightness” of the reflection according to the amount of Samples we are using.