Alpha Channel Trees


Home Tree's in TSM Observations Alpha Channel Trees Hedges

 

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.

 

bullet

How to Make the Alpha tga file from an Ordinary Photo using PSP

bullet

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.

bullet

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.

bullet

Select the a picture file of a tree, open it up in the window,

bullet

Using the free hand tool, hack away at the edges, and then fill each section as you do it with white.

        

 

bullet

Do this until you have removed the majority of the background, leaving just a few pixels in awkward places
bullet

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.

 

bullet

To centre the tree,

bullet

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.

bullet

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

 

bullet

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

bullet

 Go to selections --- Invert.  This will invert the selected mask.
bullet

 Then Selections---- Save to alpha channel.  You want the tree in the alpha channel to be white, and the surrounding area to be black.

 

bullet

Press OK
bullet

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.

 

bullet

White Background Areas within the Trees

bullet

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.

bullet

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

bullet

Place your copy of the texture file into the editor, and
bullet

 Selection---Load from Alpha channel (load the mask).
bullet

You will now have your mask back in place

bullet

Magnify till you can see closely the pixel set up where the problem white is showing.

 

 

bullet

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

  

 

 

 

 

bullet

If you don’t like the part you have just done, open the
bullet

Edit…Command History

 

 

bullet

You can delete each move till you get back to where you want.
bullet

Then you carry on doing this until you are happy with the texture file.

 

bullet

If You are happy, good now File -- Save.

 Approach Two - A Different and Difficult Method

bullet

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

 You have a tree and it has holes in it, i.e. spaces where you can see through the tree.

 

bullet

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

If this is not corrected, you will finish up with white areas on the tree where the holes should be.

bullet

Holding down the Shift key, click the Magic Wand tool inside each of the holes, (magnifying helps).
bullet

You will find you have masked most of the holes.

bullet

Now comes the problem, you may have to try the settings in the Magic Wand,

bullet

Tool Options many times before you get it right.
bullet

 Still holding down the Shift key carry on filling the holes with the Magic Wand.

bullet

When you are satisfied it’s the best you can do, File -- Save again to up-date your texture file.

bullet

Do not forget you can go to the Edit…Command History and do revisions.
bullet

If you ruin it, put in another copy and start again.

When you are doing your modifications, another great help is called

bullet

Selections -- Modify -- Expand
bullet

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.

bullet

You just have to keep at it till you succeed.

 

bullet

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.

bullet

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.

 

  Frankf.thomas

 

bullet

Copyright © 2005 by Frank Thomas All Rights Reserved
bullet

No reproduction without the consent of the Author

bullet

With thanks to Paul DeVerter for testing and editing help.

bullet

With thanks too, to kindly old Bill Hall for his Web Page formatting.