Graphics Programs Reference
In-Depth Information
Creating tree shaders - the leaves
In this second tree recipe we will create the leaves shaders, as shown here:
Getting ready
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.
How to do it...
Let's go straight to creating the leaves shader:
1. Click on the New button in the Node Editor window's header or in the Ma-
terial window and rename the material as leaf_alpha .
2. In the Material window switch, the Diffuse BSDF shader with a Mix
Shader node and rename it as 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 .
3. Add an Image Texture node (press Shift + A and go to Texture | Image
Texture ), rename 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 Image Texture node, browse to the tex-
tures folder, and load the leaf_generic_mask.png image (which ac-
tually is a simple black silhouette of a leaf, with a transparent alpha chan-
nel). Set the Color Space to Non-Color Data .
Search WWH ::




Custom Search