Creating a forward facing tree using Blender

Creating a forward facing tree using Blender

Postby Nobkins » Wed Apr 02, 2014 2:54 pm

Introduction
I hope to create a tutorial that demonstrates the process of creating a forward facing tree in blender for use in TrainSimulator. The videos will be pretty much as they happen (so I apologise straight away for any long pauses, umm's, ahh's etc whilst I work out what I am doing!). I am not a Blender expert by any stretch of the imagination but hopefully I can pass on a little of what I have learnt.

There is a lot to be said for the feeling of satisfaction when you get your first object into the game.

Here is the complete playlist of videos from Part 1 to 5.

Note:
The source files for everything you see created in the various videos is available at the bottom of this post.

Part 1: Downloading and Installing Blender
  1. Download blender
  2. Install Blender
http://www.youtube.com/v/M89lqB5Jw4w

Part 2: Installing the TS20XX Exporter
  1. Download the blender exporter
  2. Extract the contents of the ZIP
  3. Copy and paste the following two files to your blender addons folder (normally C:\Program Files\Blender Foundation\Blender\**VERSION**\scripts\addons)
    • io_export_ia.py
    • io_export_igs.py
  4. Enable the exporter addons by:
    1. Selecting File --> User Preferences
    2. Addons Tab
    3. Click "Refresh" button at bottom
    4. Enable the two addons called Import-Export: IA Model Format (.ia) and Import-Export: IGS Model Format (.igs)
http://www.youtube.com/v/DGY7U5AM_oE

Part 3: Creating your Forward Facing Tree
  1. Delete the cube that is loaded automatically as part of the default blender new object (right click and press X)
  2. Press CTRL + Num Pad 1 to change to back view
  3. Add a new plane, align it to view. This will be the forward facing plane
  4. Save at this point into your source folder as follows:
    Railworks\Source\**DEVELOPER**\**PRODUCT**\Scenary\**WHAT EVER YOU WANT**
  5. Name the new object according to the TrainSimulator requirements (1_1000_FFTree for example)
  6. Resize the plane as needed (switch to edit mode using TAB, select the vertex's using box select, press G to grab them and lock them to one of the axis using X, Y or Z)
  7. Create a new material for the plane
  8. Assign a shader in the first texture slot called: TrainUprightViewFacingFlora.fx
  9. Create a simple texture and save it into a subfolder called Textures (attached is my simple texture if you prefer)
  10. Assign your texture in the second slot.
  11. Enable the alpha channel for the texture and the 3D renderer (watch video as several stages involved)
  12. Create a new Cube object. This will be the selection box.
  13. Name the new object according to the TrainSimulator requirements (1_1000_Select for example)
  14. Assing a new material to the object
  15. Assign a shader in the first texture slot called Invisible
  16. Assign the texture you used for the plane in the second slot (a texture is needed even though it is invisible)
  17. Select the plane in object view and apply rotation and scale transforms (CTRL + A --> Apply Rotation and Scale)
  18. Repeat the above step for the selection box
  19. Move the object origin for each object to the geometry centre (Select the object in object mode, Object Menu --> Transform --> Origin to Geometry)
  20. Save the model
http://www.youtube.com/v/LbxVxdyBKyM

Part 4: Exporting the Forward Facing Tree
  1. Choose File --> Export --> TS20XX IGS (.igs)
http://www.youtube.com/v/-4qxDEDCUXU

Part 5: Creating the Blueprint and Exporting into Train Simulator
  1. Load up blueprint editor 2 (BlueprintEditor2.exe in your RailWorks folder)
  2. Create a new Scenery Blueprint
  3. Give it a name, browser name and assign the igs file to the geometry setting
  4. Use RWAceTool to convert your png texture to an ACE format
  5. Export the blueprint
  6. Load TrainSimulator
  7. Create a new test route
  8. Enable your developer filter
  9. Cross fingers and find you tree in the asset list
  10. If it works feel a sense of accomplishment at your hard work! If not don't give up. Try again or ask for help on TrainSimDev.com
http://www.youtube.com/v/RDU2sO_dGTM
Attachments
TSD_Tree Source.zip
My Blender files, textures, IGS export and blueprint created in the video guide.
(140.01 KiB) Downloaded 888 times
TrainSimDev.com YouTube Channel
Video tutorials and other resources
User avatar
Nobkins
Site Admin
 
Posts: 547
Images: 3164
Joined: Wed Feb 05, 2014 12:24 am
Has thanked: 325 times
Been thanked: 185 times

Re: Creating a forward facing tree using Blender

Postby cjbarnes5294 » Wed Apr 02, 2014 3:47 pm

Thanks for this Jim, I've been meaning to have a go at this since taking lots of photos of trees. We are in need of more non-Kuju trees. :D

Chris
The Red Queen Hypothesis, applicable to train sim development?

"Here, you see, it takes all of the running you can do, to keep the same place."
cjbarnes5294
Driver
 
Posts: 398
Images: 82
Joined: Mon Mar 31, 2014 12:40 pm
Location: Gloucestershire/North Yorkshire
Has thanked: 551 times
Been thanked: 187 times

Re: Creating a forward facing tree using Blender

Postby Nobkins » Wed Apr 02, 2014 3:51 pm

Hi Chris,

Do you happen to have tree pics of the same tree in different seasons? Now is coming up to a great time for spring.

I only ask as I have been meaning to get my camera out and take some pictures for this purpose over a year but have never got round to it.

You could (if you didn't mind donating the resource) upload some of your tree pics to the forum gallery. I would be interested in having a go with a real tree :D.

My next project is to create some over head wires using the new system. I have managed to piece together the various bits of info I think I need to give it a go.
TrainSimDev.com YouTube Channel
Video tutorials and other resources
User avatar
Nobkins
Site Admin
 
Posts: 547
Images: 3164
Joined: Wed Feb 05, 2014 12:24 am
Has thanked: 325 times
Been thanked: 185 times

Re: Creating a forward facing tree using Blender

Postby cjbarnes5294 » Wed Apr 02, 2014 4:17 pm

I haven't, but I could do that. ;) I took snaps with my phone of the trees in the park next to uni in autumn, and I've also taken a few from Fountains Abbey and Grimston Park in summer. I'll look to upload the photos here as you suggest.

Chris
The Red Queen Hypothesis, applicable to train sim development?

"Here, you see, it takes all of the running you can do, to keep the same place."
cjbarnes5294
Driver
 
Posts: 398
Images: 82
Joined: Mon Mar 31, 2014 12:40 pm
Location: Gloucestershire/North Yorkshire
Has thanked: 551 times
Been thanked: 187 times

Re: Creating a forward facing tree using Blender

Postby Nobkins » Wed Apr 02, 2014 4:20 pm

Thanks Chris :D
TrainSimDev.com YouTube Channel
Video tutorials and other resources
User avatar
Nobkins
Site Admin
 
Posts: 547
Images: 3164
Joined: Wed Feb 05, 2014 12:24 am
Has thanked: 325 times
Been thanked: 185 times

Re: Creating a forward facing tree using Blender

Postby cjbarnes5294 » Wed Apr 02, 2014 4:44 pm

I've made a new personal album to put them into, but I'm going to need to reduce the size of them all first, unless there is a better way to upload them?

Chris
The Red Queen Hypothesis, applicable to train sim development?

"Here, you see, it takes all of the running you can do, to keep the same place."
cjbarnes5294
Driver
 
Posts: 398
Images: 82
Joined: Mon Mar 31, 2014 12:40 pm
Location: Gloucestershire/North Yorkshire
Has thanked: 551 times
Been thanked: 187 times

Re: Creating a forward facing tree using Blender

Postby Nobkins » Wed Apr 02, 2014 4:48 pm

Try ZIP them up (just pick a few particularly good ones to start with) and then upload the ZIP. I believe it will resize them down to within the max dimensions limit (which should also make them within the file size limit).

The max res is 2560 x 1440 and file size is 5Mb (which is pretty high).

There is a nice video on uploading to the gallery here:
viewtopic.php?f=2&t=98

Try to contain your excitement whilst watching ;)
TrainSimDev.com YouTube Channel
Video tutorials and other resources
User avatar
Nobkins
Site Admin
 
Posts: 547
Images: 3164
Joined: Wed Feb 05, 2014 12:24 am
Has thanked: 325 times
Been thanked: 185 times

Re: Creating a forward facing tree using Blender

Postby cjbarnes5294 » Wed Apr 02, 2014 5:22 pm

Uploaded. :)

Chris
The Red Queen Hypothesis, applicable to train sim development?

"Here, you see, it takes all of the running you can do, to keep the same place."
cjbarnes5294
Driver
 
Posts: 398
Images: 82
Joined: Mon Mar 31, 2014 12:40 pm
Location: Gloucestershire/North Yorkshire
Has thanked: 551 times
Been thanked: 187 times

Re: Creating a forward facing tree using Blender

Postby Nobkins » Wed Apr 02, 2014 5:26 pm

Ahh great stuff. I see to the file library rather than to your gallery. You can upload zips to the gallery and they are automatically resized. Having said that the file library is probably a better place for them!

I have approved the upload. Just need to wait for the auto virus scan to finish. As it is a large file it might have to wait for a little while.

Thanks for the upload.

The first one not by me!

Jim
TrainSimDev.com YouTube Channel
Video tutorials and other resources
User avatar
Nobkins
Site Admin
 
Posts: 547
Images: 3164
Joined: Wed Feb 05, 2014 12:24 am
Has thanked: 325 times
Been thanked: 185 times

Re: Creating a forward facing tree using Blender

Postby gptech » Wed Apr 23, 2014 2:59 am

I've just worked through the video tutorials; took me about 6 hours, scrolling back a lot as Jims mouse clicking was a bit too fast at times :roll: but eventually managed to get something produced and surprisingly get it showing in game. Not a tree though....



<pleased as a pig in ...... mode>

Image

</pleased as a pig .....>
gptech
General Shed Duties
 
Posts: 10
Joined: Mon Apr 14, 2014 1:23 pm
Has thanked: 0 time
Been thanked: 11 times

Next

Return to Blender

Who is online

Users browsing this forum: No registered users and 4 guests

cron