I’ve been asked several times how one might create a simple prim tree. This short tutorial is in response to those requests.
I’ll first dispel a misconception. Selecting the Tree icon in the Build window and clicking the ground will simply rez, at random, a standard 1-prim Linden (as in the company, not the genus) tree or shrub. Don’t use this if you want to create a tree from a photographic image.
I’ll assume you will have a good image of a tree prior to commencing your build. By ‘good’ I mean: you’ll have removed any background imagery from behind the tree, have made the remaining plain background transparent, and have saved (and uploaded) your image as a PNG or TGA (see example, right). Because we shall be using three prims to create our tree (though see note at the end of this tutorial), rotated about an axis, you should ensure that the base of the tree is at bottom centre of the image.
Let’s begin. First rez a box to the ground, and stretch the x and z axes to, respectively, the width and height of your tree. Your y axis, on the other hand, should be wafer thin, since the illusion of a three-dimensional tree will depend on the duplication and rotation of a flat image.
With the panel still selected, choose ‘Default Transparent Texture’ from the Texture tab. This will ensure that the edges of the panel will remain invisible when you add your tree texture (texturing the entire box with the tree image will leave visible edges):
Now, with the yellow outline your panel still marking its position, open your inventory and drag your tree texture onto the front and back face of the panel:
The three-dimensional illusion emerges from having three copies of the panel rotated at equal angle about the centre axis. So now, with your first panel still selected, switch to the Create window and check the ‘Copy selected’ and ‘Center’ boxes, top left. Then click on one of the textured faces of the panel: this will create a new copy of the panel, perfectly aligned along the x axis (‘Center’ensures the alignment). Your panel will be a mere 0.01m thick, but should you want exact centre alignment with the first panel you can copy the y position from the original panel into the copy of the panel.
Now, in the Rotation section at the bottom of the window, enter a value of 60 for z.
Make a further copy; and for this copy enter a value of 120 for z. An aerial of your tree will look like this:
Finally, select all three panels and link them into a single object. Et voilà! you should now have a quite respectable-looking tree!
In this tutorial I’ve used three prims to create a tree; and in most cases three prims will be sufficient. Obviously, however, the greater the number of rotated panels in the model the more realistic the end result is likely to look. An inspection of a range of inspectable trees in SL will reveal that a tree can be made of anything from three to as many as eight prims; however, realism has to be balanced against prim count, and a slight loss of 3D realism will generally be preferred to an unnecessarily high prim count.