| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

TreeTutorial

Page history last edited by PBworks 16 years, 9 months ago

Making Trees using POVRay, POVTree, and Photoshop

This tutorial will tech you how to make trees. Lots of trees. Any kind you can imagine.

 

1. Head over to the POVRay website and download POVRay, a free raytracer, and install it. You can spend years trying to figure this one out, but don't bother for this, as I'll give you the basics, and another program will provide the objects....

 

2. Head over to the POV-Tree website and download this excellent tree modeller, and install it. I installed mine under the POV installation directory.

 

3. Fire up PovTree by running the povtree.jar file. I have a jre installed, but if you don't have java, you might have to head over to sun and to get java installed. You should get this screen:

 

4. Pick a tree default. Lets use Olive, and uncheck roots, as we don't need them, then click preview:

 

5. Select File->Export->POVRay Mesh. I called this one testtree.inc:

 

6. Fire up POVRay (I happen to use version 3.5):

 

7. Create a new file as show, and use the following scene file (you can just cut and paste):

#version 3.5;
#include "colors.inc"
#include "testtree.inc"

// ----------------------------------------

camera {
location <0.0, 45, 0>
look_at <0.0, 0, 0.0>
up z/40
right x*1.33/40
}

light_source {
<0, 0, 0> // light's position (translated below)
color rgb <1, 1, 1> // light's color
translate <-30, 30, -30>
}

light_source {
<0, 0, 0> // light's position (translated below)
color rgb <1, 1, 1> // light's color
translate <40, 80, 30>
}

// ----------------------------------------

plane {
y, 0
pigment { checker }
no_image
}

// -ve z to shift down the screen, +ve z to shift up
object {TREE translate <0,0,0> }

 

8. Pick an output of 800x600 and Anti-aliasing AA 0.3 and add the two command line parameters *+UA +FN* to the renderer, then click on the Run icon. There will be a long wait while it says /Parsing/ in the status bar. Then you will see a top down view of the tree as it is generated. The file will be saved as a PNG with a transparent background. Because the center of the trunk is in the center of the page, the branches may be a bit offset. The last line can be changed to move the tree up or down to fit in the page (or the camera can be moved, but that is a whole other tutorial):

 

You can you it as is in Dungenforge or Dundjinni, or you can load it into an image editing program like Photoshop and enhance it a bit. Go back to POVTree and hit the randomize buttons to make more variations of the same tree type.


 

9. Load the image up in Photoshop. Make a copy of the layer:

 

8. Select all the pixels of the tree. I used the magic wand and clicked on the blank area, with anti-aliasing checked and contiguous unchecked, then inverted the selection. The do a gradient fill, black to white:

 

9. Set the blend mode to Screen, and opacity to 25% This makes the center of the trunk darker and the tips lighter, do give more depth:

 

10. Go back to the first layer, and add a drop shadow using one of the standard techniques. I used an outer glow effect of 60% and 10 px here. I also added a bevel effect to make the branches a bit rounder looking. Here is the finished tree, cropped and saved out as a png:

 

The other tree types produce equally cool results using the exact same techniques. Here is a palm tree (I changes the gradient fill to be from white in the meddle to black at the outer edges, however, to make it look taller in the center):

 

And here is an elm tree:

 

Hope this was informative!

-Rob A>

var sc_project=2590863; var sc_invisible=0; var sc_partition=25; var sc_security="d2dd4d8b"; free hit counter

 

Comments (0)

You don't have permission to comment on this page.