Tutorial: Blender Basics – Textures

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

Polka Dot Pattern – http://www.publicdomainpictures.net/view-image.php?image=118656&picture=polka-dot-pattern-background

Vintage Paper Pattern – http://www.publicdomainpictures.net/view-image.php?image=205466&picture=damast-vintage-tapeten-blau

 

Adding Textures

Textures can add realism to the materials used on objects in Blender. We are going to begin by adding a simple texture to help understand the process of texturing in Blender.

Make sure the Cube is selected and then open the Materials panel. Let’s change the Diffuse color to a light blue. This will gives us a solid color but if we want something richer we need to use a texture.

Let’s open the Textures panel (checkerboard icon). At the top of the panel we see that we have slots for multiple textures. For now we are going to stick with the default texture – Tex. Type allows us to choose the type of texture we want to apply. We have the choice of using anything from clouds to wood or even our own environment map or image or movie. Each one of these types has their own parameters and customizability.

Let’s choose Marble from the list. If we go into Rendered view we can see that the texture is already applied to our cube. The fuchsia color comes from the Influence section. This color can be changed if we wish but we will just leave it on the default. The texture is acting like an alpha channel. The fuchsia color is showing up where the white is located on the texture and the original blue color is showing up where the black is located on the texture.

If you notice under the Influence section, Color is checked. Influence by default affects the color. If we turn Color off, notice that the Texture is now hidden. If we turn the Color back on and change the influence to 0.500 the Texture is affecting the color but only at half-strength and if we change it to 1.000 the Texture is affecting the color at full-strength.

Emit affects the value of the shade and makes itself illuminate where it is white and keeps the standard color where it is black. If we check Emit and turn Color off this becomes evident. We can also affect Specular just like we have already seen earlier. Geometry can also be affected in this section. If we turn on Normal and Color and turn off the Emit, we now notice that the Texture becomes a normal map – creating bumps on the surface of the Cube.

Blend determines how the Texture blends with the original Diffuse color. We have multiple options with Mix being the default. If we are familiar with Photoshop or a similar program some of these options will be familiar.

If we go back to the Materials panel we will now notice that the Texture is being applied to our original Material.

Bitmaps

Now let’s look at how to use image maps as part of a texture.

Let’s go back into the Texture tab and remove the marble texture from the Cube. Now we do not have any textures on the Cube. Click on the second slot (below Tex) and hit the “New” button and change the Type to Image or Movie. In the Image section we need to click on “Open” and open up a bitmap. (I’m using a polka-dot pattern which can be found on Public Domain Pictures [link is in the description]).

The texture is now applied to the Cube but it is stretched. This is part of the problem of trying to wrap a 2D texture around a 3D object. What we need to do is map the 2D texture to the 3D model. This can be done under the Mapping section.

If we change the Coordinates to Object we can now see that the stretching has been fixed. We must realize though that depending upon the object, the Coordinates option may need to be set to UV or one of the other options.

UV Editor

Another way to texture an object is via the UV Editor.

Let’s delete the texture from the Cube by clicking on the “X” next to “Texture.” Click “New” and add a new Image or Movie Texture to the Cube. (I’m using a vintage paper pattern which can be found on Public Domain Pictures [link is in the description]).

Let’s split the screen into two vertical areas and change the right-hand-side to UV/Image Editor.

Make sure the Cube is selected and tab into Edit Mode (make sure you are in Orthographic Mode (5 on the Numpad)). We now need to make seams on the Cube so we can unwrap the Cube onto the UV map. Use the shortcut CTRL TAB and make sure we are in Edge Mode. We need to choose the top-front edge and the c-shaped edges on the two sides using SHIFT-RIGHT-CLICK. Once all seven edges are selected use the shortcut CTRL E to access the Edges menu and select Mark Seam.

Now, hit the A key twice to make sure that the Cube is selected. Now hit the U key and choose unwrap. If the unwrapping is crooked we can use the R key for rotation and the G key to move the UV and make sure it is straight. Click on the folder and open up the image.

Tab back into Object Mode and select the Lamp and change it to Hemi so we have better lighting. Now select the Cube and tab back into Edit Mode and then choose Rendered. We can now see that the Texture is mapped onto the Cube.

The pattern is pretty large and if we want a simple, quick way of making the pattern smaller we can make the actual UV of the Cube larger. If we hit the S key we can resize the UV and if we look at the Rendered Cube we can now see that the pattern is smaller.

Bump and Normal Maps

We can also make normal maps that will allow us to create the illusion of a rough surface.

Let’s start with a clean scene by going to File > New > Reload Startup File. Make sure the Cube is selected and then go to the Materials tab and put a light brown Diffuse color on the Cube. Go to the Texture tab and choose the first slot in the Texture stack (Tex) and change the Type of Stucci. Now when we go into Rendered Mode we now see stripes going around the Cube.

Now let’s make a Normal Map out of this flat Stucci Texture. Under the Influence section turn on “Normal” under the Geometry section. We now see bumpy stripes going around the Cube in Rendered Mode.

Note that Normal Maps work best on objects that are high poly – meaning that they have a lot of geometry.

Displacement Maps

Normal Maps make the object appear to have a bumpy surface but they don’t actually change the surface of the object. If we want to actually change the surface of the object we need to use a Displacement Map.

Let’s start with a clean scene by going to File > New > Reload Startup File. Make sure the Cube is selected and tab into Edit Mode. If we are going to use the Displacement Map we need to have enough geometry to make it work. Go to the Tool Panel and select Subdivide and change the Number of Cuts to 15.

Let’s go to the Materials tab and add a light-yellow Diffuse color to the Cube. Then, under the Texture tab let’s change the default Texture to Clouds. If we then go to the Influence section – under Geometry – we need to turn on the Displace option. Now, if we go into Rendered mode we can see how the Cube’s geometry has been changed.

Remember that Normal Maps is a surface effect which doesn’t change the actual geometry of the object. Displacement Maps however change the actual geometry of the object.

Node Editor

Another way to create textures for objects in Blender is to use the Node Editor.

Let’s start with a clean scene by going to File > New > Reload Startup File. Let’s then split our view into two separate horizontal areas. Let’s change the top area into a Node Editor. What we want is to add a Texture to the Cube. So, we need to change to the Texture option (checkerboard pattern) and the check Use Nodes. We now see two nodes – one for texture and the other for the output.

These Nodes are actually connected to the Texture panel that we have been using. If we go to the Texture panel we notice that the same red and white checkboard pattern showing in the Nodes is listed there as well. If we go into Rendered view we see that the Texture is actually applied to the Cube via the Output Node.

We can also add Nodes and make changes to the Textures.

Let’s make the Checker Node is active by right-clicking on it and deleting it. Notice that our Cube is now dark because there is no Texture attached to the Output Node. If we click on Add and Textures you notice that we have the same Textures that we have already seen earlier. We also have Patterns available to us.

Let’s go ahead and choose Bricks from the Pattern menu. Now all we need to do is left-click and connect the Color output from the Bricks Node to the Color input in the Output Node. Notice that we can now see the Pattern on the Cube. We can change the colors of the bricks and mortar as well as the thickness of the mortar.

We can also do things like add a Texture to the Pattern. Let’s go to Add > Texture > Stucci. Now all we need to do is left-click and connect the Color output from the Stucci Node to the Color input in the Bricks Node. Notice that we can now see the Texture and the Pattern on the Cube.

So as you can see, there are a lot of possibilities here. You can certainly plug nodes into other nodes, so it’s a really great way to create highly custom textures and materials.

 

 

 

Share

Tutorial: Blender Basics – Materials

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

 

Assigning Materials

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.

Diffuse Shaders

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.

Creating Reflections

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.

Ramp Shader

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.

 

 

Share