Route Building Tutorial 13: A Waterfront and Walled Walkway on Approach to the Tunnel

In the previous tutorial, we added a cutting wall on the right hand side of the approach to the tunnel. In this tutorial, we will concentrate our efforts on the left hand side, creating a ground of flat water separated from the track by a walled walkway.

Time to get to work…

In the previous tutorial, we added a rising gradient on the approach to the tunnel. The area of water on the left hand side must be level (so that it represents a waterfront location), so our first job is to use the height command to ensure that the object we create to represent the water remains at the same level along the length of the route while the track rises up from it.

Looking at the code, we find that in this section of code several pitch commands were inserted to represent the gradually increasing gradient:

So how do these pitch commands change the height of the track above a level surface?

To answer this question we must work out the height change the gradient induces over each 25metre length, remembering that we are starting at a height of 10m.

At 0metres, the pitch value was 0, therefore no height change occurs in the first 25metres, so at 25m, the height will of the track will still be 10m and we should add this to the code:

At 25m, the gradient changes to 1/500 (remembering the equation to convert pitch to gradient, pitch = 1000/y). Therefore, in 25m, the height of the track will increase by 25/500 = 0.05m. So, after 25m at pitch 2, the height of the track will be 10.05m. Inserting this into the route file,

At 50metres, the pitch changes to 4 and hence the gradient becomes 1/250. Therefore, in 25metres, the height of the track will increase by 25/250 = 0.1m. So, at 75metres, the height of the track will be 10.05+0.1 = 10.15m. Inserting this into the route file,

At 75metres, the pitch changes to 8 and hence the gradient becomes 1/125. Therefore, in 25metres, the height of the track will increase by 25/125 = 0.2m. So, at 100metres, the height of the track will be 10.15+0.2 = 10.35m. Inserting this into the route file,

Continuing these calculations in the same manner, the height values we need to add for the remaining track to the tunnel entrance are as follows:

Once we enter the tunnel, the height of the tracks above the surrounding round level remains relevant as it can still be viewed before the tunnel is entered. So, continuing to enter the height calculations:

After this point, the water surface wil not be clearly visible and we do not need to continue with these calculations.

Now we need to create our ground object. For this, we will start off with a single, horizontal face, the object file being saved as sea_1.CSV and indexed as ground 2 in the route file. This ground should be applied at 0m in place of ground 1.

There is a degree of overlap in the z-direction as well as a small height change to ensure no gaps appear as we view from the different heights and angles when travelling up the hill. The texture has also been distorted slightly, ideally our 108x30m area would use the bitmap 1×0.28 times (the width to length ratio of the flat face). However, in this instance, a single continuous wave was visible along the whole length of the water; completely unrealistic but by using slightly more of the texture image, this effect was largely overcome.

At the moment, the water only extends 108m to the left – for a larger expanse of water, a second face can be added which extends further to the left. However, because of the colour differences across the width of the texture, we can produce a mirror image of the texture to avoid an unsightly discontinuity. This can be done by swapping the x parameters in the settexturecoordinates command, so our second face looks like this:

Also as part of the ground, we can add a walkway which is separated from the railway tracks by a wall. Because this is going to be attached to the gound, the effect of increasing height will become more apparent. For the main face of the wall, add the following to the ground object file:

And for the capping stones, using the same texture but applying a small part of it horizontally (to give a more 3d appearance to the wall), add the following code to the object file:

The next job is to add the walkway on the other side of the wall from the tracks and place some fencing to the top of the wall where it becomes low. The 11metre wide walkway can be added to the current ground file;

Our final task for this tutorial is to make use of the wall command to add some lineside fencing (in the form of simple railings) to the walkway as it approaches the tunnel. To do this, we must create a new single faced object file; this should be saved in the objects directory as fence_1.CSV. It is worth noting that the fence itself has intentionally been made overscale to help reduce the flickering associated with fine details.

The wall object must be indexed in the route file (as it appears on the left hand side of the rail, it is logical to make it a wallL object):

It should then be applied starting after 200m:

By attaching the fence to the running rail rather than the ground, the apparent height of the fence (relative to the running rail) is not changing. If the railings were added to the ground object, they would have been submerged in ballast as the tunnel was approached.

In this part, we have examined the interaction between the pitch and height commands to ensure a level ground has been created as the height of the running rail was increased. The ground itself was composed of a flat plane of water with a walkway and protective wall which was reduced in height as the climb towards the tunnel entrance progressed. Finally, railings were associated with the running rail to ensure these appeared to remain at a constant height despite the rising gradient.

In the next part, we will finish off the tunnel approach scene by adding a rocky outcrop jutting out into the water and add some detail to the top of the tunnel. The gaps around the tunnel walls will also be tidied up before we take a look at constructing a station.

Leave a Reply

Your email address will not be published. Required fields are marked *