How to use alpha maps to render trees in LuxRender and Blender 3D
Since I wrote an article suggesting a collection of free textures of trees and shrubs, I have received a few messages asking me how to use those textures in LuxRender or YafaRay. Today I`m going to show how to use alpha maps in textures, to render cutout trees and people in LuxRender, which is a great way to add vegetation to external renderings for architectural visualization, because we will need only a flat plane to represent the trees instead of 3d geometry.
The first thing to do is select two texture files to use in our example. In LuxRender we can`t use transparent PNG files to create alpha maps. To do that, we need a texture for the diffuse channel and other file in black and white, where the black areas will become transparent.
The secret to setup this material in LuxBlend is to use a Mix material where one of them is a matte material and the other is a null. A null material can make parts of the objects transparent. Create a plane at the 3D View and add a texture using UV Mapping in Blender. In LuxBlend setup the material to make it looks like the image below:
Choose a mix material and change the second material (mat2) type to be a null. Then right below the material preview, find the amount parameter and press the little “T” button on the right of a numeric slider. This will enable the use of a texture file to control the Mix material. Choose imagemap and set the 2Dmap as uv, and to finish the setup add the path to the opacity map file. Set the amount to 1 and that`s it!
For this scene, I have created a single plane and created a few copies of the object around a simple scenario.
If we render the scene using a Sunsky environment and a sun light, this will be the result.
The planes will show the textures with the alpha maps and we will have realist trees that will be a nice addition to any external view for architectural projects. The same technique can be used with 2d cutout people. Notice that trees can even cast shadows based on the alpha map.