17.10.2014 Views

How to create a Wagon with Blender - UKTrainSim

How to create a Wagon with Blender - UKTrainSim

How to create a Wagon with Blender - UKTrainSim

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>How</strong> <strong>to</strong> <strong>create</strong> a <strong>Wagon</strong> <strong>with</strong> <strong>Blender</strong> (2.45)<br />

2 Create the folder structure<br />

(The Kuju-document -9.02_Create_a_<strong>Wagon</strong>.pdf- is used for this example!)<br />

The new wagon is a freight wagon <strong>with</strong> 2 axles (and 4 wheels).<br />

You need:<br />

• <strong>Blender</strong> (2.45) (www.blender.org)<br />

• RS Export <strong>to</strong>ol (http://home.exetel.com.au/randomsoftware)<br />

• Paint program (PSP, Gimp, Pho<strong>to</strong>shop CS, …)<br />

• Kuju-document 9.02_Create_a_<strong>Wagon</strong>.pdf<br />

Simple<strong>Blender</strong><strong>Wagon</strong>.jpg<br />

- 1 -


A. Creating the folder(s)<br />

1. C:\Program Files\Rail Simula<strong>to</strong>r\Source\<strong>Blender</strong>\AddOn\Freight\Simple<strong>Blender</strong><strong>Wagon</strong><br />

2. C:\Program Files\Rail Simula<strong>to</strong>r\Source\<strong>Blender</strong>\AddOn\Freight\Simple<strong>Blender</strong><strong>Wagon</strong>\Textures<br />

3<br />

B. Create the textures<br />

4 Create the <strong>Wagon</strong> Texture<br />

1. Open up your Paint program and <strong>create</strong> a simple image (eg. Simple<strong>Blender</strong><strong>Wagon</strong>.jpg,<br />

512x512).<br />

2. Save the image (eg. Simple<strong>Blender</strong><strong>Wagon</strong>.jpg) in the Textures folder (see above).<br />

3. Run the ToAce program <strong>to</strong> convert the image file <strong>to</strong> a ACE-file<br />

(Simple<strong>Blender</strong><strong>Wagon</strong>.ACE).<br />

4. Save the ACE file in the same Textures folder.<br />

C. Create the wagon<br />

Create the <strong>Wagon</strong> Geometry<br />

1. Open <strong>Blender</strong><br />

2. TopView: Shift C<br />

3. Create a box:<br />

4. Tab: <strong>to</strong> Object Mode<br />

5. N_key Name the box: 1_0500_wagon<br />

DimY=8m, DimX=2.5m, DimZ=2.5m<br />

LocX=0, LocY=0, LocZ=2.3m<br />

6. N-key hide Transform Properties window<br />

7. Press F9 (Editing mode)<br />

8. Select the wagon<br />

9. Press ‘CenterNe’ (Mesh tab) [<strong>to</strong> centre the Pivot point]<br />

10. SAVE! (as Simple<strong>Blender</strong><strong>Wagon</strong> in: see A. 1)<br />

D. Texture the wagon<br />

1. (Open <strong>Blender</strong> <strong>with</strong> the Simple<strong>Blender</strong><strong>Wagon</strong>)<br />

2. Select the wagon (Object Mode)<br />

3. Create a new Material for the wagon:<br />

F5 (Shading):<br />

Links and Pipeline panel:<br />

Material panel:<br />

4. Create a Texture:<br />

F6 (Texture)<br />

Texture panel:<br />

Rename TE:Tex<br />

Texture Type:<br />

Image panel:<br />

Add New<br />

TexFace=active<br />

Add New<br />

TE:TexDiff<br />

Image<br />

load your image file<br />

( Simple<strong>Blender</strong><strong>Wagon</strong>.jpg)<br />

5. Use (at least) 2 Windows:<br />

1 - ‘User’ window (perspective view)<br />

2 - ‘UV/Image Edi<strong>to</strong>r windows’<br />

6. User window:<br />

7. Select the wagon (Object mode).<br />

8. Select ‘UV Face Select’ mode (or F-key).<br />

- 2 -


9. Select all faces (A-key).<br />

10. Press U-key and select Unwrap<br />

11. UV/Image Edi<strong>to</strong>r window:<br />

12. Select Image > Open and select again your image file (Simple<strong>Blender</strong><strong>Wagon</strong>.jpg)<br />

13. Select all the faces (A-key), resize the faces (S-key) and move the faces <strong>to</strong> fit your<br />

image.<br />

14. F6 (shading)<br />

Map Input panel: select ‘UV’<br />

15. (To give your wagon a nicer appearance: map your image face by face!)<br />

16. SAVE!<br />

E. Create a wheel<br />

1. TopView: Shift C<br />

2. Create a cylinder: Name = Cylinder;<br />

Vertices=16, Radius=0.5, Depth=0.14, Cap Ends=active<br />

3. Tab: NO Object Mode (Stay in Edit Mode)<br />

4. FrontView:<br />

5. Rotate (R-key): 90 degrees along the Y-axis (this is necessary <strong>to</strong> rotate the<br />

wheels in the correct direction)<br />

6. Tab: Object Mode<br />

7. Move (N-key): LocX=0.775, LocY=3 , LocZ=0.5<br />

8. Texture the wheel Repeat the steps in D for the wheel<br />

9. Duplicate (Shift-D-key) the cylinder<br />

10. Move the new wheel (N-key): Cylinder.001: LocX=-0.775, LoxY=3, LocZ=0.5<br />

11. Join Cylinder.001 & Cylinder (Ctrl-J-key) <strong>to</strong> a new object<br />

12. Name this new object (N-key): 1_0500_wh01<br />

13. SAVE!<br />

F. Create a axle<br />

1. TopView: Shift C<br />

2. Create a cylinder: Name = Cylinder;<br />

Vertices=8, Radius=0.1, Depth=1.435, Cap Ends=INactive<br />

3. Tab: NO Object Mode (Stay in Edit Mode)<br />

4. FrontView:<br />

5. Rotate (R-key): 90 degrees along the Y-axis (this is necessary <strong>to</strong> rotate the<br />

wheels in the correct direction)<br />

6. Tab: Object Mode<br />

7. Move (N-key): LocX=0, LocY=3 , LocZ=0.5 (the axle is now between the 2<br />

wheels!)<br />

8. Texture the wheel Repeat the steps in D for the wheel<br />

9. Join Cylinder & 1_0500_wh01 (Ctrl-J-key) <strong>to</strong> a new object<br />

- 3 -


10. Name this new object: 1_0500_wh01<br />

11. Press F9 (Editing mode)<br />

12. Select the object<br />

13. Press ‘CenterNe’ (Mesh tab) [<strong>to</strong> centre the Pivot point]<br />

14. SAVE!<br />

G. Create the second axle <strong>with</strong> wheels<br />

1. Duplicate the first axle <strong>with</strong> wheels (Shift D, )<br />

2. Move (N-key) LocX=0, LocY=-3, LocZ=0.5<br />

3. Name this new object: 1_0500_wh02<br />

4. Press F9 (Editing mode)<br />

5. Select the object<br />

6. Press ‘CenterNe’ (Mesh tab) [<strong>to</strong> centre the Pivot point]<br />

7. SAVE!<br />

H. Check your wagon in <strong>Blender</strong>:<br />

1. User window:<br />

2. Num.<br />

3. Select ‘Camera View’<br />

4. Create a Lamp > Sun<br />

5. Render (F12)<br />

I. Export the wagon<br />

1. Export your model <strong>to</strong> the right folder (A. 1) (see Creating the folder(s))<br />

2. File > Export > RailSim (.igs)… (Name as Simple<strong>Blender</strong><strong>Wagon</strong>.igs)<br />

3. Check de <strong>Blender</strong> text-window for any errors!<br />

4. Close <strong>Blender</strong><br />

J. Create the <strong>Wagon</strong> Blueprint (1)<br />

1. Open up the Asset Edi<strong>to</strong>r<br />

2. In the Blueprint Edi<strong>to</strong>r window, find your Simple<strong>Blender</strong><strong>Wagon</strong> in the folder structure (see<br />

A. 1)<br />

3. Right click the folder name and select New Blueprint from the list<br />

4. Select <strong>Wagon</strong> Blueprint from the menu that appears and then click OK<br />

5. Right click on the <strong>Wagon</strong> blueprint000 file in the folder tree<br />

6. Rename the file Simple<strong>Blender</strong><strong>Wagon</strong><br />

7. In the <strong>to</strong>p Name field type Simple<strong>Blender</strong><strong>Wagon</strong><br />

8. In the Browse Information section type Simple<strong>Blender</strong><strong>Wagon</strong> in the language fields<br />

9. In the Mass field, type 20. This is the weight in Tons<br />

10. For the front pivot X, input 4.2 and the back -4.2<br />

11. For Collision Centre Y, type 2,25 (height of a wheel + height of the wagon body)<br />

12. For the Collision width, type 2.5<br />

13. For the Collision height, type 2.5<br />

- 4 -


14. For the Collision length, type 8<br />

15. Expand the Bogey section and click Insert First<br />

16. This will be where the bogie details are referenced. So we need <strong>to</strong> <strong>create</strong> wheels<br />

17. Click the Save but<strong>to</strong>n at the <strong>to</strong>p of the <strong>Wagon</strong> Blueprint<br />

K. Create the Bogie Blueprint<br />

1. All wheels on vehicles in Rail simula<strong>to</strong>r are mounted on bogies. Even if a wagon doesn’t<br />

have bogies, it is set <strong>to</strong> act like one<br />

2. So, on the Folder tree, right click the Simple<strong>Blender</strong><strong>Wagon</strong> folder name<br />

3. Select New Blueprint from the menu and scroll <strong>to</strong> Bogey Blueprint and click OK<br />

4. For Wheel Radius, type 0.5<br />

5. For the Wheel gauge, type 1.435<br />

6. Insert 2 axles in the Axle section<br />

7. Add the wheel radius as above<br />

8. The Horizontal offset is how far from the middle of the bogie each axle is located<br />

9. For the first axle, type 3 for the Horizontal Offset<br />

10. Add the Node ID of wh01<br />

11. For the second axle, the Horizontal offset is -3<br />

12. Add the Node ID of wh02<br />

13. Finally add a Pivot Offset and leave the fields as 0<br />

14. Right Click on Bogey blueprint001 in the folder tree and rename this <strong>to</strong> Wheels<br />

15. Click Save and Export<br />

L. Create the <strong>Wagon</strong> Blueprint (2)<br />

1. Return <strong>to</strong> the <strong>Wagon</strong> Blueprint<br />

2. Scroll down <strong>to</strong> the Bogey section and expand the entry<br />

3. As the bogie is effectively the entire wagon, both X and Y values can remain 0<br />

4. Fill in the Provider and Product fields (your choice)<br />

5. Right Click on the Wheels blueprint in the folder tree<br />

6. Select Copy Filename then paste this in<strong>to</strong> the Blueprint ID field<br />

(Freight\Simple<strong>Blender</strong><strong>Wagon</strong>\Wheels.xml)<br />

7. Minimise the Bogey section of the <strong>Wagon</strong> Blueprint<br />

8. Create the <strong>Wagon</strong> Brake Data<br />

9. Expand the Train Brake Assembley section and click the Insert First but<strong>to</strong>n<br />

10. Choose Air Brake Blueprint from the list<br />

11. Expand the Brake Type section and click the Insert First but<strong>to</strong>n<br />

12. Select Train Air Brake Data from the list<br />

13. You can now minimise the Train Brake Assembly section<br />

14. You can also minimise the Browser and Rail Vehicle Component sections<br />

15. Continued in the <strong>Wagon</strong> Blueprint<br />

16. In the Render Component section, scroll down <strong>to</strong> the Geometry ID field<br />

17. Right Click on the Simple<strong>Blender</strong><strong>Wagon</strong>.igs file in the folder tree (This is the file <strong>with</strong> an<br />

icon that looks like a blue cube <strong>with</strong> an orange arrow in it)<br />

18. Select Copy File name, and then paste this in<strong>to</strong> the Geometry and Collision ID fields<br />

(Freight\Simple<strong>Blender</strong><strong>Wagon</strong>\Simple<strong>Blender</strong><strong>Wagon</strong>.IGS)<br />

19. Set the Detail Level Generation Range <strong>to</strong> 10, replacing 1<br />

20. The ControlContainerComponent can be minimised<br />

21. Expand the Cargo Component and Cargo Def sections<br />

- 5 -


22. Click the Insert First but<strong>to</strong>n<br />

23. Create the Freight Cargo<br />

24. Choose Bulk Cargo from the list and click OK<br />

25. Expand the Bulk Cargo def section<br />

26. Type 1 for the Width, Height and Depth of the Trigger Box<br />

27. Type 32 for the Capacity<br />

28. Select Bulk Freight from the Bulk Freight type list<br />

29. Click the Save but<strong>to</strong>n at the <strong>to</strong>p of the screen<br />

30. Your <strong>Wagon</strong> Blueprint is now complete<br />

31. Click Export at the <strong>to</strong>p of the screen <strong>to</strong> load your <strong>Wagon</strong> in<strong>to</strong> Rail Simula<strong>to</strong>r<br />

M. Using the SimpleBender<strong>Wagon</strong> in Rail Simula<strong>to</strong>r<br />

6 Add the <strong>Wagon</strong> in<strong>to</strong> a route<br />

1. Ensure you are running in Simple Control Mode<br />

2. Select your route of choice and click the Free Play<br />

3. Click the World Edi<strong>to</strong>r but<strong>to</strong>n on the bot<strong>to</strong>m tab (looks like a globe)<br />

4. Click the Train icon in the <strong>to</strong>p left pane. This will open the Scenario Edi<strong>to</strong>r.<br />

5. Open the middle tab on the left hand side and click the ObjectSet Filter (looks like a blue<br />

6. cube <strong>with</strong> an orange arrow)<br />

7. ‘Pin open’ the tab on the right hand side and click on the grey arrow next <strong>to</strong> the name<br />

8. Developer<br />

9. Select your provider from the list (your choice)<br />

10. Put a tick in the box next <strong>to</strong> your product (your choice)<br />

11. In the middle tab on the left hand side click on the <strong>Wagon</strong>s icon (small car<strong>to</strong>on of a High<br />

12. Speed Train power car)<br />

13. Scroll down the list in the middle tab until you see Simple<strong>Blender</strong><strong>Wagon</strong><br />

14. Select it by left clicking and then moving the mouse in<strong>to</strong> the 3D environment<br />

15. Click the <strong>Wagon</strong> on<strong>to</strong> some track<br />

16. Double right click <strong>to</strong> exit the placement <strong>to</strong>ol<br />

17. Press the Play but<strong>to</strong>n <strong>to</strong> return <strong>to</strong> drive mode<br />

18. You now have a new <strong>Wagon</strong> for use in Rail Simula<strong>to</strong>r.<br />

- 6 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!