Alpha Channels and Working With Trees
Supplement to Growing
Trees without Manure
A
tutorial by Frank Thomas.
With
thanks to Paul DeVerter for testing and editing help.
 |
How to Make the Alpha tga file from an Ordinary Photo
using PSP
 |
If
you have a simple bmp editor, you can use it for this work, then change
over to Paint Shop Pro to make the mask (alpha channel) and turn it into
a tga file.
|
 |
If
you are skilled at using Paint Shop Pro go straight to it, but this part
of the editing can be done any number of ways. |
 |
Select
the a picture file of a tree, open it up in the window,
|
 |
Using
the free hand tool, hack away at the edges, and then fill each section
as you do it with white.
|
|
 |
Do
this until you have removed the majority of the background, leaving just a
few pixels in awkward places
 |
Remove
these with a select tool, or a white paint brush. Use the large
magnification to make it easier. Then
you finish up with a tree on a blank white background.
|
|
 |
To
centre the tree,
 |
With
the paint brush set on one dot pixel, and using the numbers at the
bottom of the screen, put a mark on the bottom of the picture at the
number in the centre.
|
 |
Using
the selection tool draw round the tree and then adjust the tree so the
trunk is central with the dot you just put there
|
|
 |
Go
to the Magic Wand tool and click it in the white area and it will be
surrounded by a masked area made up of marching ants (Marquee).
|
 |
Go
to selections --- Invert. This
will invert the selected mask.
 |
Then Selections----
Save to alpha channel. You want the tree in the alpha channel to be white, and the
surrounding area to be black.
|
|
 |
Press OK
 |
File---Save As and choose to save it as a tga file, which includes the
alpha channel. Use a file
name that fits the project. Click
the Options box, and in the Save Options frame that
comes up, make
certain that 24 bits and Uncompressed are both checked. That’s it,
file done, now you can use it.
|
|
 |
White Background Areas within the Trees
 |
When working on some trees you will encounter areas of
white from the background on your texture file that will spoil the look
of the tree.
|
 |
The white has to be edited out, and it can be done,
but first make copies of the texture files you will be working on, and
put them in a safe place. Many
times I have forgotten to do this and I have had to start from scratch
again, and you feel mad with yourself for being an idiot, as you should
have know better.
|
|
Approach
One – Paint out the White Places
 |
Place your copy of the texture file into the editor,
and
 |
Selection---Load from Alpha channel (load the mask).
 |
You will now have your mask back in place
|
|
 |
Magnify till you can see closely the pixel set up
where the problem white is showing.
|
|

 |
Now select the clone tool, and start to fill in
the white areas.
|

 |
If you don’t like the part you have just done, open
the
 |
Edit…Command History
|
|

 |
You can delete each move till you get back to where
you want.
 |
Then you carry on doing this until you are happy with
the texture file.
|
|
 |
If You are happy, good now File -- Save.
|
Approach
Two - A Different and Difficult Method
 |
This has to do with using the Magic Wand,
and this requires a great deal of skill using the controls and settings, but
unless you try it you will never master it.
 |
You have a tree and it has holes in it, i.e.
spaces where you can see through the tree. |
|
 |
Click the magic wand in the picture to create a
mask, (like you did before and don’t forget to invert) but this time you
will find that the holes in the picture are not masked.
 |
If this is not corrected, you will finish up with
white areas on the tree where the holes should be.
|
|
 |
Holding down the Shift key, click the Magic
Wand tool inside each of the holes, (magnifying helps).
 |
You will find you have masked most of the holes.
|
 |
Now comes the problem, you may have to try
the settings in the Magic Wand,
|
|
 |
Tool Options
many times before you get it right.
 |
|
 |
When you are satisfied it’s the best you can do,
File -- Save again to up-date your texture file.
|
 |
Do not forget you can go to the Edit…Command
History and do revisions.
 |
If you ruin it,
put in another copy and start again.
|
|
|
When you are doing your modifications, another great
help is called
 |
Selections
-- Modify -- Expand
 |
If you click on this you will see the mask area
expand, allowing you to save with the edges of the files that might be
fuzzy and show up white, deleted.
|
 |
You just have to keep at it till you succeed.
|
|
 |
All things going well, you have now got your texture
file amended and still with its Alpha channel. Congratulations. That’s it,
now go and try making your tree again with your new improved texture. You
may have to keep trying until you are happy, but that’s what its all about.
It's a hobby right? - messing about and enjoying it.
|
 |
When you come to making your Seasonal Textures, you
can use the same techniques, By altering the colours with browns, reds and
yellows for autumn. Then spraying the autumn one with areas of white for
Snow etc. Of course saving each separately. Only your will and imagination
is your limit.
|
Enjoy.
Frank f.thomas
 |
Copyright © 2005 by Frank Thomas All
Rights Reserved
 |
No
reproduction without the consent of the Author |
 |
With thanks to
Paul DeVerter for testing and editing help. |
 |
With thanks too,
to kindly old Bill Hall for his Web Page formatting. |
|
|