Tree's in TSM


Home Tree's in TSM Observations Alpha Channel Trees Hedges

 

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.

bullet

Making the Texture file using a Drawing programme.

bullet

 To start with, go out and Photograph, and or get access to pictures of Trees.

bullet

You will have to make your Texture file before you can make a tree.

bullet

All the next part is working in the Paint Shop Pro (or similar) and knowing how it works.

bullet

Work with a picture area of 512 pixels (or more) in the Paint Shop Pro, it can always be reduced in size later.

bullet

Edit the picture to remove all the back ground so that you have an isolated tree on a blank background.

bullet

Use the clone tool fill in any awkward bits, or holes, so you have a reasonable looking tree.

 

           

bullet

Next:

bullet

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.

bullet

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)

 

                                

 

bullet

Next:

bullet

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.

bullet

Save it as a name (in this case for demo purposes Ftree1.), and you know what folder it is in.

bullet

Or use the attached Ftree1.tga file that I have made to get you going and try out the technique.

 

bullet

Working in the Train Sim Modeler.

bullet

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.

bullet

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

bullet

Select the origin to the bottom.   Now enter it OK.

 

                               

 

bullet

Next:

bullet

Readjust the bottom of the box so it is slightly under the “0” point.

bullet

Reset Part …Centre Axis…To Origin.  This will seat the tree on the ground without problems.

bullet

Change to Poly Mode

 

bullet

Next:

bullet

Look at the outlines in the Poly mode, and remove all the sides, top and bottom,

bullet

Leaving only 2 polygons - the front and back.

Go back and select  Edit…..Part Properties.

            

 

bullet

 
bullet

Open the Material box, and select  TransCrcfrm”, press OK,
bullet

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.

bullet

You have now set it up so it can use the tga file for your tree.

 

bullet

Select Part, then to the bottom and select Textures.

      

 

bullet

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

Press open and the Texture Properties window opens.

                                 

 

bullet

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.

bullet

 You have to set the amount of picture that will be transferred on to the block you first produced (not really a block, more a slice).
bullet

Set the first “X Crop” so that it is near the edge of the tree, now note its number in the Window   42.

bullet

As the trunk is dead centre of your picture at the base, the balance has to be correct.
bullet

As the first number is 42 double it 84, now remember the overall size is 256. (Across)

bullet

Take the 84 away from 256 and you are left with 172, put that number in the “X Size

bullet

You will see that although the tree is slightly off to one side, (that happens in nature)

bullet

the trunk is still central.

 

bullet

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

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

bullet

Press OK.

bullet

You have no sides or top and bottom to texture. Simple huh.

bullet

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.

                        

 

bullet

Now finish off the Tree.

bullet

  Looking at the top view you have just one thin part.

bullet

Select the “Edit” Copy  then press the “Edit   Paste.

bullet

You cannot see it yet but go into “Transform”  Rotate
bullet

Set the “Y” window to 120, and press OK  

bullet

You will now see two thin strips, at angles to one another, crossing in the centre.

bullet

Do the same again by following the above “Edit Copy,   “Edit” Paste,  Rotate

bullet

Press OK and now you have the complete 6 leafs

 

bullet

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.

 

 

bullet

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.

 

bullet

Go now to the “File   Project properties” fill in the boxes with the name(s)(Ftree1).
bullet

Then go to  File     Create TS object file”, fill in the boxes as required
bullet

(the Route, In my case “Testone  and the class  Vegetation”)

 

 

                              

 

bullet

Press the Continue button, and that’s it. Done.
bullet

Open the Route you selected to send the tree to, in your Train Sim Editor

bullet

Open the object Selector….Look  for your class (Vegetation) ,  
bullet

the Object….the name you gave it (Ftree1)

 

                                   

   

bullet

 And it should be there. You know what to do next I hope.

 

Seasonal Textures

bullet

If you wish to make Seasonal Textures, copy the original texture file in your picture editor,
bullet

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.

 

  Frankf.thomas

 

bullet

Copyright © 2005 by Frank Thomas All Rights Reserved
bullet

 No reproduction without the consent of the Author