Introduction to Textures
In the last topic, consideration was given to the effect of light reflecting on a smooth surface producing a material color. Textures are the physical characteristics or imperfections of a surface such as the grainy surface of bricks, the fibrous pile of carpet, wood grain, etc. Textures may be used in conjunction with materials or used separately.
In Blender, these types of surface characteristics are created by mapping data blocks or images on to the surface of a model in the 3D window. The data or images are called “Textures.” In Blender, there are three texture modes: World Textures, Material Textures, and Other Data Textures. World Texture is used to create scene background. Material Texture is applied to an objects surface material producing the allusion of surface characteristics or deforming the mesh. Other Data Textures are used to affect the characteristics of tools such as the Vertex Paint brush and the Sculpt mode tools. Textures are also used by several of the Blender modifiers.
It should be noted that textures applied to an object do not display in the 3D window unless the window is set to “Rendered Viewport Shading” or an image of the scene is rendered by pressing F12.
It should also be noted that by default, Blender is set to use “Blender Render” which is the Blender internal render engine. Pressing F12 will render an image in a separate window where the texture is displayed.
Also be aware that rendering produces an image of what is seen in “Camera” view (Num Pad 0). It follows that an object or the camera must be positioned to encompass the object to which a texture is applied.
Note: Textures are superimposed over the underlying material color therefore the mate rial can have an effect on the final render.
Note: By default, material texture mode is active.
Material Textures
Before you can add a texture to a surface you must first add a material since, by default, Blender textures are set to influence the material. Textures are applied to an object’s surface using the options in the properties window—“Textures” button. Clicking the “Textures” button displays a panel where you can add a new texture. Blender comes with a series of built-in textures (Procedural Textures) from which to choose or you can use a photo or image stored on your computer. Blender can also place movies on a surface and you can animate the textures.
Note: In the default scene at start up, the cube object has a material and a texture pre-assigned. The material is the gray color with RGB values of 0.800. The texture is named “Tex” and is Type “None” which means in reality, there is no texture or that this texture data displays the same as the flat gray material.
When a new object is introduced into a scene there is no material or texture applied. In the “Properties” window, in both “Material” and “Texture” buttons you are required to click in the “New” button to add materials and textures. When you click the “New” button properties are displayed for the selected object. If you have entered several objects the new properties are assigned to the last object entered into the scene whether it is selected or not.
To demonstrate the placing of a texture on an objects surface, follow this example: open a new Blender scene, replace the default cube with a plane, and scale the plane up by 5. Add a diffuse material with R: 0.800, G: 0.767, and B: 0.495 values. Go to the properties window—“Textures” button and click “New”.
The texture buttons display with a default texture type “Image or Movie” named “Texture.” The “Preview” tab shows the texture as a black panel which in reality means there is no texture since an image or movie file has yet to be selected. A rendered view shows the plane with the diffuse material color only. Click on the texture-type drop down menu and select the “Magic” which is one of the “Procedural” textures. The “Image or Movie” type texture is replaced by the magic texture and the “Image” tab is replaced by the “Magic” tab. This tab contains only two values for altering the characteristics of the texture: depth and turbulence. Note that the 3D window does not show the texture on the object. With the 3D window in “Rendered Viewport Shading” mode or by pressing F12 to render an image you will see the texture on the surface of the plane. Observe that the texture appears as if it has been placed on two triangles. This has occurred due to the default mapping coordinates. Look at the “Mapping” tab and note the “Coordinates” are UV and the “Projection” is “Flat.” Flat is OK for the flat plane but you have to change UV to “Global,” “Generated,” or “Object” to see something representing the preview. Change the “Coordinates” to “Generated.” In the “Magic” tab change the depth value to 4 and render again to see the alteration. Change the “Turbulence” value for some interesting effects.
Go back to the texture-type drop down selection and select “Image or Movie.” An “Image” tab displays instead of the “Magic” tab, the preview shows a black window and there is no longer a texture on the plane in the 3D window. We haven’t told Blender what image to use.
In the “Image” tab, click “Open.” The file browser window displays. Navigate to a file containing a picture (I have a picture named “Flower.bmp” in my “Documents” folder). Click on the picture then click “Open” at the top RHS of the screen.
Note: The File Browser Window can display image files as thumbnail images.
You will see your picture in the preview panel (probably multiple images) and in the 3D window in “Rendered Viewport Shading,” the image will be shown on the surface of the plane.
Texture Display in the 3D Window
Blender displays a texture on the surface of the selected object in the 3D window in “Rendered Viewport Shading” mode or if an image is rendered by pressing F12.
An image texture can be displayed in “Texture Viewport Shading” in a limited way by the following.
We will use a plane object in a new Blender scene. Apply an image texture. Press the N Key to display the “Object Properties” panel. In the “Shading” tab change “Multitexture” to “GLSL.” With the 3D window in “Texture Viewport Shading” the texture displays on the surface of the cube.
Note: The forgoing technique is appli cable to image textures only and the “Mapping” settings are limited. To see other types of texture applied to the sur face of an object in the 3D window press F12 on the keyboard to render an image or change the “Viewport Shading” to “Rendered.”
The Preview Tab
Take a look at the “Preview” tab in the “Properties” window, “Materials” buttons.
This preview gives an indication of how you will see your material in a render of the 3D window. To save computer memory, Blender does not display everything in the 3D window. On the left-hand (LH) side of the “Preview” tab, there are options for viewing the preview in different formats. One of the options is “Monkey,” but for simplicity, I have left the preview as the default sphere.
The Diffuse Tab
As previously stated the Monkey object has been assigned a gray color. This is the diffuse overall color of the material. Click the gray bar (appears white) to display the color picker and note the R: 0.800, G: 0.800, and B: 0.800 values (Figure 4.6). These are the numeric values that denote the gray color in the RGB color system. RGB stands for “red, green, and blue,” the primary colors. Mixing the three 0.800 values produces the gray color. There are three color system options available: RGB, HSV, and Hex.
Open the color picker again and select a color you like. If you want to match my example exactly, enter the RGB values R: 0.800, G: 0.430, and B: 0.000—we now have a pretty golden monkey. The difference between what you see in the 3D window and the rendered image is shown in the figure (press F12 to see a rendered image—press Esc to cancel). The 3D window has some shadowing effect so that you can see 3D features. This shadowing is evident in the render, but in addition you can see some shiny highlights. The shiny highlights are there because, by default, Blender has added “Specular” color (discussed next) to the monkey; that’s why we could see the monkey when we turned the diffuse color intensity down to 0.000. In effect, we canceled the “Diffuse” light reflection but there was still “Specular” light reflection.
The intensity of a color is the shade of the color going through a range from absolutely no light to maximum light. The Figure demonstrates intensity, also serves to show that light has a major effect on a rendered image. When the monkey was added to the scene, it was located at the center of the world. This means that the position of the default lamp is above and behind the monkey’s head, which explains why the monkey’s face is in shadow. So how come we see the monkey when the intensity is 0.000 (no light)? We will come back to that a bit later. For now, let’s make the monkey more colorful.
The figure on the left (rendered images of monkey) for comparisons when the intensity changes.
The Specular Tab
The “Specular” tab is similar to the “Diffuse” tab with a color bar that, when clicked, displays a color picker. The difference between the two tabs is that the specular tab has a hardness value.
Click on the “Specular” color bar and then select the green color with R: 0.000, G: 1.000, and B: 0.450. Set the diffuse color intensity to 0.800. When you add a specular color to an object’s material, there is no dramatic effect in the 3D window—the difference will be the specular highlights, which are more evident in the rendered image.
Note: As an alternative to rendering an image by pressing F12 on the keyboard you may change the 3D window “Viewport Display” mode to “Rendered.” Any change to object properties will display automatically with the window in this mode
The figure on the left demonstrate the differences with varying intensity values for 3D window objects and rendered images, respectively.
The Hardness Value
The best way to describe the effect of the hardness value is to say that the effect spreads the “Specular” color across the surface of the object (known as “soft light”) or focuses it (known as “hard light”). The default hardness value is 50 and the value range is 1–511. The most visible effect when altering the value occurs in the lower region of the range. The following figures demonstrate this effect for 3D window and rendered images, respectively. Set both diffuse and specular color intensities to 0.800.
Ramp Shaders
The “Ramp Shader” system in Blender integrates a color shading over a surface, also known as gradient. The following demonstration provides instruction in the use of the Blender interface in implementing the “Ramp Shader.”
Ramp shaders are provided for both diffuse and specular colors. They allow the introduction of subtle color mixing on an object’s surface. It must be remembered that the ramp shaders are used in conjunction with lighting, therefore, the type of lamp, its strength (energy), and its location in the scene relative to the object all influence the final result and provide a vast array of possibilities in color application.
We will demonstrate “Ramp Shaders” by setting a scene as shown in the diagram with a “UV Sphere” object, the default “Point” lamp, and the default “Camera.” The “UV Sphere” and the “Point” lamp are located on the midplane of the scene and translated three Blender units along the Y- and X-axes, respectively.
Set the Scene
In the 3D window select the sphere and in the “Object Tools” panel at the LH side click on “Smooth” under “Shading.” This sets the sphere with a nice smooth surface. In the “Properties” window, “Material” buttons add a new material. An object entered in a scene displays with a default gray color. Blender automatically assigns hidden material settings; otherwise, the object would not display at all. When you click “New” to add a material you simply display those settings that you then modify to your requirements.
By default the “Diffuse” color is gray with RGB values all 0.800. We can leave the default gray set for the demonstration since the “Ramp Shader” settings will override the default material setting. The default color shaders for an object are the “Diffuse” and “Specular” colors. The diffuse color is the overall color of the object while the specular color is the shiny highlights or reflections on a surface.
The effects of ramp shaders will not display in the default 3D window unless we change the 3D window “Viewport Shading” option to “Rendered” or the 3D window is in “Texture Viewport Shading” mode with GLSL set. While in “Solid Viewport Shading” the effects will only show in a rendered image (press F12).
Window Display Settings (GLSL)
With the mouse cursor in the 3D window and the “Sphere” object selected press the N Key to display the “Object Properties” panel.
In the “Shading” tab change the “Shading” type from “Multitexture” to “GLSL.”
GLSL allows you to see “Ramp Shader” colors in the 3D window when “Texture” display mode is selected.
In the 3D window header change the “Viewport Shading” from “Solid” to “Texture”.
When you change the “Viewport Shading” to “Texture” there is an immediate difference in how the surface of the sphere displays.
Why the change in display on activating “Texture” shading mode?
The “Diffuse” and “Specular” shaders are applied to materials in the 3D window to allow you to view objects in 3D. These shaders do not display true shading with respect to the light source in the 3D window unless GLSL is activated and the viewport is in “Texture” viewport shading mode.
Note: At this point we have not activated the “Ramp Shader”. Note also that “Ramp Shaders” are included with both “Diffuse” and “Specular” colors. To make the demonstration as simple as possible we will negate the specular effect by reducing the diffuse specular “Intensity” value to 0.000. We can then concentrate on the “Diffuse” color.
The Ramp Shader
In the “Properties” window, “Material” buttons, “Diffuse” tab, check (tick) the “Ramp” button to display the shader controls. Remember these controls are only applicable to the selected object in the 3D window.
The shading effect is previewed in the chequered horizontal bar. Look closely at the LH end of the bar and observe that there is a vertical dotted line with a slider handle underneath. This line is a “Color Stop” which indicates a point in the shader bar. There is also another vertical line and slider handle (Color Stop) at the opposite end of the bar where the bar is white. This stop is not selected.
The shader bar is previewing a graduated color range between the two stops. The selected stop (LH end) in the shader bar is shown as “Position: 0.000” in the panel immediately below the LH end of the bar. The color at this location is shown in the panel to the right of the position indicator. The black colored panel is a color picker for selecting colors. Click on the black area to display the picker. It shows the color black (RGB values all 0.000). It also shows that the “Alpha” (A) value as 0.000 which means that the color is completely transparent; hence, you see the chequered background in the shader bar at position 0.000. This is also indicated by half the color picker showing a chequered pattern. Click on the Color Stop at the RH end of shader bar. The position is now 1.000 and the color picker displays white (RGB values all 1.000).
The “Alpha” value is also 1.000, which means that the color is completely opaque (Solid Color). With these settings, the shader bar shows a color gradient starting at position 0.000 with a completely transparent black and gradually changing to a completely opaque white at position 1.000.
Note: The three panels, Lambert, Shader and Mix. “Lambert” is one of five shader models available in Blender. The “Input—Shader” is one of four methods of mapping the color ramp to the surface of the selected object. The “Blend—Mix” is one of 18 methods of blending the diffuse color with the color ramp. With these method combinations, the effects that can be created for a surface color are endless.
How the Color Shader Displays
How the colors display in the 3D window on the surface of the selected object is highly dependent on lamp settings and the location of lamps and camera relative to the object. The scene setup we have created will allow us to demonstrate basic principles.
Place the scene in top orthographic view by pressing “NumPad 7.” The sphere is positioned at 45° relative to the single point lamp with the highest energy point of light from the lamp at a point on the surface of the sphere immediately adjacent to the lamp. The color in the “Color Ramp” at the stop “Position 1.000” is mapped to the point of highest light energy on the surface of the selected object (the Sphere). The color at stop “Position 0.000” is mapped to the point of lowest light energy on the sphere. The black surface of the sphere is showing that there is no light energy, that is, it is in shadow. We, therefore, have a color gradient equivalent to the “Ramp Shader” mapped from the point on the spheres surface closest to the lamp to the shadow line. The fact that the black color in the ramp is transparent produces the gray shading effect. By changing the “Alpha” value at stop “Position 0.000” to 1.000 (opaque) you will see a true gradient in color from white to black from the high-energy point to the shadow line.
To add a new “Color Stop” to the “Color Ramp” click the “Add” button. To delete a “Color Stop,” select the stop and click the “Delete” button. To reverse (Flip) the gradient click the double-headed arrow. Adding a stop dis plays a new dotted line in the ramp. The stop is selected when it displays as a dotted line. The color at the new position takes whatever the color in the ramp is at that location; in this case midway between white and black, gray.
Let us brighten things up a little with some bright colors. Select “Stop Position 0.000,” click on the color picker bar and move the intensity slider all the way to the top then select a nice bright red color. Select “Stop Position 0.5000” (the new stop in the middle) and repeat the process this time selecting a bright green color. Repeat the process again for “Stop Position 1.000” selecting a bright yellow. At all stop positions set the “Alpha” value to 1.000 (opaque). On the sphere in the 3D window the ramp color is mapped across the surface where light energy strikes the surface.
To see the effect of using one of the different “Input” mapping methods change “Input—Shader” to “Input—Result.” Press the “F” (Flip) button to reverse the direc tion of the “Ramp Shader” for another effect.
Click on the center stop position, drag to one end of the ramp shader to the other, and observe the change in color gradient on the surface of the sphere. To emphasize the relevance of the objects position relative to the light source drag the sphere along the X-axis and see the color map move on the surface.
Overlay on Base Diffuse Color
The “Color Ramp” materials are mapped over the base “Diffuse” color (Replaces the “Diffuse” color). In the “Diffuse” color picker select a bright blue color. In the diffuse “Ramp Shader” select “Stop Position 1.000” and make the color completely transparent (Alpha 0.000). You will immediately see a blue strip display on the surface of the sphere at the point of maximum light energy. Drag the stop to the left and observe the blue stripe widening. You are widening the transparency and therefore exposing the base diffuse color.
Selecting and moving any of the “Stop Positions” in the “Color Ramp” will affect the color bands on the sphere.
Summary
As you can see there are a multitude of effects that can be created and only by experimentation and recording will you become proficient in the use of ramp shaders.
Halo Settings
By using halo settings, only the vertices of a mesh object will be visible when rendered. The vertices will display as points of light, which look like rings, lines, or stars, or a combination of all three.
Transparency
To make an object transparent, add a material, then in the “Properties” window, “Material” buttons, “Transparency” tab check (tick) the “transparency” button. By default “Z Transparency” is set. Adjust the “Alpha” slider to set the amount of transparency (Alpha: 0.000—fully transparent, Alpha: 1.000—fully opaque).
Note: To see transparency “Viewport Shading” must be in “Render” mode or you have to render an image.
Reflection (Mirror)
To have an object’s surface reflect light as a mirror, add a material then in the “Properties” window, “Materials” buttons, “Mirror” tab, check the “Mirror” button. Adjust the “Reflectivity” slider value (0.000 no reflection—1.000 maximum reflection). To see the effect you must be in “Viewport Shading,” Render mode or render an image.
Vertex Painting
In addition to the options for adding materials to an object as described so far in this module, Blender also provides the “Vertex Paint” tool, which allows you to manually paint a material onto the surface of an object. You can paint by changing the 3D window from object mode to “Vertex Paint” mode. You will be able to paint a selected object immediately, but before you can render an image with the paint showing, you must have a material added. A new object added to the 3D window displays with the default gray color, but, as you can see in the “Properties” window, “Material” button, there are no control tabs displayed. With the new object selected in the 3D window, in the “Properties” window, “Material” button, press “Add Material.” The new object still displays in the 3D window as the same gray color but now the “Material” but ton contains control tabs.
Go to the “Material” button—“Options” tab and tick “Vertex Color Paint”. “Vertex Color Paint” tells Blender to use the painted material instead of the base color when you render an image. It must be ticked before the paint color will render. As “Vertex Paint” suggests, the process involves painting ver tices. The default cube in the 3D window only has eight vertices, therefore, it doesn’t provide much scope for a demonstration. Delete the cube and add a UV sphere. The default UV sphere has 32 segments and 16 rings, which provides a vertex at each intersection point of the mesh. If you would care to count the intersections, you will find there are a lot more vertices in the sphere than the cube. For the demonstration subdivide in “Edit” mode to add more vertices.
Change the 3D window to “Vertex Paint Mode”—your 3D cursor changes to an orange circle. The circle is called the “Brush.”
The Tools Panel Tabs
The tool panel at the left of the window displays with the “Tools,” “Brush” tab open. By default the “Brush Type” is type “Draw.” By clicking on the window icon immediately below the heading “Brush” in the tab, you will see there are seven alternative quickset brush options to choose. This selection is the default “Pallet.” You can add your own brush selections to the pallet by clicking on the white plus sign.
In the “Brush” tab, you have a circular color picker for selecting the paint color with a bar across the bottom that shows the color selected. By default, the selected color is white. To paint, click in the colored circle to select a color, then adjust the intensity with the vertical slider at the right, then in the 3D win dow, click, hold, and drag the brush across the UV sphere.
Clicking on the color bar below the circle enlarges the color circle and provides sliders and options to change color values.
Immediately below the color bar are two sliders. “Radius” controls the size of the brush (the circular 3D cursor) and “Strength” controls how much paint color is applied. Another way of controlling the size of the brush is to press the F key and click, hold, and drag the cursor toward or away from the center of the brush circle. Click the LMB when finished. The size of the brush circle changes and the slider value in the tool shelf is reset.
The “Blend” drop down. Is a menu for selecting how the paint is applied? The default option is “Mix”.
The “New” button. Allows you to create your own specialized pallet.
In the “Tools” panel below the “Brush” tab, there are five other tabs.
The “Texture” tab. Allows you to use a texture to influence the brush stroke.
The “Stroke” tab. Provides options for stroke methods the default method is “Space.”
The “Curve” tab. This tab provides a graphical method for controlling how the brush applies paint. A small graph is displayed with a curve containing control handles. The handles may be manipulated, altering the curve shape and changing the brush paint applica tion. There are also quick select buttons for changing the shape of the curve.
The “History” tab. Has the facilities to undo and redo stroke actions and select recently used strokes.
The Options Panel Tabs
The “Tools,” “Options” tab has more settings for controlling the brush in the “Overlay,” “Appearance,” and “Options” tabs. Remember that when painting is in fact a 3D sphere, you will have to rotate it to paint on its entire surface. When painting, you can only paint the visible surface of the object. You have to pan the 3D view or rotate the object to paint the hidden surfaces. At some time you will only want to paint a specific selected area of a surface. To do this use the “Face Selection Mask.”
Vertex Paint: Face Selection Mask
The “Face Selection Mask” allows the selection of specific areas of a surface for painting.
Follow this example: Start a new Blender scene, delete the default Cube object and add a UV sphere. Remember that a new object entered in a scene does not have a material applied and that you cannot Vertex Paint without first applying a material.
Apply a material. The default diffuse gray color will do.
In edit mode, subdivide the Sphere twice to increase the number of vertices forming the mesh surface. Tab back to object mode then change to Vertex Paint mode. Select a nice bright red color from the “Brush” tab color picker. With the default “Brush” settings paint a red stripe on the surface of the Sphere. At this stage you could continue painting the entire surface if you wished. To limit painting to a specific area of the sur face we will activate “Face Selection Masking” in the 3D window header.
Activating “Masking” displays a white mesh grid over the surface of the Sphere. The grid mesh coincides with the selected vertices and faces which make up the surface. Tab to edit mode and you will see all vertices selected. Change “Vertex Select” to “Face Select.” Deselect all faces (press A key). Now shift select some specific faces. Tab back to Vertex Paint mode and you will see the “Face Select Mask” represents only the faces that you selected. With the Brush paint over the surface, you will observe that the material color is only applied to the mask area.
In the Properties window, Material buttons, Options tab check (tick) in the “Vertex Color Paint” box. Press F12 to render an image to see the paint displayed on the image of the Sphere.
Remember you must have a material applied to the Sphere before painting and you must have “Vertex Color Paint” ticked in the Properties window to see a rendered image.
There is plenty to experiment regarding this topic and, now that you have grasped some of the basics, it’s a good idea to look at some tutorials on the Internet. Video tutorials pack in a lot of information and there are some good tips to be found.
Materials and the GUI
To further understand the application of “Materials” in Blender in relation to the GUI the following is offered.
For the moment consider “Materials” as being color which include its “Diffuse” and “Specular” properties and in fact, its properties in general. These properties are the values entered by using the color picker, manually entering RGB values and by moving sliders. A Blender scene may have multiple materials assigned to numerous objects and there may be several scenes within any one Blender file. A single material may be assigned to several objects.
A material’s properties are stored in a “Datablock” (a block of data).
To understand this methodology we will work through an exercise starting with the default Blender scene containing the default “Cube” object. Without having entered any values the cube displays as a dull gray color in the 3D window. To understand this, go to the “Properties” window, “Material” buttons and you will see the material properties tabs. Components of the upper portion of the “Material” buttons “Properties” window are labeled for clarity.
Blender has named the “Datablock” (Properties) for the default gray color “Material” and assigned the properties to the cube object in the 3D window.
By clicking on the “Browse Material” button a drop down selection menu is displayed that shows all the “Material Datablocks” available for selection. At this stage there is only one which is the datablock named “Material.” The drop down is called the “Material Cache.”
An analysis of the relationship between the datablock and the selected object in the 3D window is as follows: (1) Click on the “Browse Material button” to display the “Material Cache.” (2) Click on a datablock in the cache drop down to select it. (3) The datablock name is entered in the “Unique Datablock ID Name” panel. (4) The “Material Datablock” is entered in the “Material Slot.” (5) The properties of the material are assigned to the object selected in the 3D window.
The Outliner Window
The “Outliner” window allows you to see a record of everything that exists in a Blender file and accordingly you will see the “Material Datablocks.”
Change the 3D window to the “Outliner” window and in the window header change from the “All Scenes” mode to “Datablock” mode. In the window that displays, from the listing at the LH side you will find the heading “Material.” Click on the little cross next to this heading and you will see “Material” again. This is the datablock named “Material” that was selected in the previous analysis. Click on the little cross next to this name and all the properties of the material color are displayed.
You may consider this is where the material properties are stored. To continue we will have to take a few steps backward.
Start a new Blender scene (in the “Info” window header at the top of the screen click on “File”—“New”—“Reload Start Up File”).
Delete the default cube (X key) then add a “UV Sphere” object.
In the “Properties” window, “Material” buttons there is nothing displayed except for the “New” button. This would conclude that there is no “Material Datablock” assigned to the sphere yet the sphere displays in the 3D window as the default gray color.
By clicking on the “Browse Material” button you will see that our old friend “Material,” now named “0 Material,” is sitting in the cache. Blender has assigned this datablock to the sphere by default. The “0” prefix may be considered to say that this datablock has not been referenced to anything.
When we select and assign a material to an object, we are in fact selecting a preconstructed datablock and modifying its properties to produce the effect we require. Starting at this point, we click the “New” button to display the material tabs (the controls for modifying the datablock).
Having clicked on the “New” button you will see that a new datablock has been created and named “Material.001.” You will see the name in the “Unique Datablock ID Name” panel and you will also see this in the “Outliner” window.
Clicking on the “Browse Material” button also shows you that “0 Material” is still in the cache.
Blender has created a copy of the original “Material” and automatically renamed it “Material.001.” The new datablock has been entered in the active material slot and assigned to the selected object (Sphere) in the 3D window (note there can be more than one “Material slot”).
You can modify the new data block. Click on the “Diffuse” color bar and change the color with the color picker. If you look in the cache you see “0 Material” is the original gray and “Material.001” is the new color. The sphere shows the new color. You have modified the new datablock independently of the original.
You can manually create a new datablock by clicking on the plus sign at the end of the “Unique Datablock ID Name” panel. This is the same as clicking on “New” button previously. This new datablock will be a copy of whatever datablock you had previously selected. Blender will automatically name it with the next consecutive number, that is, “Material.002.” Again you can modify the properties independently.
Note: In the “Properties” window, “Material” button, “Unique Databloack ID Name” panel there is an “F” button (save the Datablock). When you click this a “2” button displays (display number of users, click to make single user).
If you click on the “2” a new datablock is created and named “Material.003”. This is useful if you have assigned a material datablock to more than one object and you wish to change a property, say change the diffuse color on one object only.
Once a datablock has been created and saved, the datablock may be retrieved from the cache and assigned to any object selected in the 3D window.
Follow this exercise. Start a new scene, delete the default cube, and add three “UV Spheres.” Make sure all the spheres are deselected (not selected— press A Key).
In the “Properties” window, “Material” button click on the “Browse Material” but ton to display the cache.
You will see the “0 Material” is the only datablock listed. Click the “New” button still with no objects selected. Blender displays the material buttons, created a new material datablock and names it “Material.001.”
Click on the diffuse color bar and pick a color. The color is applied to the last sphere that you entered in the 3D window.
If you click on the “F” button you will see “2” as the number of users. This is somewhat confusing since only one sphere is displaying the color chosen. Select each of the other spheres in turn and select “Material.001” from the cache (click the “Browse Material” button and click on “Material.001” in the cache). All three spheres display the color chosen, which indicates that they all have the same material datablock assigned. You now see “4” as the number of users. Again this is somewhat confusing. In the “Outliner” window, “Datablocks” mode “Material.001” shows “Users 4” as the number of times the datablock is referenced. I will leave you to draw your own conclusion.
Multiple Material Slots
Multiple material slots may be introduced for each individual object in the scene. The application of multiple material slots can be demonstrated by showing how a single mesh object can have multiple colors. Follow this procedure, leaving the default cube in the scene. In the default scene Blender has automatically assigned a material to the cube object. The material is named “Material.”
Add a UV sphere mesh object to the default scene. The sphere will be in object mode and selected in the 3D view. Have the properties window with the “Material” buttons active. The sphere will be the default dull gray color and the materials properties window will be blank. Remember the cache is available for selecting materials if you wish.
Click on the “New” but ton to create a new material. By default, it is the dull gray color but note its data block ID name in the window “Material.001”. Click on the “Browse Material” button and you will see the new name has been added to the cache. The name is “Material.001.”
Now click on the “Add Materials Slot” button. A new slot is created but note that there is no material linked and the new slot is not assigned to the object selected in the 3D view. At this point, you can click on the “Browse Material” button and link a material to the new slot or you may click on “New” to create a new material data block. Remember, a new datablock will be a duplication of the last datablock selected, which in this case was “Material.001.” Click on “New.”
Since “Material.001” was the last in the list, Blender names the new material datablock “Material.002” and it is identical to “Material.001”. Change the color of “Material.002”. Note that the sphere does not change color. There are now two color slots: one is linked to the sphere and the other is not linked. Remember, the information in the properties material window is only relevant to the object that is selected in the 3D view. If the sphere were deselected, the first slot remains assigned to the sphere since it was the last object selected. As a demonstration of the foregoing, select the cube then the sphere and note the change to the properties window.
We now have two slots assigned to the sphere: one is assigned and the other is not. To change the assignment, make sure the sphere is selected in the 3D window and tab to edit mode. All the vertices will be selected. Click on the new material slot (in this case, the slot with “Material.002” linked) and click on “Assign.” Tab back to object mode and you will see that the sphere has changed color, showing that the material slot with “Material.002” linked is assigned to the sphere object. The material datablock has also been assigned to the sphere since, in edit mode, you had all the vertices selected.
Change the 3D view to a side view (number pad 1 or 3) so the sphere is visible. Enlarge the view with the number pad + key. Tab to edit mode with the sphere selected (in edit mode, the sphere will have all its vertices selected). Press the A key to deselect the vertices. Press the B key and drag a rectangle around part of the sphere, selecting some of the vertices (a vertex group). Select “Material.001 slot” and click on the “Assign” button. Blender assigns the slot and thus links the material to the selected group of vertices in this case the default gray. Tab to object mode in the 3D view to see the sphere with two colors.
Assigning Texture Color
Image textures may be used to assign multiple colors to dupliverts. In the “Outliner” window select the sphere object. Add a material (you must have a material color assigned to an object before you can apply a texture). Add an image texture (you may use any still image as a texture or you can use an animated texture or a movie file).
You can now display the texture in the 3D window as demonstrated in Chapter 3 Section 3.34 but Blender allows every duplivert to be a pixel.
With the sphere selected, in the “Properties” window “Texture” buttons, “Mapping” tab tick “From Dupliverts.” In the “Properties” window “World” buttons tick “Ambient Occlusion.” Render an image.
Since each duplivert is considered a pixel, each of the duplicated spheres is assigned a different color as determined by the texture.