In this second tree recipe we will create the leaves shaders, as shown here:
Carrying on with the blend of the previous recipe, now press Shift and activate the second and the eleventh layers also and select the leaf_generic_mid object.
Let's go straight to creating the leaves shader:
leaf_alpha
.Mix Shader Cutout
. In the first Shader slot, select a Transparent BSDF shader node and in the second one, a new Mix Shader node that will be renamed as Mix Shader Add Translucency
.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 silhouette of a leaf, with a transparent alpha channel). Set the Color Space to Non-Color Data.Mix Shader1
and Mix Shader2
.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 textures
folder, and load the leaf_generic_trans.png
image. Set the Color Space to Non-Color Data.1.500
.COLOR
, and connect its Color output to the Color input socket of the Diffuse shader node and to the Color input socket of the Translucent node. Click on the Open button, browse to the textures
folder, and load the leaf_generic_col.png
image.0.350
and the Value to 2.000
.BUMP
. Add a Bump node (press Shift + A and go to Vector | Bump) and connect the Image Texture node's Color output to the Height input socket of the Bump node and the Normal output socket of the latter to the Normal input sockets of the Diffuse, Glossy, and Translucent nodes.textures
folder, and load the leaf_generic_bump.png
image. Set the Color Space to Non-Color Data and the Bump node's Strength value to 0.002
.Now, assign the same material to both the leaf_generic_low and leaf_generic_hi meshes on the eleventh layer.
The modeled leaf mesh doesn't need the alpha channel. So, select the leaf_generic_hi object and in the header of the Node Editor window, click on the user data number to make it single user. Rename the new material as simply leaf
and delete the MASK and Transparent BSDF nodes. 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 stylish models coming from the Big Buck Bunny short movie. Real objects have more subtle details and more randomly 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.
3.135.249.37