This is a small material for the starters. It is very simple and shows how clipping in the mapping node can be used in creating patterns at a specific location on a material. You can download the material here (press the “klik her for at downloade filen” botton on the page to download it).
The bowling pin is an essential part of a bowling scene. This is a material that will be easier to create with a texture. It will just be a white picture with two red stripes. But it gives the chance to use clipping for a material. The bowling pin makes a simple case for the use of clipping.
As already described, the bowling pin material is easy. It is white with red stripes, and have a glossy look. If it is not a new pin, it will also have some scratches or dirt.
The material is build up of three parts, the stripes, glossy, and dirt part.
Stripes: Are made using a sinus curve which will make it oscillate between 1 and -1. By using a restriction on the minimum value, it will oscillate between 1 and 0. Further using a round node will generate values of only 1 and 0 and thus creating a sharp change in colors.
Glossy: Simply made with a glossy shader and a mixer.
Dirt: The dirt is the last part, as it should not be affected by the glossy. It is made with a noise texture and controlled by a power node.
The node setup for the material is seen in figure 2 (click to enlarge)
The stripes are the primary part of this material. It basically manipulates the values of one coordinate parameter with a sinus curve to generate stripes. The node setup for this can be seen in figure 3.
Separations of coordinates
The y-coordinate values are manipulated to generate the stripes. (For my model, the Y-coordinate is up because the local coordinate system has been turned during the modeling. To change the direction of the stripes, just change output from the separate node). In order to only manipulate the Y-coordinates, they are separated with the separate node.
Oscillation in color
The sinus function is used to create the oscillation in color. By using the maximum node, I can prevent the values of the sinus function from giving negative values. The power node determines the shape of the curve of the sinus function as illustrated in figure 4.
The black curve shows the sinus function as it varies with the power node. The red curve shows the affect of the round node. This means that at the break of the red curve, there is a break in color. Thus, the red curve shows the width of the stripes.
The mapping node (here called placing stripes) is used to increase the number of stripes by scaling the y-values. The location is used to change the position of the stripes. The most important in the mapping node is that min and max is checked off. This makes it possible to clip the values at the edge of the min and max values, to the values beyond the min and max value. Thus, with white color at the edge there will only be two red stripes.
This value is then used as the factor in a mix shader node of red and white color.
The glossiness of the pin can be controlled by a mix node and a glossy shader.
The dirt is generated by a noise texture and a mapping node is used to stretch the pattern. The power node makes the dirt spots more sharp.