In this second tree recipe, we will create the leaves shaders, as shown in the following screenshot:
Carrying on with the blend file of the previous recipe, now, activate (hold Shift while clicking) the 2nd and the 11th scene layers, and in Outliner, select the leaf_generic_mid object.
Let's proceed with the creation of the leaves shaders:
leaf_alpha
.MASK
, and connect its Alpha output to the Fac input socket of the Mix Shader Cutout node.textures
folder, and load the leaf_generic_mask.png
image (which actually is a simple black leaf silhouette with a transparent alpha channel). Set Color Space to Non-Color Data.Mix Shader1
and Mix Shader2
.0.794
, G to 0.800
, and B to 0.413
, and the Roughness value to 0.500
.0.300
(this value establishes the amount of translucency in the shader).TRANSLUCENCY
, and connect its Color output to the Fac input socket of the Mix Shader2 node. Click on the Open button, browse to the usual textures
folder, and load the leaf_generic_trans.png
image. Set Color Space to Non-Color Data.1.500
.COLOR
, and connect its Color output to the Color input socket of the Diffuse BSDF shader node and to the Color input socket of the Translucent BSDF node. Click on the Open button, browse to the textures
folder, and load the leaf_generic_col.png
image.0.350
and Value to 2.000
.BUMP
; add a Bump node (press Shift + A and navigate to Vector | Bump) and connect the BUMP image node's Color output to the Height input socket of the Bump node, and the Normal output socket of this node to the Normal input sockets of the Diffuse BSDF, Glossy BSDF, and Translucent BSDF shader nodes.textures
folder, and load the leaf_generic_bump.png
image. Set Color Space to Non-Color Data and the Bump node's Strength value to 0.200
, as shown in the following screenshot:Now, assign the same material to both the leaf_generic_low
and leaf_generic_hi
meshes on the 11th layer.
The modeled leaf mesh doesn't need the alpha channel, so select the leaf_generic_hi object, and in the toolbar of the Node Editor window, click on user data number to make it single-user. Rename the new material as leaf
and delete the MASK and Transparent BSDF nodes, and then press Alt + D to remove the Mix Shader Cutout node from the link and delete it as well.
Remember that the examples in the preceding and following images are made with very stylized models that come from the Big Buck Bunny short movie; real objects have more subtle details and more random repeating patterns, but in this case, this just depends on the image textures you are going to use for your material.
Such a shader is of good use not only for leaves, but also for other kinds of plants; in many cases, it's enough to give variations to the color.
18.220.191.227