Throughout the following tutorial I will describe a method that can be utilized in making a photorealistic tree that is a very small file size (approx 90kb). This method links the utilization of photo processing software, I use Adobe Photoshop, and Blender to create said trees. The trees consist of two intersecting images of a tree that have an alpha channel included to allow for non-tree pixels to be transparent. Thus, once created in Blender one can see the scene through the gaps in the foliage.
Step 1 - Creating a Photo with an Alpha Channel
The first step is to create an image that has an alpha channel that can allow for the background of a photo to be made transparent, therefore only showing tree pixels. To do this a photo processing package can be used. I will avoid describing this process as I myself learned from a great online tutorial which can be accessed at www.phong.com/tutorials/mask.tree/ .
(Tip1 - When choosing a photo pick one that has a tree against a primarily light coloured “sky” backdrop)
(Tip 2 - When exporting the photo with an alpha channel use .png format)
Now that we have a .png file with an alpha channel masking out the photo background we can create our tree in Blender.
Step 2 - Making the Tree
Open a new file in Blender and delete the default cube
Switch to side view (numpad 3)
Add a mesh plane and scale it to desired size (S)
Load the .png image we created to the plane
4a. RMC on the plane and switch to edit mode (Tab)
4b. Navigate to the Materials panel, add a new material, then click shadless under the materials tab
4c. Click add new under the textures tab and name it tree
4d. Click the map input tab and select the UV button
4e. Under the textures panel (F6) choose image under the texture type menu and then load the .png image we created
4f. Under the editing panel F9), click texfac (make) on the mesh tab
4g. Click assign under the links and materials tab to assign the image
Make the background in the photo transparent using Blenders Alpha functions
5a. Under the Materials panel and Map To tab, click on alpha once
5b. Under the Textured panel and image tab click on the use alpha button
5c. Under the materials panel and materials tab turn the alpha slider A to 0
5d. Turn on ZTransp under the materials panel and mirror/transp tab
We now have a single plane with a tree. To get the 3D effect switch to top view (numpad 7), duplicate the plane (Shift D) and rotate the duplicate 90 degrees (R then 90)
Now render and see what you have!
This is my first tutorial and I am sure it is not perfect but I hope it is helpful to someone.
Nice tut. Used to use this method in my games, back before I ever even heard of Blender I’m sure with trashad turned on for the ground plane that the tree’s shadow would look correct.
The shadow issue was the one thing that I didn’t have time to work out, but i seems that some of the people viewing this thread have done some of my work for me.
If you’re making the tree in Blender, and then using the rendered image, as I did, you can skip the Gimp/Photoshop step completely. Lets say for example, your trees are not found anywhere on Earth. Like me, my trees are alien, so therefore are not necessarily green. There is a great resource out there called NGPlant. You can find it here: http://ngplant.sourceforge.net/
It’s Open Source, can be downloaded into Windows or compiled for Ubuntu 8.10 and 8.04. and its free. In NgPlant, you can make any plants or trees you want, and color them any way you want. So if you wanted to make a magenta tree trunk, for example, with squid-like leaves that are translucent like seaweed, you can make an ngplant and import it into Blender as a Wavefront Object, and then color it any way you like, but ngplant uses algorithms based on Earthlike plants, such as the fibonnaci series, so they will still look natural and convincing.
These are the resources I used to make my plants, and the photos are uploaded at the bottom. As you can see, you can get some really weird, alien-looking plants such as in Clone Wars or an outer space video gaming system.
But my problem was getting the planes to work for me as truly transparent planes.