Graphics Reference
In-Depth Information
Creating tree shaders - the leaves
In this second tree recipe, we will create the leaves shaders, as shown in the
following screenshot:
The leaves as they appear in the final rendering
Getting ready
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.
How to do it...
Let's proceed with the creation of the leaves shaders:
1.
Click on the New button in the Node Editor window toolbar or in the Material window,
and rename the material as leaf_alpha .
2.
In the Material window, switch the Diffuse BSDF shader with a Mix Shader node and
label it as Mix Shader Cutout; in the first Shader slot, select a Transparent BSDF
shader node, and in the second one, select a new Mix Shader node, which will be
labeled as Mix Shader Add Translucency.
3.
Add an Image Texture node (press Shift + A and navigate to Texture | Image
Texture), label it as MASK , and connect its Alpha output to the Fac input socket
of the Mix Shader Cutout node.
4.
Click on the Open button of the MASK node, browse to the 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.
5.
Add a Diffuse BSDF node (press Shift + A and navigate to Shader | Diffuse BSDF),
a Glossy BSDF node (press Shift + A and navigate to Shader | Glossy BSDF), and a
Translucent BSDF node (press Shift + A and navigate to Shader | Translucent BSDF).
 
Search WWH ::




Custom Search