Little Stick

HomeInfoGalleryDownloadBuyContact


Make a leaf texture.


If you want to use your own pictures of leaves on your tree you first need to make a leaf texture file.

In each colour picture there are usually three channels one each for red, green and blue. When these three channels are combined the colour picture is created. Little Stick needs to know where the leaf exists and where it does not and for this it uses an additional channel called an Alpha Channel. The alpha channel is just like a red, green or blue channel but stands for transparency. Where the alpha channel is black, the picture is transparent. Where the alpha channel is white, the picture is opaque. Finally where the alpha channel is grey, the picture is semi transparent. The best way to understand alpha channels is to experiment with Photoshop or the GIMP.

To examine a typical alpha channel choose "Save Picture" from the File menu and check the box "Export alpha only". When you click "OK", the picture saved will be the alpha layer of the current picture.

For a simple example use Little Stick.

To do it properly, use a photograph with an image editor such as Adobe's Photoshop or GNU's GIMP.


Using Little Stick

Little Stick creates a default leaf texture for each tree. In this example the picture of a tree will be used as a leaf texture.

1. Choose a tree to draw.

2. Use the view controls in the View palette to move the tree such that the trunk starts in the middle and at the bottom of the picture.

3. Select "Save Picture" from the File menu.

4. Choose a name for the picture and select TIFF for the picture format.

5. Choose another tree to draw, one where you can see individual leaves clearly such as the Flower. (Fantasy, Others)

6. Use the view controls in the View palette to move the tree such that a leaf is clearly visible.

7. Click on the Load Leaf texture button and choose the tree picture saved earlier.


Using Photoshop

Photoshop is the leading commercial image editor.

1. Take a colour photograph of a leaf against a white background.

2. Open the picture in Photoshop.

3. In the Layers, Channels and Paths tool box, click on the Channels tab and then the Create new channel button.

4. Click on the RGB channel to correctly display the leaf again.

4. Use the magic wand tool to select the white area around the leaf. (Click on the white area)

5. Invert the selection to select the leaf rather than the area around it. (Command + Shift +I)

5. Tidy up the selection with the lasso tool.

6. Click on the new channel that you have just created. The area of the leaf should still be selected but the picture will be black.

7. Press delete. The new layer should be white where the leaf exists and black where it does not.

8. Select "Canvas Size" from the Image menu. Choose the dimensions of the canvas to be square rather than rectangular.

9. Select all. (Command + A)

10. Select "Free Transform" from the Edit Menu, (Command + T), and move the picture so that the stem of the leaf exits the picture at the bottom and middle.

9. Save the picture in TIFF format with the Alpha Channels box checked.

This picture file is now ready to be used in Little Stick.


Using the GIMP

The GIMP is the leading free image editor. These instructions apply to GIMP v2.2.10, but you should be able to use them with other versions.

1. Take a colour photograph of a leaf.

2. Open the picture in GIMP.

3. Select the Layer menu, then Transparency, then Add Alpha Channel.

4. Choose the Select contiguous regions (magic wand) tool and click on a background area.

5. Tidy up the selection with the Select hand-drawn regions (lasso) tool.

6. Select Clear from the Edit menu.

7. Select Canvas Size from the Image menu.

8. In the Canvas Size window, click on the chain so that it changes from linked  to unlinked .

9. If the number in the Width box is the smallest, change it to be the same as the number in the Height box. If the number in the Height box is the smallest, change it to be the same as the number in the Width box.

10. Click the Center button.

11. Click the Resize button.

12. Choose All from the Select menu.

13. Choose the Move Layer and Selections tool. Click and drag the picture so that the leaf starts in the middle of the picture and at the bottom.

14. Choose Save As from the File menu. Type in filename.tif. The .tif on the end sets the image type to TIFF automatically.

15. Click Save and then Export.

16. I suggest choosing LZW compression from the save window. This compresses the image and is very compatible with other programs that read TIFF images. Click OK.

This picture file is now ready to be used in Little Stick.



HomeInfoGalleryDownloadBuyContact
 
Little Stick Copyright © 2006 Fenwick Cooper
You can contact Little Stick via email: treebeard@littlestick.com