We shall build a steam locomotive ...

Discussion of rolling-stock creation & re-painting.

Re: We shall build a steam locomotive ...

Unread postby mrennie » Sun Feb 24, 2013 11:25 am

Now we'll add the axle between the drivers.

Drag a cylinder into the scene. change the longitude to 10 (we're going to smooth the surface normals to make it look nicely round, thus saving on points and polygons). Draw it as Solid Outline with Translucency. Rename it as DriverAxle3. Rotate it 90 degrees in its z axis. Position it so that its centre is over the centre of the wheel, as viewed from the side.

Lock the xyz axis and delete the ends of the axle cylinder (they'll be hidden inside the wheels, so it would be a waste to have to texture and draw them in-game).

Unhide everything and go to (looking from the front view). Lock y and z. Move DriverAxle3 sideways until its centre is aligned with the loco centre line (our guide for this is the object VerticalCentreline).

With only x unlocked, use the resizer thingy (I wish I knew the name of it) in the bottom right hand corner of the screen (the upper, darker-shaded triangular area) to widen the axle along the x axis until the ends disappear into the wheel hubs. Note: sometimes that "thingy" vanishes. To make it reappear, just click on the "thingy" on the left hand side of the view window and "wiggle" it a bit.

ScreenShot104.jpg


Select DriverAxle3 and click on Scale Selection, scaling it in the y and z directions by 0.6.

Rename DriverAxle3's group as bo02wh03.

Select all the faces of DriverAxle3 and click on the Crease Selection button.

Drag the Driver3L and Driver3R groups into bo02wh03 (to make them into child groups).

Select all the members of bo02wh03. A quick way is to use the RST like this:

ScreenShot106.jpg


Drag bo02wh03 into the bo02 group.

ScreenShot107.jpg


Right-click on one of the members (all should be highlighted) in the hierarchy view, and select lock (if there's an asterisk next to, meaning some are already locked, others unlocked, you'll need to do it twice). You can also uncheck the tranlucency and draw as Smooth, to see how it looks now:

ScreenShot108.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: We shall build a steam locomotive ...

Unread postby mrennie » Sun Feb 24, 2013 11:55 am

On this loco, in common with the majority (my Consolidation is a strange exception), the middle drivers (main drivers) have larger counterweights to cope with the additional weight of the main rod and crank pin.

It's easy enough to make this bigger counterweight. Start by copying and pasting everything in Driver3L, as well as DriverAxle3 and (very important!) DO NOT DELETE ME. The reason for copying DO NOT DELETE ME is that it's at the top of the hierarchy. It ensure that when you paste, all the objects are pasted to exactly the same position as the originals. if you don't select DO NOT DELETE ME, the pasted objects will end up somewhere else (I know exactly why this it, but it's too hard to explain).

ScreenShot109.jpg


and after pasting:

ScreenShot110.jpg


Rename the copy as Driver2L, DriverAxle2 and bo02wh02. Move it along the z axis to line up with the middle axle in the diagram. Unlock the Counterweight, Show Only, unhide SideElevationLineDrawing and adjust the counterweights lower points to make a bigger counterweight, using the background diagram as a guide.

Oh ... 3DC crashed ... again ... just a moment while it recovers the unsaved document ...

...

As I was saying, here's how it should look (notice that I made a few extra points and edges to help to keep it looking smooth):

ScreenShot111.jpg


Copy and paste all the members of Driver2L and DO NOT DELETE ME. Rename the copy of Driver2L to Driver2R. Select all of its members and flip along the x axis. In "looking from the front view", slide it over so that it's aligned perfectly with Driver3R behind it. It's actually easier to align things if you draw them as wireframe and zoom right in as far as you can.

Select the members of Driver2R, then Show Only, and rotate them 90.0 degrees, just like we did with Driver3R.
You do not have the required permissions to view the files attached to this post.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: We shall build a steam locomotive ...

Unread postby mrennie » Sun Feb 24, 2013 12:09 pm

In the hierarchy view, drag Driver2R group into the bo02wh02 group, alongside Driver2L.

ScreenShot112.jpg


Drag bo02wh02 into bo02, alongside bo02wh03. Delete the two copies of DO NOT DELETE ME. This is what we should end up with:

ScreenShot113.jpg


Select all of the objects in bo02wh03, together with DO NOT DELETE ME, then copy and paste them. Unlock the copies. In the copies, rename Driver3* to Driver1*. DriverAxle3 to DriverAxle1 and bo02wh03 to bo02wh01. In the side view, move them along the z axis to position the centre where it should be according to the diagram.

Drag bo02wh01 into the original bo02. Delete the copy of DO NOT DELETE ME.

It should now look something like this:

ScreenShot114.jpg


At this point, we have almost enough to be able to export the drivers, put them into a blueprint and export them into the game!

But there are a few little things to do first.
You do not have the required permissions to view the files attached to this post.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: We shall build a steam locomotive ...

Unread postby mrennie » Sun Feb 24, 2013 12:25 pm

The first thing is to make sure we have unique names for every part. Select the entire scene (use RTS to drag a rectangle around everything). Go to Plug-Ins and select Create Unique Names.

Next thing is to apply some texturing. You can't get something into the game that isn't textured. However, texturing is a lot of work, and requires a lot of skill and artistry. Plus, with 3DC you have the added disadvantage of no shadow baking (hence the reason why, if you model with 3DC, you're bound to get someone complaining that the textures look a little flat ... it's practically unavoidable).

Anyway, for now, we'll take a short cut and use the awful, horrible paint pot approach to texturing. But just to make sure we can easily recognise the parts that have had a pot of paint thrown over them (and therefore need to be painted properly, eventually), we'll use a pot of glossy bright red paint *!twisted!* (reminds me of the ceiling in the bedroom of a house I once rented).

To make our paint, we need Photoshop, or at least some programme that allows us to create .tga and .ace files with alpha channels.

In photoshop, create a 64x64 pixel 8-bit RGB image with R=255, G=0, B=0. Put 50% white into the alpha channel. Save it as GlossyRed.tga, 24 bits/pixel in your Engine/Textures folder. Then save it in the same place as GlossyRed.ace, 32-bit (ARGB) with Gaussian Blur mip-mapping (blur factor 0, or "box filter").

Back in 3DC, in the Material Palette, in the Primary Texture, load it with your GlossRed.tga.

ScreenShot115.jpg


ScreenShot116.jpg


Go to the Plug-Ins menu at the top, select this:

ScreenShot117.jpg


Click OK, then tick Railworks and tell it where you have your Railworks folder.

After that, I get a message about not having RWAceTool.EXE installed. I don't care. I use the Photoshop plugin instead. Click OK, then Finish and ignore any other error messages that come up ... we've finished with the Wizard now.

Click on Custom Fields, and in the new Rail Sim field, enter TrainBasicObjectDiffuse.fx.

That's not the shader I'd use for a real model but it will do for now.

Select all the parts belonging to locomotive (and its children). Unlock them and draw them as Solid Outline with no translucency.

Select the paint pot (the "Fill Tool") and pour paint over one of the parts (any, doesn't matter ... an axle for example):

ScreenShot119.jpg


Now for some more Plug-Ins magic. Keeping those objects selected (everything in locomotive) go to Plug-Ins and select this:

ScreenShot120.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: We shall build a steam locomotive ...

Unread postby mrennie » Sun Feb 24, 2013 12:53 pm

Hey presto!

ScreenShot010.jpg


Next step ... exporting this so that we can work with it in the TS2013 Asset Editor / Blueprint Editor.

Select everything in locomotive, except for DO NOT DELETE ME.

Then:

ScreenShot122.jpg


ScreenShot123.jpg


ScreenShot124.jpg


ScreenShot125.jpg


If you don't get Export Complete after a short time, it could be that it has failed silently. That's usually because of exporting a model that contains an empty group, or more than one group with the same name (Create Unique Names doesn't affect groups, only objects inside groups).
You do not have the required permissions to view the files attached to this post.
Last edited by mrennie on Sun Feb 24, 2013 2:07 pm, edited 1 time in total.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: We shall build a steam locomotive ...

Unread postby mrennie » Sun Feb 24, 2013 1:25 pm

Run you utilities.exe (in your railworks folder). Click on Asset Editor. it should automatically start the Blueprint Editor too. It might ask you to login to Steam first.

In the Blueprint Editor, right-click on the Bogies folder and select New Blueprint:

ScreenShot001.jpg


Choose Bogey Blueprint

Right-click on Bogey blueprint000 and rename it to bo02.

ScreenShot002.jpg


In the bluepint, enter these values:

ScreenShot005.jpg


i got the radius by selecting a point in the wheel at the top, before the flange, and getting its coordinates from the Set Point Position button in the Construction panel. In my case it was 2.3518 (feet). I know that a point in the middle of the wheel has y=0. So the radius is 2.3518 ft, which is 0.71683m.

Now the axles. Click on Insert first (under Axle) three times. Click on Insert first under Pivot offset. Then click on the "+" symbols to expand them. Enter these values:

ScreenShot006.jpg


The first axle is the rear one, which is 6'3" (6.25' = 1.9050m) behind the main driver.

The second axle is the main driver, at horizontal offset 0. Eventually, when we have the running gear animated, the Animation id will go into this axle.

The third axle is the front one, 5'9" (5.75' = 1.7526m) ahead of the main driver.
You do not have the required permissions to view the files attached to this post.
Last edited by mrennie on Sun Feb 24, 2013 1:29 pm, edited 1 time in total.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: We shall build a steam locomotive ...

Unread postby mrennie » Sun Feb 24, 2013 1:26 pm

Create another bogey blueprint for the leading truck and call it bo01.

ScreenShot007.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: We shall build a steam locomotive ...

Unread postby mrennie » Sun Feb 24, 2013 2:04 pm

Make a new engine blueprint in your engine folder.

ScreenShot008.jpg


Call it Baldwin Ten Wheeler in Name and Display Name.

We'll forget about couplings for the time being.

Expand the Bogey section and click Insert first, twice. Expand the two "S bogey" sections.

Right-click on bo01 in the left panel and select copy filename. Paste it (CTRL-V) into the Blueprint ID field of the first S bogey. Do the same with bo02 in the second S bogey.

Further down the blueprint, in Max permissible speed, put 80.

Even further down, find Geometry ID. Copy the filename of your 4-6-0 steam loco.igs (right-click, select Copy filename) and paste it into Geometry ID.

ScreenShot009.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: We shall build a steam locomotive ...

Unread postby mrennie » Sun Feb 24, 2013 4:07 pm

There are yet more things we need in the engine blueprint before it will export to something that we can put into the game.

RW insists on having a minimum of controls defined, starting with a throttle and reverser. Go to the Controls section of the blueprint and click on "Insert first" twice. In the "Interface elements" part, also expand them and click on "Insert first". When it asks you to choose a blueprint type for the interface element, choose "Interior notched lever" for the reverser, and choose "Interior lever" for the throttle.

Enter the values as shown:

ScreenShot012.jpg


ScreenShot013.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: We shall build a steam locomotive ...

Unread postby mrennie » Sun Feb 24, 2013 4:29 pm

We need to specify a script component too. This is a LUA script, and we can put it in the same folder as the engine blueprint. You can edit one in notepad (call it TenWheelerEngineScript.lua). The bare bones of an engine script look like this (you can copy it exactly as it is ... and put back in the formatting that got lost somehow when I submitted the post!):

gPlayerDriving = false
gInitialised = false

function Initialise ()

Call("BeginUpdate")

end -- function Initialise

function Update ( time )

if (Call( "GetIsPlayer" ) == 0) or
(Call( "GetIsEngineWithKey" ) == 0) then

-- Player not driving. Do stuff that's only for AI locos.

gPlayerDriving = false
else
if gPlayerDriving == false then
-- Player has clicked on the loco (become its engineman)

gPlayerDriving = true;
end
end

if gInitialised == false then

-- Do the initial set up, such as turning off smoke and steam emitters.

gInitialised = true;
end

-- Do stuff that has to be done on every update.

end -- function Update
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: We shall build a steam locomotive ...

Unread postby mrennie » Sun Feb 24, 2013 4:48 pm

More things we need ... Engine simulation file.

In the Simulation folder, right click and create an Engine sim blueprint and call the file "4-6-0 engine sim", and put that same name inside the blueprint.

ScreenShot014.jpg


Save it.

Go back to the engine blueprint. Rename it "4-6-0 engine". Open it again and go down to the Engine simulation container. Put in the path and name of the engine sim blueprint:

ScreenShot015.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: We shall build a steam locomotive ...

Unread postby mrennie » Sun Feb 24, 2013 5:15 pm

We can now Preview it

ScreenShot016.jpg


and Export it, and also Save it before exiting the Asset Editor and firing up RW to try in the game.

BUT ... it still doesn't show up in the game. Just a moment while I go and see what it is I've forgotten *!embar*!
You do not have the required permissions to view the files attached to this post.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: We shall build a steam locomotive ...

Unread postby mrennie » Tue Mar 26, 2013 9:03 am

Before continuing, I have to correct a mistake from the post dated Fri Feb 22, 2013 9:26 pm.

In the original post, I said to shift the rails by 4.7083+0.1067, whereas it ought to have been by (4.7083/2)+0.1067 ft. In other words, 50% (not 100%) of the gauge width in each direction. At the moment, our track width is double standard gauge ... **!!bang!!**

If you were an "early adopter" of this tutorial and have copied my mistake, don't worry, it's easy to correct. We simple need to shift the rails and wheels by 4.7083/2 ft towards the centre. This also gives me a good excuse to show how to use the "set default" feature.

Lock x, y and z.

Go into top-down view.

Select the Rails object and do "show only". Also untick "Lock" so that we can edit the part.

Select all points on the right-hand side (RHS) rail.

In the Shape Operation Panel, click on Shift Selection. The yellow highlighting of the points you had selected will vanish, This is just a "feature" of 3DC - the points are still selected.

In the Parameters, in Shift X, type -2.354. Then click on the little blue flag (beneath "Rotate Z"). That's the "Remember these settings" flag.

Hide all the axles (1_2000_bo02wh01, 1_2000_bo02wh02 and 1_2000_bo02wh03).

Use RST to select all the parts that are on the RHS.

Click the Shift Selection tool and all those parts will shift by -2.354.

Now for the left-hand side (LHS) ...

In the Shape Operation Panel, RIGHT click on Shift Selection, to bring up the Shift Operation Parameters panel.

ScreenShot022.jpg


Change the -2.354 to 2.354 and click OK.

Show only Rails and this time, select all the points on the LHS rail.

Left click on the Shift Selection button to make those points shift by 2.354 (towards the centre).

Click on the Show Shapes button (in the top tool bar) and then hide the axles again.

Use RST to select all the parts that are on the LHS.

Click the Shift Selection tool and all those parts will shift by 2.354.

Click on the Show Shapes button. You'll see that the only thing left to do is to shift the ends of the axles. I'll leave you to do that. Just select the points on each end of each axle and shift them using the technique I've described.

When it's all done, it should look like this:

ScreenShot023.jpg


Much better!
You do not have the required permissions to view the files attached to this post.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: We shall build a steam locomotive ...

Unread postby mrennie » Tue Mar 26, 2013 9:34 am

Now that we've sorted out the track gauge (a small digression!), we can begin the process of setting up some blueprints and exporting the wheels into Railworks to see how well they sit on the rails.

First though, we need to make some another guide object that will help us to measure accurately the distance between the drivers, along the z axis.

Drag a cube into the scene and place it between the RHS wheels and the picture. Go into "looking from the front" view and select the cube's front face. Extrude that face by 1.0. Draw the cube as a wireframe. Rename the cube as "AxleGuide" and put into the ModelGuides group.

Go to "looking from the left" view mode. Resize AxleGuide and move the vertical lines until they line up perfectly (zoom in as close as possible to make sure!) with the centrelines of each driver.

ScreenShot024.jpg


Now we'll use the z coordinates of the points at the top of AxleGuide to measure the distance (remember, in feet!) between the axles.

Select a point, as shown below, click on Set Point Position and make a note of the value of the z coordinate.

ScreenShot025.jpg


I have it as 17.8455.

Repeat for the other two points.

The values I got are:

axle1: 17.8455
axle2: 12.0938
axle3: 5.8562

Axle2 is where we have the pivot for bo02. When we do the "bogey" blueprint, we have to know the offset, along the z axis of the other axles.

Offset for axle 1 = 17.8455-12.0938 = 5.7517 ft = 1.75311816 metres.
Offset for axle 3 = 5.8562-12.0938 = -6.2376 ft = -1.90122048 metres.

(Note: to convert feet to metres, just go into Google and type "convert ft to m". You'll instantly get a handy tool to do the conversion).

In the next posts, we'll adjust the height of the bo02 group centre so that the wheels will sit on the rails in the game. Then we'll set up some blueprint and export the wheels into Railworks and test them in a free roam scenario.
You do not have the required permissions to view the files attached to this post.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: We shall build a steam locomotive ...

Unread postby mrennie » Tue Mar 26, 2013 2:35 pm

Go into the "looking from the front" view.

Select eveything in the scene and show it in wireframe mode.

Make sure Show Group Pivot Points is enabled (the button with the x, y, z axis icon).

In the hierarchy, select the group bo02 and look at how it is highlighted in the scene:

ScreenShot026.jpg


We need to move that group centre down so that it is just above the height of the top of the rails.

Go into "looking from the left" view.

Lock x and z.

Select 1_2000_bo02 and slide it downwards until the group centre is aligned with the lowest outer edge of the driving wheel tire.

ScreenShot027.jpg


Now enable the Shift Tool in the right hand tool bar.

Slide 1_2000_bo02 back up again until it's above the axle. Notice that the group centre will stay put. That's because the Shift Tool allows us to move parts around within a group without it changing the position of the group centre. This is something that often comes in very handy. You can check that the group centre is still at the bottom of the wheel if you click on the group bo02 in the hierarchy. It'll put a highlight box around the group centre.

ScreenShot028.jpg


We should now export these wheels into the format that the Railworks Asset Editor recognises, the ".igs" format.

Select all the parts belonging to bo02 and its child groups (bo02wh01, bo02wh02, bo02wh03). The easiest way to do this is to go into plan view, use RST to drag a selection box around all the wheels, so that all the parts are highlighted in the hierarchy, then deselect any unwanted parts, such as the rails, that got included (to deselect something, click on it, in the view or in the hierarchy, while holding down Shift).

Select File > Export > Trainworks > RailWorks/Rail Simulator Intermediary Geometry Format (igs)

ScreenShot029.jpg


and save it as "locomotive"

ScreenShot030.jpg


Say "No" to creating distance-based levels of detail (I tried these once and the results were awful).

Note: You should get a message saying "Export complete". If you don't, then some possible causes are: an empty group in the scene; two or more groups with the same name.
You do not have the required permissions to view the files attached to this post.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

PreviousNext

Return to Rolling-Stock Design

Who is online

Users browsing this forum: No registered users and 1 guest