RS/RW Tutorial #3 - A Viewer Facing tree [Now Done]

 
  Brock_05 Deputy Commissioner

Location: Swinging Spanners under Trucks
I've just decided to make a viewer facing tree in Railworks. I'll update this first post as I make progress. Please fell free to post along with any issues.

I'll be using 3ds Max 9 & Photoshop CS2

Edit #2- Just realised we shoulda setup the folders first  Embarassed

Step #1- Setup your Folders. For you guys I suggest making a folder outside your routes?? For me my folder strucure looks like
C:Program FilesSteamsteamappscommonrailworksSourceStephenSmithAustralianSceneryTrees

[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/ViewerFacingTree1.jpg[/bigimg]

Step #2 - Get a good photo to use for a tree.
            #1 7:51- As luck would have it I don't have a good one on me. So I'll use Derek's as an example. http://dereksiddle.blogspot.com/

[bigimg]http://1.bp.blogspot.com/_H8UURvAYF5U/SmjLBcL51XI/AAAAAAAAAQ0/qwpodMsovhM/s1600/tree01.jpg[/bigimg]

Step #3-Fire up Photoshop & crop you image.
             Next derek says
I then take the select tool (make sure that there is no pixel feathering to keep a hard edge) and start carving the area I want to be transparent. I select an area then press delete (in photoshop) I make sure my base colour is red so that I can see how the profile will look. I start with large cuts then make smaller ones. Because the image is such high res you can be a bit creative with your cuts, don't try and cut every leaf, you will go mad... The guys are work laugh aat me when I start.


Now it looks like this
[bigimg]http://3.bp.blogspot.com/_H8UURvAYF5U/SmjLGsYW_rI/AAAAAAAAAQ8/NRWuxAfkgXQ/s320/tree02.jpg[/bigimg]

Another trick I do is I clone the image then make it 5 or 6 colours (Index colour/reduced colour palette) I then select the sky and press delete, I select all the red from the cloned image then paste it over my original. The result is the image below.
If you still have a white pixels around your tree from the sky I reduce this further by selecting the red and expanding the selection by 1 pixel. this can take parts of the tree away that you wanted to keep but you can always do this in layers and keep the original.
"Derek Siddle"

Now it'll look like this
[bigimg]http://1.bp.blogspot.com/_H8UURvAYF5U/SmjLPyZfxdI/AAAAAAAAARE/phvS2upwfU8/s320/tree03.jpg[/bigimg]

Once you are happy with the cut out, select the red and replace the red with a more suitable green and brown around the stump this is for the mips so that you do not get a halo around the tree. Still with the selection on create an alpha channel from that selection.


[bigimg]http://2.bp.blogspot.com/_H8UURvAYF5U/SmjLYF87zVI/AAAAAAAAARM/vOtcoRk76Us/s1600/tree_04.jpg[/bigimg]


You can always adjust the brightness/saturation etc before saving. I find it best to tone down the colours for RailWorks.

Save as a . ace and export from depot.


Now we need to get our 3D program up and running.

Step 1- Make a Box 6mx6mx6m
Step 2- Call it 1_1000_Simpletree (SimpleTree can be anything, yeah)
Step 3- Convert your Box to an Editable Poly.
Step 4- Click the modify tab then select vertex
Step 6- Left click and draw a selection box around the top two vertices then press delete. This will leave you with 1 polygon.

[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/Tutorials/ViewerFacingTree/ViewerFacingTree2.jpg[/bigimg]

And when you delete
[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/Tutorials/ViewerFacingTree/ViewerFacingTree3.jpg[/bigimg]

Step 7- Click the hierarchy tab on the right hand side tool box. (The icon has 1 big box with three little boxes underneath),  In the Move/Rotate/Scale section click the affect pivot only button, then in the Alignment section click the centre to object button.

[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/Tutorials/ViewerFacingTree/ViewerFacingTree5-5.jpg[/bigimg]

Step 8- Still in the top view, and make sure select and move is highlighted, press F12 or click on tools, transform type in on the menu bar.
In the X and Y fields in the absolute world column press 0 so that the box is centred around the world axis, Leave Z as 3M. (leave the box on screen for now)
[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/Tutorials/ViewerFacingTree/ViewerFacingTree5-5.jpg[/bigimg]

Step 9- Click the hierarchy tab again and in the Move/Rotate/Scale section click the affect pivot only tab. Now hit F12 again. Now in the Z field of the Transform type in box press 0. Click the affect pivot tab off and close the transform type in box.

You now have a polygon centred at the world axis and the pivot point of the object in the centre and at the base of the polygon. This is the point your tree will rotate around.

Applying mapping

Step 10- Go to the front view (this is the direction your polygon is facing)
Step 11 – In the modify list select UVW map
[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/Tutorials/ViewerFacingTree/ViewerFacingTree7.jpg[/bigimg]

Step 12- Select mapping type planar. In the alignment section click the view align button and then the fit button
[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/Tutorials/ViewerFacingTree/ViewerFacingTree8.jpg[/bigimg]

Step 13- In the front screen right click on the shape and convert to Edit poly. (This collapses the modifier stack but retains the mapping you have just given the object)

Step 14- Click File: Save as: Simple tree or whatever you want to call it. But make sure you are saving it in the source file you setup at the start.

Step 15- Select the material editor (the 4 coloured spheres icon on the menu bar)

Step 16- Click on the Standard tab and select Kuju Material, then click OK.
Note – We will be using the TrainUprightViewFacingFlora.fx, however the shaders are explained in the dev doc 4.02 – shaders.
[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/Tutorials/ViewerFacingTree/ViewerFacingTree9.jpg[/bigimg]

[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/Tutorials/ViewerFacingTree/ViewerFacingTree11.jpg[/bigimg]

Step 17- Click on the slot texture which says None, then bitmap.

Step18- Find the texture in C:Program FilesRail SimulatorSourceProviderAddonScenery Vegetation Textures and click open. The part after the word 'Source' is the most important.

Step 19- Assign the material to the simple box by clicking on the assign to icon which looks like a blue sphere with an arrow pointing to a white cube and click on the checkered blue and white cube icon that shows material in view port.

[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/Tutorials/ViewerFacingTree/ViewerFacingTree14.jpg[/bigimg]

Step 20- Go up a level in the material (black arrow pointing upwards)
[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/Tutorials/ViewerFacingTree/ViewerFacingTree15.jpg[/bigimg]

Step 21-Scroll down the till you get to Material Options and in the Transparency section select Trans, then in the Material properties, click the Upright View Facing check box.
[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/Tutorials/ViewerFacingTree/ViewerFacingTree16.jpg[/bigimg]


Now, because you can not select viewer facing objects in Rail Simulator/Works we need to make a selection box.

Step 22-Create a box in the top view, 6M x 6M x 6M.
Step 23-Name the box: 1_0200_Selection (this means you will only need to be within 200 M to select the tree in game.

Handy Note No#1: Make sure you include the 0 before the 200 (0200), This is important, especially with locos. Yes i spent a whole week trying to figure out why mmys wheels and bogies WOULDN'T animate.

Step 24 – Right click the box and convert to edit poly
Step 25 – in the X, Y,Z fields in the absolute world column press 0 so that the box is centred around the world axis

Step 26- We need to apply an invisible shader to the object. In the material Click on the Standard tab and select Kuju Material, then click OK.
Note – We will be using the Invisible shader. Once picked nothing else needs to be done, it does not use any textures. Assign this material to 1_0200_Selection
[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/Tutorials/ViewerFacingTree/ViewerFacingTree17.jpg[/bigimg]


We are now ready to export… fingers crossed.

Select File, Export
Step 27 – Select Kuju Intermediate Geometry (IGS,*.IGL)
Step 28 – Type in Simple_tree in the File name and click save. (Making sure you are saving the file in SourceProviderAddonSceneryVegetation.
Step 29 – Click export and then close.

Now for the Blueprints
I use the Blueprint Editor, Save & Export then use Asset Editor to check it. Only reason is because Assett Editor is slow to input the info into the blueprints where as  Blueprint editor is nicer to my machine.

In the blueprint editor window find your simple tree in the folder structure.
Step 30 – Right click the IGS icon (which looks like a light blue box with orange triangles either side)
Step 31 – Click new shape blueprint
[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/Tutorials/ViewerFacingTree/ViewerFacingTree20.jpg[/bigimg]
Step 32 – Move the slider till you see scenery blueprint, click OK
Step 33 – Click the preview button, and your simple shape will appear in front of you.

Make sure it is working as it should, if not then you may have to go over some of the steps again.

Step 34 – In the Name field call it Simple tree
Step 35 – In the English field call it Simple tree
Step 36 - In the Category select foliage small
Step 37 – In the first Blueprint set ID fill in the Provider and Product make sure they match your folder structure. StephenSmith as the Provider and Australian as the Product
Step 38 – You may also want it valid in scenarios so click true in that section.
[bigimg]http://i328.photobucket.com/albums/l354/Stephens_RailPics/RailSimulator/Tutorials/ViewerFacingTree/ViewerFacingTree21.jpg[/bigimg]
Step 39 – Click save and then export.
Step 40 – Close the Asset editor, max and photoshop then run Rail Simulator.

Step 41 – Open up your route in free play.
Step 42 – Click the World editor button on the bottom tab (looks like a globe)
Step 43 – Click open the middle tab on the left hand side and click the set object filter (looks like a blue cube with an orange arrow)
Step 44 – Pin open the tab on the right hand side and click on the grey arrow next to developer.
Step 45 – Select provider (StephenSmith)
Step 46 – Click Australian in the window below.
Note – all objects under that provider and product are now visible in the object browser.
Step 47 – in the middle tab on the left hand side click on the foliage small icon
Step 48 – Slide the slider till you see Simple tree, select it by left clicking then left click on the view port.

And there is your fine simple tree in the game.

Hope this encourages people to make some Vegetation of Aussie Nature  8)

Stephen

Sponsored advertisement

Subscribers: Brock_05

Display from:   

Quick Reply

We've disabled Quick Reply for this thread as it was last updated more than six months ago.