created: June 15, 2009
A useful little script for making a more Realistic Leaves Shader.
Current Version 1.1
There was this tutorial that i had seen a long time back, about how to make leaves textures react to light, cant seem to find it now, but this script is based off those methods. What it does is take the input texture of the leaves, and overlay it with light information, so where the light has direct contact with the leaves will be an overlay with the bright color, in the default case that would be shade of yellow, and where the leaves doesn't come in contact with light, will be the dark color, will be a shade of green darker to the original texture. This eventually gives the leaves a feel of light actually diffusing inside the leaves. like a much cheaper version of subsurface. :) Below is a render (Left)Default Shader and (Right) crLeaves Shader. Only changes in both the images is the shader. Lighting and Textures are all the same.
Input the name you want for the Shader.
Set the Dark Color and the Bright Color.
Click Browser and Select the Leaf shader that you want to assign.
Select all the leaf meshes and click Create Shader.