The first material I will go through is relatively advanced and therefore it is important that you know of nodes to create materials. If you are not familiar with this, there are a lot of good guides on the net. You can also find information about the nodes in blenders user manual.
Below you can see how the final rock material looks. The .Blend file with the material can be downloaded here (press the “klik her for at downloade filen” botton on the page to download it)
How do you go about this task?
Often it’s the small details that make the difference. It is also what makes good materials very complicated. Often a layer of material is not enough to get a realistic appearance so it is important to start with a real image which can be used as a starting point.
When you have a good reference image by hand, it have to be analyzed.
In this tutorial is used a close up of my own material (to avoid copyright issues). There are two things that draw special attention in the material
- There are not just two colors but many (7 colors have been used for this rock material).
- The colors are dispersed in concentrated areas. This means that there are areas where you won’t see a certain color and areas where it will be mixed with other colors.
It is this property we want to recreate by manipulating nodes and textures.
To create variation in small areas
Normally, one might think several Noise Textures in layers could handle it. If you do so you will not split colors in areas but just make variations in the entire area. To create the division of colors in different areas, I simply told, removed the lowest values from the noise texture.
To better understand this, we must understand what data a noise texture consists of. In the nodes editor the noise texture has an output called Fac. Fac stands for fraction and gives values from 0 to 1 as, for noise texture, vary with the coordinates of the object. This Fac indicates how two colors are mixed in the Mix Shader node.
If you follow a straight line across a surface the change in fac can be illustrated in a 2D coordinate system as.
To create variation in specific areas I want to put values under 0.5 is equal to 0. Thus there will be no mixing between the colors of the values below 0.5. For values over 0.5, there will be a mixture between the colors. This will give a pattern that can be illustrated by mixing red and blue as seen here.
Here the completely red areas have had values below 0.5 where areas with values above 0.5 is a mix between blue and red and gives the purple shades.
The node setup
This way of mixing the colors is done with all the colors. Different colors has different degrees of coverage thus the parameter for the noise texture is changed for each color to fit the reference image.
Since the above pattern is used several times, I first form my own group of nodes that can be easily copied.
All values to the left makes it possible to change the texture and the limit value for which you put all values equal to 0 for the noise texture.
node functions are as follows:
- Divide node: Better control of the limit value for which you put all values equal to 0 for the noise texture
- Substract node: Substract the selected value from the noise texture
- Round node: Rounds to the nearest integer.
- Add node: Add what have been Substract, as the values would not necessarily lies between 0 and 1 and thus would not make sense in the next node.
- The first multiply node: Multiplies areas from noise texture that is below the limit with 0 and will thus be 0 everywhere for these values. Multiplies the areas of the noise-texture that is above the limit value with 1 and thus keep the original value.
- The second multiply node: Adjust the amount of mixing.
This group of nodes is used to control the mixing of colors, which are repeated with changed parameter which fits with the spread of the different colors used in the rock. The total node setup can be seen here.
To give the finishing touch I add a noise texture to the displacement in order to give it some bump mapping. If you add a math node set to multiply in between, you can controle the degree of bump mapping.
In order to adjust the size of texture is used a Mapping node. Enjoy