Blender 2.5 Materials and Textures Cookbook
上QQ阅读APP看书,第一时间看更新

Creating the quartz pebble material

Quartz is an extremely common type of stone that is usually layered inbetween other rock types. However, pebbles on beaches where this type of rock is common often break off from the layers and are tossed in the sea to form pebbles. The second pebble we will create is based on such a variety of rock.

Getting ready

If you have completed the previous recipe load up the saved pebble-03.blend file.

Alternatively, you can download a pre-created file from the following location the Packt Publishing website.

How to do it

Let's create a new material to represent the quartz pebble. To do so we need to have the pebble object selected and temporarily unlink the Surface-Color material, giving a clean surface upon which to design our quartz material. However, once you unlink a material from an object it will only be available for reuse during your current working session. As soon as you close that Blendfile, even if you have saved it, the material will be lost. Blender normally only saves materials assigned to objects. However, we can fix a material or texture by clicking the F button to the right of the material or texture name.

With the pebble object selected click the F button, next to the material name in the Material properties panel, to fix the material into the blendfile. Then click the X button to unlink it from the Materials panel.

If you hover over X it will display unlink datablock. You will notice that if you Shift-click the X you will permanently remove the material the next time you save. So be careful as we only want to temporarily remove the link to our Surface-Color material, while we create the quartz material.

  1. Click the New tab to create a new blank material and name it Quartz.
  2. We can keep all the default material properties set apart from the Diffuse color. So change this to pure white or RGB 1.00.
  3. Switch to the Textures panel and add a new texture of Type Clouds and name it QuartzClouds.
  4. Under the Clouds tab set Grayscale and Soft, Size to 0.36, and Depth to 2.0.
  5. Under Influence only have Normal selected and set to -1.00 and under Blend type Screen. Select RGB to Intensity, Negative, and Stencil. Also check Old Bump mapping. Finally, change the color selector to R, G, B 0.700.

    That has created a slight bump map to the texture and a stencil, of which only some of the following textures will appear through.

  6. In the Texture properties select the next free texture slot and create a new texture of type Musgrave, and name it QuartzMusgrave.
  7. Under the Musgrave tab set the type to Multifractal, and Basis Voronoi F1 with Size 0.05.
  8. Under the Colors tab set Adjust/ Brightness to 0.467 and Contrast to 5.000.
  9. Under Influence select Diffuse Color set to 1.00 and Geometry Normal to 10.00. Set the Blend type to Screen and adjust the color picker to R and G to 0.84 and B to 0.68. Also select Old Bump Mapping.
    How to do it

    This will give a weathered and slightly dirty appearance to our quartz material. The quartz in the pebble example is contaminated with other rock fragments. Something that only becomes apparent when you look through a magnifying lens at the real material. If you were to render at this point, then you have a texture that could be used as a pebble material as it is. But we can take it further by varying the worn surface across the pebble.

  10. Select an empty texture slot below the QuartzMusgrave texture. However, rather than creating a new texture we will load up the same QuartzMusgrave texture into the new slot but make some modifications to how it is used in our material.

    Select the checkered icon that precedes the texture name shown in the following screenshot:

    How to do it

    From the displayed list select QuartzMusgrave. The number 2 should appear just past the texture name to show that this texture is used twice.

  11. Under Influence and Geometry change the Normal value to 5.00, the Blend value to Screen, and change the color selector to black (RGB values to 0.00).

Save your work so far, incrementing the filename to pebble-04.blend, and perform a test render.

How to do it

We have produced a surf-damaged pebble showing the effect of being crashed across other pebbles as the tide ebbs and flows.

How it works

The second material that we created was to simulate the quartz veins in the pebble. Each of the textures used in this material produce a surface, in much the same way as the first. Procedural textures vary in the surface color and normals (bump) to produce the desired effect. However, there are several special techniques used that are worth highlighting as they can add a little bit of magic to a surface simulation task.

The first texture is named QuartzClouds and this has only been used to influence the normal of the material. However, you will notice that under the Influence/Blend setting Negative, RGB to Intensity, and Stencil have all been checked.

  • Negative will reverse the effect of the texture. This is an overall setting and any of the set influences will be affected. In our case only normal is set.
  • RGB to Intensity will internally convert the image to grayscale, so that only those intensity values affect any of the other influence settings. If the color intensity had been set the default magenta color would have been mixed with the material color based on the proportions of gray in the texture. We can therefore even add color with a black and white texture. In our case color influence is not used so we can ignore this effect. However, although the default color is magenta we can alter this color using the color picker within the Influence tab.
  • Stencil creates a mask, or stencil, to filter all following textures in the material.

However, Stencil will only work if RGB to Intensity is set, even if it's just a grayscale texture, such as cloud.