|

Growing Trees without Manure.
Or how to make
trees without Bull
A
tutorial in Computer gardening by Frank Thomas.
With
thanks to Paul DeVerter for testing and editing help.
Before we start it is assumed that
you know how to use a Drawing programme like Paint Shop Pro, or other means of
creating tga pictures and masks. There are tutorials that go into using
these Items, so there is no need to re-write all that. You will also need
Train Sim Modeller.
 |
Making the Texture file using a Drawing programme.
 |
To start with, go out and
Photograph, and or get access to pictures of Trees. |
 |
You will have to make your
Texture file before you can make a tree. |
 |
All the next part is working in
the Paint Shop Pro (or similar) and knowing how it works. |
 |
Work with a picture area of 512
pixels (or more) in the Paint Shop Pro, it can always be reduced in size
later. |
 |
Edit the picture to remove all
the back ground so that you have an isolated tree on a blank background. |
 |
Use the clone tool fill in any
awkward bits, or holes, so you have a reasonable looking tree. |
|

 |
Next:
 |
If the trunk is not central, or
a peculiar shape, now is the time to change that, by using mirror
imaging etc. until its base is central in the picture. |
 |
If you do not do this, the end
result will be a tree with a split trunk. (Look at usdecidtree3)
For help in making the tga file with an alpha channel, look
at the Supplement to this tutorial called How
to Make the Alpha tga file from an Ordinary Photo (Alpha Channel
Tree's) |
|
 |
Next:
 |
The hardest part is now over,
all you have to do now is create an alpha channel and convert it into a
tga file, give it a name, make it 256 x 256 pixels in size, and with the
trunk dead centre. |
 |
Save it as a name (in this case
for demo purposes Ftree1.), and you know what folder it is in. |
 |
Or use the attached
Ftree1.tga file that I have made to get you going and try out the
technique.
|
|
 |
Working in the Train Sim Modeler.
 |
In the Modeler open a new folder
and call it “Ftree1”. Place a copy of the tga file you have just
made, inside the folder, so that every thing is kept together, save
every thing to this folder. |
 |
Open the Modeler
and select New, click
the Box mode, then set the Height 6 m (for the height of
the tree). Set the width
for the width of the tree 4 m and the depth for 0 (zero). |
 |
Select the origin to the bottom.
Now enter it OK. |
|
 |
Next:
 |
Look at the outlines in the Poly
mode, and remove all the sides, top and bottom, |
 |
Leaving only 2
polygons - the front and back. |
|
Go back and select
Edit…..Part Properties.

 |
 |
Open the Material box,
and select “TransCrcfrm”,
press OK,
 |
The
reason for this choice is when I first made Trees I used what one
would expect: Trans norm. However playing around (that
is how we learn) I tried TransCrcfrm, and to my
surprise found the trees had a better brighter look. That simple. So
I’ve used it ever since. |
|
 |
You have now set it up so it can
use the tga file for your tree. |
|
 |
Select Part, then to the bottom
and select Textures. |

 |
When the textures window opens, use the
first “Browse” (Front) window and find your folder Ftree1, then
select your “Ftree1.tga” Texture file.
 |
Press open and the Texture Properties
window opens. |
|

 |
Select the Ftree1.tga file, press Open,
and the Texture Properties window opens. |

The next part is easy but it is important to get it
right.
 |
 |
Set the first “X Crop”
so that it is near the edge of the tree, now note its number in the Window 42. |
 |
As the trunk is dead centre of
your picture at the base, the balance has to be correct.
 |
As the first number is 42
double it 84, now remember the overall size is 256. (Across) |
 |
Take the 84 away from 256
and you are left with 172, put that number in the “X Size” |
 |
You will see that although
the tree is slightly off to one side, (that happens in nature) |
 |
the trunk is still central. |
|
|
 |
Now set the “Y Crop” just
over the top of the tree, and the “Y Size” at the point at the
base of the trunk, and make a note of the numbers. Press OK first
side done.
 |
Now follow the same procedure
for the Back (using the same numbers in the boxes) but with one change.
This time tick the “Invert X” box. (This will give a matching
back and front.) |
 |
Press OK. |
|
 |
You have no sides or top and bottom to
texture. Simple huh. |
 |
Click the Texture assignment OK
and that bit is done. |
If you look at the Trees that are
loaded on to a route in single form they are like 6 leaves of a book. The ones
that are loaded on to the route with the “Forrest” file system (for large
areas) are cruciform or 4 leaves in a book. This does not matter. What you are
doing here will finish up the same and can be used as “Forrest” files.
Because the Forrest file system automatically changes them from 6 to 4 leaves to
use them.

 |
Now finish off the Tree.
 |
Looking at the top view you have just
one thin part.
|
 |
Select the “Edit” Copy
then press the “Edit”
Paste. |
 |
You cannot see it yet but go into “Transform”
Rotate
 |
Set the “Y” window to 120,
and press OK
|
|
 |
You will now see two thin strips, at
angles to one another, crossing in the centre. |
 |
Do the same again by following the above
“Edit Copy, “Edit”
Paste, Rotate |
|
 |
Press OK and now you have the
complete 6 leafs |
 |
You will not see the pictures of the
trees, like you would with a bmp, because the tga file has hidden depths. The
way it is constructed it has another layer on it, and that layer is masking the
picture, so all you see is white in the picture. Rest assured the picture is
there. |
 |
Alternatively, you may save and close
out of the dst file, and then reopen, and you will then find the textures are
now showing in the perspective view
of TSM. |
 |
Go now to the “File”
“Project properties” fill in the boxes with the name(s)(Ftree1).
 |
Then go to
“File”
“Create TS object file”, fill in the boxes as required
 |
(the Route, In my case “Testone”
and the class “Vegetation”) |
|
|

 |
Press the Continue button, and
that’s it. Done.
 |
Open the Route you selected to send the
tree to, in your Train Sim Editor
|
 |
Open the object Selector….Look
for your class (Vegetation) ,
 |
the Object….the name you gave it
(Ftree1) |
|
|

 |
And
it should be there. You know what to do next I hope. |
Seasonal Textures
 |
If you wish to make Seasonal Textures,
copy the original texture file in your picture editor,
 |
One for each different season. Then
alter the looks to suit the season. When you have done them, (not forgetting
they are tga files) using a converter utility (Aceit is a good one and simple to
use) convert them into ace files. And place them into the respective Texture
folders, and then change the code in the sd file to reflect the seasons you have
added. |
|
Best wishes and happy gardening.
Frank f.thomas
 |
Copyright © 2005 by Frank Thomas All
Rights Reserved
 |
No
reproduction without the consent of the Author |
|
|