"Intersecting Photo" Tree Tutorial (Fixed)

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

  1. Open a new file in Blender and delete the default cube

  2. Switch to side view (numpad 3)

  3. Add a mesh plane and scale it to desired size (S)

  4. 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

  5. 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

  6. 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)

  7. 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.

Thanks

Attachments



Looks pretty good. I haven’t tried it yet but will the tree cast a square shadow, or a shadow in the shape of the tree? :confused:

I would like to know this too but even if the shadows arent cast, you can create a seperate object and select shadow only option (I think)

Nice tut. Used to use this method in my games, back before I ever even heard of Blender :slight_smile: 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.

Thank You:D

You might have to enable “Trashadow” in the material settings (Transparent shadow) for it to not cast square shadows.

Yes Vek, that is exactly what you need to do.

More specifically, you need to hit ‘transhad’ on the object recieving the shadow, which in this case would be a ground plane.

Also, you will have to stick to using raytraced shadows for it to work. Buffered shadows do nada.

What if you don’t have Photoshop?

get gimp for free. http://www.gimp.org/

I have the GIMP. Does it have all the features needed for the tutorial?

I tried this method and there were some problems.

#1: The tree didn’t stay completely in the plane, but moved partly out of the plane depending on where the camera moved.

#2. I don’t quite understand what you meant by “Textured” panel. There is no “Textured” Panel and I didn’t see a “Use Alpha” button.

But maybe its because of the version of Blender I’m using: Blender 2.46 in Ubuntu 8.10 Intrepid.

#3. The camera doesn’t pick up other trees (intersecting planes) behind the first one (It just renders the one tree.)

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.

There is also an excellent plant-making tuturial that uses ngplant, GIMP, and Blender and integrates them all here:
http://yorik.orgfree.com/tutorials/treemaking.html

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.

Attachments




Here’s some more examples of trees made in NgPlant and in Blender, Gimp, and Inkscape using York’s tuturial

Attachments