Route Building Tutorial 12: Scenery on Approach to the Tunnel

In the previous tutorial, we finished construction of the tunnel. Our next tasks are to add the gradient to the track and start constructing the scenery on the approach to the tunnel.

Time to get to work…..

Our first job is to add the gradient to the route. Remembering from the route description given in previous tutorials, we will be climbing steeply up through the tunnel before levelling out after it. The route will start on an embankment before running into a cutting and then into the tunnel.

To add the gradient to the route, we must make use of the .pitch command,

.pitch X
Where X is the number of metres rise (if positive) or (if negative) fall per 1000metres of route traversed.

To convert a conventional 1/y gradient to pitch, apply the equation pitch = 1000/y, so for a 1 in 500 gradient, the pitch value would be 1000/500 = 2.
Similarly, for a 1 in 75 gradient, the pitch value would be 1000/75 = 13.3.

Gradients steeper than about 1 in 30 are rarely encountered in real life on mainline railways, mainly because of power and adhesion limitations. Modern high speed lines tend to be quite steeply graded as the power of modern locomotives and units is substantially greater than was available historically.

On BVE routes, it is best to avoid very sudden changes of pitch as this looks unrealistic. Instead, as with graduated curves, it is better to increase (or decrease) the pitch gradually, and this is what we will do on our route. Adding the pitch values for the uphill section running towards the tunnel:

If we take a look at the route now from the first station, we can clearly see the uphill gradient ahead. Don’t worry about the cracks that have appeared in the ground – this is because the ground is in flat 25m lengths and because of our rising track is now arranged rather like the treads on stairs and we can see through the gaps. Such problems will be corrected later when we start work on the ground itself.

Having climbed up through the tunnel, we now need to return our track to the level, in this case more gradually (as we will continue climbing up through a valley):

Before finally returning to level:

Typically, the track level is raised above the ground on what can be quite a significant height of ballast. The ballast on the shoulder often appears dirtier than that immediately around the track (depending on when the ballast was last cleaned or renewed). Adjacent to the shoulder is often a small width of flat weedy ballast, separating the track from the surrounding vegetation and landscape. These features are exemplified in the image below:

An example track profile

An example track profile


Obviously, the appearance of the track / landscape interface is incredibly varied, but for our route, a general purpose transition region will help with seamless joining of the track and landscape.

This brings us on to the subject of dikes and walls. These are objects used by BVE which are not only regularly repeated every 25metres along the rail, but also follow the line of the rail (both vertically and horizontally) with which they are associated.

Each rail may have one wall and one dike associated with it and any object may be defined as a wall or dike. In practice, BVE makes absolutely no discrimination between the objects that make up walls or dikes (or indeed rails and grounds) although to help with coding I tend to define a wall as a hard landscape object which is usually (but not always) man-made. Dikes tend to be reserved for soft landscape objects and below rail level objects. Rails are reserved for tracks and similar features (which may include roads and rivers). Ground objects are normally used for broader landscape features.

We can therefore create a dike object containing the transition region between the track and surroundings. So, considering the picture above, let’s construct an object for this purpose, starting on the left hand side of the running rail;

The first face to construct on the dike is the ballast shoulder which will slope away at a moderately steep angle ~25? (looking at various pictures of such features, they can be a lot steeper).

By examining our straight track object, it is possible to see where the edge of the ballast is. For our dike, we need to position the right hand edge of the ballast shoulder slightly to the right and underneath this to prevent gaps appearing when we go round curves.

Opening up DL_STRAIGHT.B3D we find the bottom, left hand side of the ballast occurs at x = -2.8 and y = -0.4.

The right hand side of our ballast can therefore be positioned at x = -2.7 and y = -0.5. Extending this to the left by 2.3metres, down by 1metre and making the length 26metres, we can start constructing the object. For a ballast shoulder, this is rather large, but the size means we will have a high degree of flexibility regarding how the track / surrounding ground interface appears.

The texture being used was created by tiling horizontally the same ballast texture as is used for the track (dl_ballast.bmp) and then, using Photoshop, copying the darker coloured stones and pasting them on the left hand side of the image and darkening them further (all image editing being performed in 8bit RGB mode and making use of ‘layers’ as appropriate). The big advantage of using a modified ballast texture in this way is that the join between the track and ballast shoulder can be seamless.

To create the ballast shoulder, the following code is required (in a new CSV file):

This needs to be saved in the objects directory as ballast_dike_both.CSV (the texture image is contained in the objects download).

Before adding this to our route, we first need to index the object as a dike by adding the following code to the route file;

Notice the use of .dikel – this specifies which side of the track the dike must be placed when the .dike command is used; dikel for the left hand side and diker for the right hand side.

We can then add the ballast shoulder to the route by using the dike command;

.dike X;Y;Z,

Where X is the index of the rail to which the dike is being applied, Y is the side of the track on which the dike is being placed; use -1 for dikes on the left of the rail (dikel objects) and 1 for dikes on the right of the rail (diker objects) & Z is the index of the dike.

For our route, we wish to associate the dike with the running rail (rail 0) and have defined the dike object as being on the left hand side of the track (as it is a dikel object). The index of the dike object is 1, hence in our at position 0m should look like this:

If we now view the route, the results are disappointing to say the least; we cannot see the ballast shoulder. This is because the ground we are using (ground 1.CSV) gives a layer of grass 0.5m below the rail, hiding what we have just created.

To overcome this, we need to raise the tracks off the ground, using the height command;

.height X,
Where X is the height of the running rail from the BVE datum height (0metres).

It is vital to remember that the height of all objects except grounds are referenced to the running rail, so when we alter the height of the running rail using the height command, everything else will move except the ground.

By raising the track 10metres above the datum height (and hence above the grass associated with the ground), we will be able to see our ballast shoulder. To do this, change our route file at position 0m to look like this:

It is worth noting that the height has been set relatively high as at the start of the route, we will be running on an embankment.

Finishing construction of the left hand side of the dike object, we now need to add the flat area at the bottom of the ballast, making this a further metre wide, adding this:

At the moment, this looks a little monotonous. In reality, within this area you might find relay cabinets, old rails, bushes, drains, troughing and any number of other detail items which would add to the visual interest.

To save having to apply a separate dike to the right hand side of our tracks, we can add the necessary code to the dike we currently have under construction. Despite the references in the dike index to left and right hand dikes, BVE actually makes no discrimination where the objects are displayed.

From the route file, the right hand rail is offset 3.5m to the right of the running rail, taking this into account, the code for the right hand side is as follows:

Notice how the order of the faces listed in the addface command has been reversed; this is because the vertices we have used are ordered anticlockwise but must be specified in a clockwise order to be displayed. We could alternatively have rearranged the addvertex commands so that these were listed in a clockwise order.

Having added the ballast shoulder, we can now start constructing the scenery leading up to the tunnel. As the tunnel is approached, we want to enter a cutting; the sides of this need to rise up to create the impression of a hill. There are various ways in which this could be done – we can create the cutting sides as part of a ground object and decrease the height of the running rail or we could use wall or dike objects associated with a null (invisible) rail and alter the position of this.

Each method has it’s advantages, but we will use the latter concept, null rails with wall or dike objects. Our first job is to make create an object for the right hand side of the cutting.

As we are approaching the tunnel, it is important that the object we create actually offers a good fit with the portal, both in terms of appearance and positioning. The appearance will be governed by the textures we use and how the faces of the object are positioned. When selecting a texture, it is important that the colours, lighting and general ‘feel’ matches that of it’s surroundings. The positioning of some of the faces will be governed by the surrounding objects – in this instance, the cutting wall must meet the tunnel portal and the ballast with no visible gaps.

The object we are going to create will initially be a simple, single faced wall; start by creating a new file named tunnel_approach_wall_right_1.CSV and save it to the objects directory.

For a single faced wall which fits the track and tunnel portal when it is associated with rail 1 (the right hand track), the following code should be used:

The texture used for the cutting face is from the seawall at Shaldon on the Great Western main line.

Having saved the object file, it must be indexed in the route file – we will index it as right hand wall object (in practice we could alternatively index it as a dike):

To place this object on our route we need to make use of the .wall command;

.wall X;Y;Z,
Where X is the index of the rail to which the wall is being applied, Y is the side of the track on which the wall is being placed; use -1 for walls on the left of the rail (walll objects) and 1 for walls on the right of the rail (wallr objects) & Z is the index of the wall.

Note the similarity between the .wall and .dike commands.

Now, using the wall command, we can add the object to the route by adding this at position 175m:

If we take a look at the route now, we find the object is in position with no visible gaps between the track, tunnel entrance and wall (except at the bottom right hand side of the tunnel portal, which we will deal with later).

Having checked the wall looks satisfactory and fits the tunnel portal we now need to make this object look more like part of a rising hill. There are two jobs needed for this; firstly we must make the wall appear to rise up out of the ground and secondly we must some detail to the top of the wall to give the appearance of solid ground.

The first of these objectives can be achieved by attaching the wall to a null (or blank) rail and adjusting the position of this so that it increases in height and approaches the running track as we move nearer the tunnel. Such a rail object was previously indexed as railtype 53:

Therefore, to start a new rail at 0metres which uses the null rail and is 25m below the height of the running rail and has the wall attached, we need to add this code:

Before continuing, we should delete the wall command we added earlier at position 175m.

It is now possible to generate the wall rising up from ground level by altering the position of the null rail, remembering that at 175metres, we need the null rail to be located 3.5metres to the right of the running rail and to be at the same height of the running rail, like this:

We now have a rising cutting wall – at the moment the effect is not quite complete as we still need make the hill surface. For this, we can add another face to the end of our dike object:

Notice how there appears to be a large overlap on the grass face in the Z direction (-2 to 27m). This is necessary to avoid gaps appearing between adjacent 25m lengths of the sloping faces (as can be seen in the ground on the left hand side). Flickering caused by superimposed overlapping faces will not occur as they will be oriented at different angles (because of the changing height of the null rail and changing gradient).

The final item to add to the hill is a hedge in the region where the grass meets the wall. For this, we need to add a couple of rows of bushes above the top of the wall, making sure that the left hand row is aligned with the top of the wall:

With hindsight, it would probably have been better to have used a texture for the wall which had bushes growing out of the top rather than the flat cropped texture used here (the top of the wall looking somewhat too ‘straight’).

Our final job for this tutorial is to end the embankment side once we reach the tunnel. This can be achieved using the .wallend command;

.wallend X,
Where X is the index of the rail to which the wall is associated.

In our route, we therefore need to add this at position 250m:

That completes the landscape on the right hand side of this section of track.

In this tutorial, we have introduced dikes and walls as well as used a null rail to position a wall. In the next tutorial, we will deal with the left hand side of the route running up to the tunnel. for this, we will use ground objects and the height command to add to the appearance of climbing up towards the tunnel.

Leave a Reply

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